Closed techpines closed 11 years ago
So the triple back tick method syntax is not part of the core Markdown syntax - it's an addition from the Github Flavoured Markdown.
I've made a start on supporting the GFM on the gfm branch: https://github.com/evilstreak/markdown-js/tree/gfm - this branch might be slightly out of date and need rebasing - we haven't touched it in a while (but should just be missing a few bug fixes if anything)
I think this is the problem - but can you update your example so it shows the exact input you are entering (i.e. make sure your input is indented by 4 spaces so it is markdown 'escaped')
I'm not indenting, I guess I'm trying to do gfm style markdown and the library does not really support it?
https://gist.github.com/techpines/5945812
Since the backtick stuff will cause issues in these github issue dialog boxes, I threw it in that gist above. Which is rendering it :), but you can still click to view it raw.
Right now, I'm just doing a workaround where after I compile with toHTML()
I go through and replace all instances of "[NEWLINE]" with whitespace.
Also, I'd say that GFM is pretty cool/useful, and i guess I will throw out how I'm using your markdown library to get syntax highlighting.
There's a library called highlight.js, and it expects code blocks to be <pre><code>
, so I'm actually adding the language type after the triple backtick like GFM, but then after it's compiled I'm converting something like this:
<p><code>javascript
To this:
<pre><code class="javascript">
Not sure if that is interesting to you or not, it seems like you are trying to stay true to the real markdown spec, but I wanted to throw it out there in case anyone else was trying to do something similar.
Cheers!
GFM support is being handled in #41
I have a code block using the triple backtick syntax that looks like this:
For some reason it outputs this:
But if I change my code block that is inside that triple backtick block to not have a new line:
It's working just fine:
I'm guessing it's a bug with the parser?