kordamp / markdown-gradle-plugin

Markdown/HTML plugin for gradle
Apache License 2.0
71 stars 51 forks source link

Trouble setting `fencedCodeBlocks` #12

Closed thom-nic closed 8 years ago

thom-nic commented 9 years ago

For some reason I can't get fencedCodeBlocks to work correctly, here's what I've tried...

Here's the top of my build.gradle:

buildscript {
    repositories {
        jcenter()
        maven { url 'http://dl.bintray.com/content/aalmiray/kordamp' }
    }
    dependencies {
        classpath 'org.kordamp:markdown-gradle-plugin:0.1.1'
    }
}
apply plugin: 'org.kordamp.gradle.markdown'
markdownToHtml.fencedCodeBlocks = true

Note that the configuration is markdownToHtml.fencedCodeBlocks not markdown.fencedCodeBlocks - which I assume the latter is a typo in the documentation as it causes gradle to throw a build error. The former gives the a warning but I assume it is still working as intended:

± ./gradlew clean markdownToHtml 
Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "fencedCodeBlocks" on "task ':markdownToHtml'", value: "true".
:clean
:markdownToHtml

BUILD SUCCESSFUL

My source looks like this:

Testing tildes
~~~~~~~~
{ 
  'msg' : "hi there"
}
~~~~~~~

testing backticks:
```json
{
  "msg": "hi there"
}


Tildes are completely ignored and the backticked block is collapsed to a single line of code.  Pegdown claims to support both.  Any ideas what I'm doing wrong or is this a bug?
RobWin commented 9 years ago

+1

aalmiray commented 8 years ago

Should be fixed in version 1.1.0.