Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove attributeUndefined option in favour of direct atrtibute usage #441

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/main/java/org/asciidoctor/maven/AsciidoctorMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ public class AsciidoctorMojo extends AbstractMojo {
@Parameter(property = AsciidoctorMaven.PREFIX + "embedAssets")
protected boolean embedAssets = false;

@Parameter(property = AsciidoctorMaven.PREFIX + "attributeMissing")
protected String attributeMissing = "skip";

@Parameter(property = AsciidoctorMaven.PREFIX + "attributeUndefined")
protected String attributeUndefined = "drop-line";

// List of resources to copy to the output directory (e.g., images, css). By default everything is copied
@Parameter(property = AsciidoctorMaven.PREFIX + "sources")
protected List<Resource> resources;
Expand Down Expand Up @@ -528,12 +522,6 @@ protected void setAttributesOnBuilder(AttributesBuilder attributesBuilder) throw
attributesBuilder.dataUri(true);
}

if ("drop".equals(attributeUndefined) || "drop-line".equals(attributeUndefined)) {
attributesBuilder.attributeUndefined(attributeUndefined);
} else {
throw new MojoExecutionException(attributeUndefined + " is not valid. Must be one of 'drop' or 'drop-line'");
}

AsciidoctorHelper.addAttributes(attributes, attributesBuilder);

if (!attributesChain.isEmpty()) {
Expand Down Expand Up @@ -662,22 +650,6 @@ public void setEmbedAssets(boolean embedAssets) {
this.embedAssets = embedAssets;
}

public String getAttributeMissing() {
return attributeMissing;
}

public void setAttributeMissing(String attributeMissing) {
this.attributeMissing = attributeMissing;
}

public String getAttributeUndefined() {
return attributeUndefined;
}

public void setAttributeUndefined(String attributeUndefined) {
this.attributeUndefined = attributeUndefined;
}

public File getProjectDirectory() {
return projectDirectory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class AsciidoctorMojoTest extends Specification {
mojo.sourceDirectory = srcDir
mojo.sourceDocumentName = 'attribute-undefined.adoc'
mojo.backend = 'html'
mojo.attributeUndefined = 'drop'
mojo.attributes = ['attribute-undefined':'drop']
mojo.execute()
then:
File sampleOutput = new File(outputDir, 'attribute-undefined.html')
Expand All @@ -429,7 +429,7 @@ class AsciidoctorMojoTest extends Specification {
mojo.sourceDirectory = srcDir
mojo.sourceDocumentName = 'attribute-undefined.adoc'
mojo.backend = 'html'
mojo.attributeMissing = 'drop-line'
mojo.attributes = ['attribute-undefined':'drop-line']
mojo.execute()
then:
File sampleOutput = new File(outputDir, 'attribute-undefined.html')
Expand Down