errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.39k stars 148 forks source link

Text inside of back-ticks is being linted #874

Open dagardner-nv opened 1 month ago

dagardner-nv commented 1 month ago

Check for existing issues

Environment

Describe the bug / provide steps to reproduce it

Vale is reporting a linting error (8:104 error 's.T' should have one space. Microsoft.Spacing) for the text pandas.Timedelta. This issue has been observed with versions 3.6.1 and 3.7.0.

Full repro is available at: https://github.com/dagardner-nv/vale_spacing_test

README.md:

This is the smallest reproducible block of text that triggers the issue. Issue has been observed with versions 3.6.1 and 3.7.0

1. This stage keeps a moving window of logs on a per user basis
   * These logs are saved to disk to reduce memory requirements between logs from the same user
1. It repeats the necessary logs to properly calculate log dependent features.
   * To support all column feature types, incoming log messages can be combined with existing history and sent to downstream stages.

When `max_history` is a `str` it's assumed to represent a duration which is able to be parsed by `pandas.Timedelta`.

This issue only occurs when the text is preceded by the list, deleting any of the numbered or bullet items causes the issue to go away.

.vale.ini:

StylesPath = ci/vale/styles

MinAlertLevel = error

Packages = Microsoft

# Configs for markdown
[*{.md}]

BasedOnStyles = Vale, Microsoft
$ vale README.md 

 README.md
 8:104  error  's.T' should have one space.  Microsoft.Spacing 

✖ 1 error, 0 warnings and 0 suggestions in 1 file.
dagardner-nv commented 1 month ago

In addition to this, surrounding the offending sentence with <!-- vale off --> and <!-- vale on --> markers doesn't avoid the error, instead if I surround the list then it avoids the error.

This is the smallest reproducible block of text that triggers the issue. Issue has been observed with versions 3.6.1 and 3.7.0

<!-- vale off -->
1. This stage keeps a moving window of logs on a per user basis
   * These logs are saved to disk to reduce memory requirements between logs from the same user
1. It repeats the necessary logs to properly calculate log dependent features.
   * To support all column feature types, incoming log messages can be combined with existing history and sent to downstream stages.
<!-- vale on -->

When `max_history` is a `str` it's assumed to represent a duration which is able to be parsed by `pandas.Timedelta`.