Created
April 18, 2025 14:28
-
-
Save cfjedimaster/98d8c33940cbec9315e8e37b5b2726a9 to your computer and use it in GitHub Desktop.
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
function markdownToHTML(str) { | |
// .init() is important! | |
ds = createObject("java", "com.vladsch.flexmark.util.data.MutableDataSet","flexmark-all-0.64.8-lib.jar").init(); | |
ps = createObject("java", "com.vladsch.flexmark.parser.Parser","flexmark-all-0.64.8-lib.jar").builder(ds).build(); | |
hm = createObject("java", "com.vladsch.flexmark.html.HtmlRenderer","flexmark-all-0.64.8-lib.jar").builder(ds).build(); | |
doc = ps.parse(str); | |
return hm.render(doc); | |
} | |
bx:savecontent variable="input" { | |
``` | |
# Hello World | |
Tell me why you love my [blog](https://www.raymondcamden.com). | |
This is another paragraph. | |
## Stuff I like: | |
* Books | |
* Video Games | |
* Music | |
* Beer | |
``` | |
} | |
writeoutput(markdownToHTML(input)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment