zephraph / nunjucks-markdown

Markdown extension for Nunjucks. Use your own renderer!
MIT License
49 stars 12 forks source link

Parse markdown at same tab depth as the {% markdown %} tag itself. #9

Closed internalfx closed 9 years ago

internalfx commented 9 years ago

This pull request sets the tab depth of the {% markdown %} tag as position 0 for the tab depth of the content...

<h1>Homepage</h1>

      {% markdown %}

      # no pre

      - no pre
      - no pre
      - no pre

            This is wrapped in <pre>

      {% endmarkdown %}

  {% markdown %}

  # no pre

  - no pre
  - no pre
  - no pre

        This is wrapped in <pre>

  {% endmarkdown %}

Both Markdown blocks produce the same result.

zephraph commented 9 years ago

Oh cool, I guess this'll solve #4. I'll merge this after I've tested it out a bit.

internalfx commented 9 years ago

Oh yeah, sorry. That's actually what I was trying to solve. Should have referenced it.

zephraph commented 9 years ago

Hey, could you add a test for this as well?

internalfx commented 9 years ago

@zephraph all good?

zephraph commented 9 years ago

Just merge in master and you should be good to go.

internalfx commented 9 years ago

@zephraph done.

Mocha was missing from the dev deps as well....

zephraph commented 9 years ago

Yeah, I had it in the preinstall script. This looks good, thanks for the contribution!