On 2026/09/24 22:03:06 Per Nyfelt wrote:
> Hi,
> 
> I just released Groovy Markdown (GMD) 3.2.0.
> 
> GMD lets you combine Markdown with executable Groovy blocks and render 
> the result as Markdown, HTML, or PDF. This release improves CommonMark 
> correctness, refreshes the
> rendering stack, and strengthens the Maven and Gradle integrations.
> 
> Highlights:
> 
> - Inline = expression  expansion no longer occurs inside CommonMark 
> indented code blocks.
> - Indented Groovy fences now execute with the appropriate dedentation 
> and echo consistently.
> - Groovy block output is safely separated from following Markdown when 
> it lacks a trailing newline.
> - Charts and generated HTML are rendered reliably as raw HTML image output.
> - Updated Groovy 5.1.3, CommonMark 0.30.0, OpenHTMLToPDF 1.1.86, Matrix 
> BOM 2.6.0, and related dependencies.
> - The Gradle plugin now tracks its actual processor runtime classpath, 
> supports configuration cache and parallel execution, and avoids 
> resolving dependencies when no .gmd
> files exist.
> 
> - The Maven plugin now handles interrupted processor shutdown safely.
> 
> One breaking API change: the width-only print(GgChart, double) and 
> println(GgChart, double) overloads were removed. Pass both width and 
> height explicitly, or omit both to
> use the chart’s own dimensions.
> 
> Maven users can use:
> 
> <dependency>
>      <groupId>se.alipsa.gmd</groupId>
>      <artifactId>gmd-core</artifactId>
>      <version>3.2.0</version>
> </dependency>
> 
> Full release notes are available in the project repository:
> https://github.com/Alipsa/GroovyMarkdown
> 
> Best regards,
> Per Nyfelt
> 
> 


Thanks for your work, this is a great idea.

I’ve been thinking recently about offering a feature similar to 
groovy.xml.MarkupBuilder.
https://groovy-lang.org/processing-xml.html#_creating_xml

In Groovy 6,groovy-markdown provides MarkdownSlurper to read markdown document, 
http://www.groovy-lang.org/reading-markdown.html
I hope it can also provide an easy way to create Markdown documents like 
MarkupBuilder.

def writer = new StringWriter()
def mdb = new MarkdownBuilder(writer) 

mdb.records() { 
    heading(level: 1) {
        text 'Title'
    }
    heading(level: 2, text: 'Summary')
    paragraph(value: 'The work is on track.')
    heading(level: 2, text: 'Next Steps')
    list {
        item 'Item one'
        item 'Item two'
    }
}


def doc = new MarkdownSlurper().parseText(writer.toString())
def summary = doc.section('Summary')
assert summary[0].type == 'paragraph'
assert summary[0].children[0].value == 'The work is on track.'

def next = doc.section('Next Steps')
assert next[0].type == 'list'
assert next[0].items*.text == ['Item one', 'Item two']

Reply via email to