Marked is an OSX application to preview Markdown syntax in HTML. It’s possible to configure AsciiDoc as an custom Markdown processor to create the HTML for your AsciiDoc files.
This file contains hidden or 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
| // uncomment line if you want the instance to be retained in application scope | |
| // @ApplicationScoped | |
| public class ApplicationInitializer | |
| { | |
| public void onStartup(@Observes @Initialized ServletContext ctx) | |
| { | |
| System.out.println("Initialized web application at context path " + ctx.getContextPath()); | |
| } | |
| } |
This file contains hidden or 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
| require 'asciidoctor/extensions' | |
| # Reconfigure AST to convert all blocks with the role SLIDE into | |
| # sections and transferring the content to the new sections. | |
| Asciidoctor::Extensions.register do | |
| treeprocessor do | |
| process do |doc| | |
| doc.blocks.replace (doc.find_by role: 'SLIDE').map {|slide| | |
| slide.parent.blocks.delete slide | |
| sect = Asciidoctor::Section.new doc, 1, false |
-
Pull out content from <content> tag in exported XML file
-
Replace blank lines w/ </p><p>, add <p> as first line and </p> as last line
-
Put that content into the body of a basic HTML document structure (so it looks like an HTML file)
-
convert using
pandoc --no-wrap -f html -t asciidoc post-content.html > post-content.adoc
-
use sed to cleanup
sed -i s/^image:/image::/ post-content.adoc
This file contains hidden or 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
| puts 'Hello, World!' |
NewerOlder