Skip to content

Instantly share code, notes, and snippets.

@mujahidk
Created November 18, 2019 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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