-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Dash in front-matter keys breaks the syntax highlighting of the title #1595
Comments
Thanks for reporting this. I'm trying to reproduce it locally, but yet without success, so I might be missing something. Some additional information might help:
I don't agree that the level 0 section warning is expected with the example you provided: While only a book is allowed to have multiple level 0 sections, an article is allowed to have a title which looks basically the same. As long as there is only a title, then there shouldn't be a warning. This is what I see: |
The next version of the plugin will use a better heuristic to recognize YAML in the frontmatter. I'll update this issue once a pre-release is available. |
Thanks!! |
Plugin-version 0.41.14 is now available with a fix. It should be available from the JetBrains markeplace soon. The it is also available from GitHub releases. |
Observed vs. expected behavior
When using frontmatter, the title is not highlighted in the editor (it's black). This makes it look like you're doing it wrong -- but you're doing it exactly right.
I expect it to be Blue, like it is without frontmatter.
Additionally, like the VS Code asciidoc plugin, I would expect squiggly error-lines and the "level 0 sections can only be used when doctype is book" error when the asciidoc is incorrect.
Steps to reproduce
Correct frontmatter, incorrect highlighting:
In the document below, blue highlighting of title makes it look correct, but this is incorrect asciidoc for non-book doctype (
"asciidoctor: ERROR: ../myfile.adoc: line 0: level 0 sections can only be used when doctype is book"
)Environment
Plugin Version: 0.41.13
IntelliJ Details: IntelliJ IDEA 2023.3.5 (Ultimate Edition) Build #IU-233.14808.21, built on March 12, 2024
The text was updated successfully, but these errors were encountered: