New Lucee 6 markdownToHtml() doesn't honour fenced code blocks

Hello Lucee Core Dev Team!

Consider/try running the following code with latest 6.0.0.523 Snapshot:

<cfsavecontent variable="someMarkdown">
# Checking markDown code fences with markdowntoHTML() tested on 6.0.0.523-SNAPSHOT  

```
<b>this don't work</p>    
```

```html
<p>this also don't work</p>    
```

Also using triple "~" aren't working.

[Lucee seems to use](https://github.com/lucee/Lucee/blob/508b092e05dd51179da9e5be2ccad88b91928c14/core/src/main/java/lucee/runtime/functions/string/MarkdownToHTML.java#L8) https://github.com/rjeschke/txtmark for that, which allows [fenced code blocks](https://github.com/rjeschke/txtmark).

Still, writing code blocks is possible without code fences by using basic syntax with four spaces or one tab:

	<h1>Inserting Multiline-Code using tabs seem to work</h1>
	<p>That might work as a workaround for using code fences for the moment</p>
	
	<h3>Code Block using four spaces</h3>
	<p>WORKS</p>

</cfsavecontent>
<cfscript>
	echo( markdownToHTML( someMarkdown ) );
</cfscript>

I can’t find any related issue on Jira, only [LDEV-3783] - Lucee. Should I post an issue on Jira?

Don’t forget to tell us about your stack!

OS: Windows10
Java Version: AdoptOpenJDK\jdk-11.0.10.9-hotspot
Underdow Version: WildFly / Undertow - 2.2.24.Final (CommandBox)
Lucee Version: 6.0.0.523 Snapshot

we are going to be moving that to an extension and adopting a different library

1 Like

You shouldn’t use tag “b”, but double asterisk.
No?

What is Lucee’s markdown implementation?
I usually follow this reference:

<<For security reasons, not all Markdown applications support HTML in Markdown documents. When in doubt, check your Markdown application’s documentation. Some applications support only a subset of HTML tags.>>

1 Like

No, because that is an example to show HTML code and it is a fenced code block within the triple backtick and should be showed as pure code for html, javascript, phython, or whatever language you want to reference it.

backtick :sweat_smile:
yes, sorry :slight_smile:

1 Like

I’ve started with Markdown when I started contributing to the Lucee docs. If you’ve seen a little of that markdowntohtml() functionality, imagine how great would be a flat file framework similar/like Kirby in CFML and Lucee? We need some CfKirby :smiley:.

The issue still persists in the most recent lucee 6 version. Any idea when this will be implemented?