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

CriticMarkup not working inside some highlighting elements #1

Open
thriveth opened this issue Sep 12, 2014 · 13 comments
Open

CriticMarkup not working inside some highlighting elements #1

thriveth opened this issue Sep 12, 2014 · 13 comments
Labels

Comments

@thriveth
Copy link

Best way to illustrate the issue is by this screenshot:

Screenshot

I don't know if this is a vim-pandoc or a vim-criticmarkup issue, so I'm posting it here.

@fmoralesc
Copy link
Member

It was a problem here. Just pushed a fix to master.

@thriveth
Copy link
Author

I don't know if this is a feature or a bug, but it also does not work inside YAML blocks, like e.g. the abstract.

@fmoralesc
Copy link
Member

I'll call that "undefined behavior"... Just pushed a fix to master.

@fmoralesc
Copy link
Member

Feel free to tell me if it doesn't work with other stuff. I'll reopen the issue just in case.

@fmoralesc fmoralesc reopened this Sep 12, 2014
@fmoralesc fmoralesc changed the title CriticMarkup not working inside Pandoc description lists. CriticMarkup not working inside some highlighting elements Sep 12, 2014
@thriveth
Copy link
Author

I just updated, and it is indeed fixed in definition lists, but still not working in YAML front matter block (specifically abstract).

@fmoralesc
Copy link
Member

Can you tell me what is the output of

:echo synIDattr(synID(line('.'), col('.'), 1), "name")

when the cursor is in the text that needs to be highlighted?

@thriveth
Copy link
Author

Yes, that is yamlPlainScalar. If I enclose it in quotes (which for other reasons is a bad idea for a multiline string in YAML), the result is yamlFlowString.

@fmoralesc
Copy link
Member

Thanks, I pushed the required change to master.

@thriveth
Copy link
Author

That seems to have broken something. It works partially, but breaks subsequent parsing of the Pandoc file:
selection_004

If I remove the CM tags, it works fine:

selection_005

@fmoralesc
Copy link
Member

I think it's an issue with the YAML syntax, with a small tweak (now in master) I have this:

captura de pantalla de 2014-09-12 21 25 22

What YAML syntax file are you using? I'm using this one

@thriveth
Copy link
Author

I use whatever vim-pandoc uses.
Here's what it looks like here after the latest update.

selection_006

Observation: After having inserted some more CM here, the highlight got messed up further down the pandoc MD document, but only until I ran the cursor down through the lines. This didn't happen before.

@thriveth
Copy link
Author

Also: If I enclose the string in quotes, the weirdness seems to go away.

@thenerdlawyer
Copy link

I'm having this issue as well. Numbered lists fail when filetype=pandoc, but not when filetype=markdown.
Criticmarkup shows up fine in normal text regardless of filetype.

Numbered & bulleted lists and block quotes look like this when filetype=markdown:
screen shot 2015-09-22 at 12 16 56 pm

But like this when filetype=pandoc:
screen shot 2015-09-22 at 12 07 04 pm

@alerque alerque added the bug label Mar 8, 2016
fmoralesc pushed a commit that referenced this issue Aug 23, 2017
Merging fixes added by balachia/vim-criticmarkup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants