nicoulaj / idea-markdown

Markdown language support for IntelliJ IDEA (abandonned).
Apache License 2.0
600 stars 97 forks source link

Fenced Code Blocks with newlines do not render/highlight correctly when in a list item. #237

Open todofixthis opened 9 years ago

todofixthis commented 9 years ago

Example markdown:

1. List Item

Code Block

With Newlines

Renders like this in Github:

  1. List Item

    # Code Block
    
    # With Newlines

However, the Markdown plugin highlights it like this:

captura de pantalla 2015-07-14 a las 11 03 57

and renders it like this:

captura de pantalla 2015-07-14 a las 11 04 03

Using 8 spaces instead of backticks does cause the code to highlight/render correctly (so long as there is a trailing newline).

Specs:

"Fenced code blocks" option is enabled.

This issue may be related to #231 #223 #124

vsch commented 9 years ago

It is a bug in the old version of pegdown parser that this plugin uses.

I forked this plugin and updated to latest pegdown, fixed its list parsing bugs and added options. Made it look almost like GitHub's markdown.

Current version of my plugin has syntax highlighting broken, the fix will be available tomorrow. I have it working as it was in idea-markdown but it is very limited. Syntax highlighting for inlines does not work in lists, tables, etc. Only in plain paragraphs.

I am working on a temporary quick-fix that will be acceptable until I can write a lexer as expected by IntelliJ. The plugin is called MultiMarkdown check it out and let me know what you think.

nicoulaj commented 8 years ago

Notice: This plugin is no more maintained and it has been removed from Jetbrains plugins repository. There is a Markdown plugin officially supported by Jetbrains.