vale icon indicating copy to clipboard operation
vale copied to clipboard

Text inside of back-ticks is being linted

Open dagardner-nv opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Environment

  • Linux, Debian 12.6
  • Conda
  • 3.6.1 & 3.7.0

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 avatar Jul 24 '24 16:07 dagardner-nv

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`.

dagardner-nv avatar Jul 24 '24 16:07 dagardner-nv

This should be fixed now.

jdkato avatar Mar 02 '25 08:03 jdkato

@jdkato Thanks, what version of vale was this fix released into?

dagardner-nv avatar Mar 04 '25 15:03 dagardner-nv