Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot have newline in a delimiter #405

Open
lukelbd opened this issue Nov 19, 2019 · 1 comment
Open

Cannot have newline in a delimiter #405

lukelbd opened this issue Nov 19, 2019 · 1 comment

Comments

@lukelbd
Copy link

lukelbd commented Nov 19, 2019

In RST, the proper way to comment out lines is by prefixing them with a .. followed by a newline and two spaces:

..
  This is a comment.
  It will not appear in the document.

The default NERDComment behavior just prefixes this with .., i.e.

.. This *might* be a comment.

but this behavior is discouraged, since RST will "interpret" the comment if it starts with a particular keyword.

I tried setting

let g:NERDCustomDelimiters = {'rst': {'left': "..\n  "}}

but that ends up replacing the newline with a null character ^@.

Is there a way to get NERDCommenter to respect delimiters with newline characters / to propertly comment out RST text?

@alerque
Copy link
Member

alerque commented Nov 26, 2019

I'm sorry I've been out of town until for a while. That being said I don't actually know the answer to this. You probably want to configure the "sexy" comment style instead of the regular one because this is going to be a multi-line pattern issue, but I'm not sure exactly what it should be configured too...

If anybody has suggestions or wants to work on this I'd be happy to review a PR that setup better handling for RST comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants