Closed inetfuture closed 9 years ago
Fenced code blocks in lists are supported in markdown in general? That's new to me.
I could possibly put something together, but it seems like an edge case.
At least it was supported on github, look:
item2
var t = new Date():
Or, you can give me some clues so that I can hack your tmLanguage file. I'm new to this kind stuff.
Thanks.
I'm still thinking about this. I'm not sure the code debt is worth it. The amount of additional code and regex required seems disproportionate with the payoff. Anyway, see this block of code: #L117-L144
This is the regex for the beginning of a code block: #L119
And this is the regex for the closing: #L134
As you can see, what is happening is that there are capture groups for the code fences, as well as the language that will be used for syntax highlighting inside of the fenced code block. Currently, the regex required to make this happen is very simple, if we add what you're requesting it just complicates the regex and increases the potential for bugs. However, if you implement the regex and test it out, and you don't have any issues I'd be happy to merge it in.
@jonschlinkert what's the difference from knockdown? I've submitted there similar issue https://github.com/aziz/knockdown/issues/9 Not sure, where to send pr, afaik, @aziz is too busy for prs.
And why have you @jonschlinkert deleted support for the most perfect language?!!! I mean Python :smile:
Speaking about fix, it's done, but I think I should test it better, couple of days probably
@vovkkk I would sent the PR to @aziz first, and if he has time to merge it in then I can grab it from there. Then I'll add a note on this project that it came from that repo. I don't want to take away from the great work that he has done on knockdown. To see the differences in code, it's probably easier to just do diff between the projects, but in terms of "intent", I created this project to maintain support for markdown with monokai specifically in mind.
I can re-add python, as I mentioned in a previous commit I just stripped it because I was trying to fix a bug. But I think I tracked it down to some bad regex (that I added ;-), so I'll try re-adding it.
@vovkkk did you ever get this resolved?
Ah, yes, it's in knockdown already, sorry, I forgot to tell you. https://github.com/aziz/knockdown/commit/c58fb71b5f6d70ef2a3652ca0794da29c45b46b5 https://github.com/aziz/knockdown/commit/95d009178761577347b6cca74d6f34bcee4eabea
No prob, I'll close here and probably merge in some of those changes (with attribution of course). thanks!
@jonschlinkert I guess this was never merged/included? A pity.
pr is always welcome.
closing, but if someone wants to do a pr to add this I'd be happy to merge
This kind fenced code block doesn't get highlighted: