-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #676 from robertpanzer/remove-verbose
Remove setting verbose mode to prevent logging of JRuby warnings
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
asciidoctorj-core/src/main/resources/org/asciidoctor/internal/asciidoctorclass.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
asciidoctorj-core/src/test/java/org/asciidoctor/QandATest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.asciidoctor; | ||
|
||
//import org.asciidoctor.ast.DescriptionList; | ||
import org.asciidoctor.ast.Document; | ||
//import org.asciidoctor.ast.StructuralNode; | ||
import org.junit.Test; | ||
|
||
import static org.hamcrest.Matchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
|
||
public class QandATest { | ||
/* | ||
private static final String DOC = "== Test\n" + | ||
"\n" + | ||
".Q & A block\n"+ | ||
"[qanda]\n"+ | ||
"What is Asciidoctor?::\n"+ | ||
" An implementation of the AsciiDoc processor in Ruby.\n"+ | ||
"\n"+ | ||
"What is the answer to the Ultimate Question?:: 42"; | ||
@Test | ||
public void shouldParseTitle() { | ||
final Asciidoctor asciidoctor = Asciidoctor.Factory.create(); | ||
final Document doc = asciidoctor.load(DOC, OptionsBuilder.options().asMap()); | ||
final DescriptionList dl = findDescriptionList(doc); | ||
assertThat(dl.getTitle(), is("Q & A block")); | ||
assertThat(dl.getStyle(), is("qanda")); | ||
} | ||
private DescriptionList findDescriptionList(StructuralNode node) { | ||
if (node instanceof DescriptionList) { | ||
return (DescriptionList) node; | ||
} else { | ||
for (StructuralNode structuralNode : node.getBlocks()) { | ||
DescriptionList dl = findDescriptionList(structuralNode); | ||
if (dl != null) { | ||
return dl; | ||
} | ||
} | ||
return null; | ||
} | ||
} | ||
*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters