preservim / vim-pencil

Rethinking Vim as a tool for writing
Other
1.57k stars 38 forks source link

Blacklist markdownCodeBlock #61

Open Porges opened 7 years ago

Porges commented 7 years ago

With tpope/vim-markdown, I think markdownCodeBlock should also be blacklisted.

At the moment there is:

    \     'black': [
    \       'htmlH[0-9]',
    \       'markdown(Code|H[0-9]|Url|IdDeclaration|Link|Rule|Highlight[A-Za-z0-9]+)',
    \       'markdown(FencedCodeBlock|InlineCode)',
    \       'mkd(Code|Rule|Delimiter|Link|ListItem|IndentCode|Snippet)',
    \       'mmdTable[A-Za-z0-9]*',
    \     ],
    \     'white': [
    \      'markdown(Code|Link)',

... so it looks like markdownCodeBlock would be blacklisted and then whitelisted again. Perhaps the blacklist should be markdownCodeBlock and then the whitelist for markdownCode could be removed?

Porges commented 7 years ago

I'm also not seeing the fenced code blocks (with tpope's version) get blacklisted. This might be complicated because it supports nested syntax highlighting in fenced code blocks. Should I open a separate issue for this?

reedes commented 7 years ago

The intent of the odd whitelisting was to allow for unfenced inline code examples such as this to be wrapped via autoformat, or rather to avoid disabling of autoformat where they are present. But it's been a long time since I last visited that behavior. In addition, the syntax plugins may have changed to break the black/whitelists.

Attaching any examples to this issue that demonstrate undesirable behavior would be fine. I'll then try to reproduce in the next week or so. Thanks.