Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Separate the cmd prompt rule into two rules #39

Open
rohennes opened this issue Mar 3, 2023 · 1 comment
Open

Separate the cmd prompt rule into two rules #39

rohennes opened this issue Mar 3, 2023 · 1 comment

Comments

@rohennes
Copy link
Owner

rohennes commented Mar 3, 2023

Following on from #2 .

Should separate the cmd prompt rule into two rules

  • One rule check valid command prompts
  • New rule checks that example content is prepended with .Example output

Tricky bit is that some file contents are displayed using the terminal attribute. I think file contents shouldn't use the terminal attribute, possibly just [source]. If they do use the terminal attribute, it may incorrectly flag the cmd prompt rule.

@rohennes
Copy link
Owner Author

This is hard to separate.

The cmd prompt rule needs to be aware if there's an Example output heading before the code block.
The Example output rule needs to be aware if there's no cmd prompt at the start of the line in a code block.

So you essentially have the same regex for both rules, just different error messages. Because it's the same regex, the rules trigger in the exact same place, which isn't ideal. And it's usually either one problem or the other, not both.

image

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

No branches or pull requests

1 participant