Skip to content

Instantly share code, notes, and snippets.

@mujahidk
Created November 18, 2019 15:09
Show Gist options
  • Save mujahidk/c9bbabc101de6eaef25c5f41fad0c394 to your computer and use it in GitHub Desktop.
Save mujahidk/c9bbabc101de6eaef25c5f41fad0c394 to your computer and use it in GitHub Desktop.
Java Markdown to html using txtmark
@Grapes(
[
@Grab(group='com.github.rjeschke', module='txtmark', version='0.13')
]
)
import com.github.rjeschke.txtmark.*
def markdown = '''
# Heading 1
This line has **bold** and _italics_ text!
[https://github.com/rjeschke/txtmark](https://github.com/rjeschke/txtmark)
'''
String result = Processor.process(markdown);
println result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment