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

Create a Vale rule that highlights when an unescaped backslash is at the end of a line in a code block #857

Open
aireilly opened this issue Aug 9, 2024 · 1 comment
Labels
AsciiDoc Issues with the AsciiDoc rule set only high priority OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only

Comments

@aireilly
Copy link
Member

aireilly commented Aug 9, 2024

[source,terminal]
----
$ move C:\path\to\kn-workflow.exe C:\Program Files\
----

End of line backslashes in codeblocks cause a fatal error in asciibinder.

@aireilly aireilly added AsciiDoc Issues with the AsciiDoc rule set only OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only labels Aug 9, 2024
@aireilly
Copy link
Member Author

aireilly commented Oct 29, 2024

Maybe

---
extends: existence
scope: raw
level: error
message: "Unescaped trailing backslash detected in codeblock."
action:
  name: remove
raw:
  - '(?<!^----\n.*\n*\w*)(?<!\\)\\\n'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsciiDoc Issues with the AsciiDoc rule set only high priority OpenShiftAsciiDoc Issues with the OpenShiftAsciiDoc rule set only
Projects
None yet
Development

No branches or pull requests

1 participant