-
Notifications
You must be signed in to change notification settings - Fork 59
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
Changing the module context rule as it doesn't highlight anything in VS Code #658
Changing the module context rule as it doesn't highlight anything in VS Code #658
Conversation
⚡️ Deploying PR Preview... |
//add a newline, it might be missing | ||
scope += "\n" | ||
|
||
context_regex := ":_content-type:(\\s)?(CONCEPT|SNIPPET|ASSEMBLY|PROCEDURE|REFERENCE)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure the variable needs precisely one space after the variable name or AsciiDoctor complains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context_regex := ":_content-type:(\\s)?(CONCEPT|SNIPPET|ASSEMBLY|PROCEDURE|REFERENCE)" | |
context_regex := "^:_(mod-docs-)?content-type:\\s+(CONCEPT|SNIPPET|ASSEMBLY|PROCEDURE|REFERENCE)" |
The modular-docs
project recently changed the names of the attributes identifying the module type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jhradilek - I don't think OpenShift have yet implemented this change, but when it does, I will need to update this rule. (This rule set is OpenShift specific)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure the variable needs precisely one space after the variable name or AsciiDoctor complains
Updated. Does this work @aireilly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO - if there is a failing on the VS Code plugin side, I would prefer to see that corrected rather than working around it with this update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created ChrisChinchilla/vale-vscode#14
191fc5a
to
bea7e17
Compare
13c3461
to
c74cbde
Compare
…VS Code. Using tengo you can highlight first line.
c74cbde
to
849a0b3
Compare
The rule to check for the presence of the :_content-type: in a module works but it doesn't show any line highlighting in VS Code. It only show the error on the cmd line.
This PR changes the rule to a tengo script, which highlights the first line of the file if it doesn't find the variable.