rjeschke / txtmark

Yet another markdown processor for the JVM
Apache License 2.0
449 stars 100 forks source link

Question: profile: extended #33

Open mschipperheyn opened 9 years ago

mschipperheyn commented 9 years ago

Hi,

How does [$PROFILE$]: extended work. I put it on top of a string and ran it through markdown.geHtmlContent(myString) and it prints [$PROFILE$]: extended without executing it.

ColinLeverger commented 8 years ago

+1, have the same issue, how does it work ? Can you be more precise on your readme.md (using it with Java for instance,...) ? Thanks, Colin

ColinLeverger commented 8 years ago

OK I got it.

You simply have to add the following \n[$PROFILE$]: extended at the end of the MD string you want to htmlize... and that's it! (in Scala) :

val extended = "\n[$PROFILE$]: extended"
val myMd = getMyMd()
val myHtml = txtmark.Processor.process(myMd + extended)
rjeschke commented 8 years ago

I don't have a method called getHtmlContent in txtmark, so I'm a bit confused what you mean here.

In the meantime: have a look at com.github.rjeschke.txtmark.Configuration, there you can use forceExtendedProfile() with the builder and supply this configuration to Processor.process(String, Configuration).

Also, [...]: ... should never be visible, because it's a link definition in markdown.

And: the reason I added the extended profile was to keep backwards compatibility with regular markdown, while still being able to introduce enhanced behaviour.