ShyykoSerhiy / gfm-plugin

Github flavored markdown plugin for intellij idea.
https://plugins.jetbrains.com/plugin/7701
MIT License
88 stars 16 forks source link

Blank lines are handled "too well" #126

Open CalebWhiting opened 6 years ago

CalebWhiting commented 6 years ago

Unfortunately the markdown syntax isn't that beautiful, and one of the ways to try to bring some sort of code format to the document is blank lines, GFM is smart enough to recognise these blank lines, however github is not and it breaks the github renderer.

Here's an example from my java obfuscator repository.

<dl>
    <dt>Inline Accessors<br></dt>
    <dd>Removes get/set methods, replacing them with direct field access</dd>

    <dt>Remove Debug Information</dt>
    <dd>Removes debugging information left by the compiler such as variable names and line numbers</dd>

    <dt>Scramble Classes</dt>
    <dd>Renames classes, optionally skipping classes provided by the --keep option, all classes are moved to the package provided by the --package option (otherwise to the base package)</dd>

    <dt>Scramble Fields</dt>
    <dd>Renames fields</dd>

    <dt>Scramble Methods</dt>
    <dd>Renames methods, skipping those that are required not to be (such as main), native or are overrides of external libraries (Libraries should be included in java class path).</dd>

    <dt>Scramble Strings</dt>
    <dd>Replaces string constants with an "unscramble" method</dd>
</dl>

GFM has no problems with the blank lines, however github does.

GFM renderer: Imgur

Github renderer:


Inline Accessors
Removes get/set methods, replacing them with direct field access
Remove Debug Information
Removes debugging information left by the compiler such as variable names and line numbers
Scramble Classes
Renames classes, optionally skipping classes provided by the --keep option, all classes are moved to the package provided by the --package option (otherwise to the base package)
Scramble Fields
Renames fields
Scramble Methods
Renames methods, skipping those that are required not to be (such as main), native or are overrides of external libraries (Libraries should be included in java class path).
Scramble Strings
Replaces string constants with an "unscramble" method