errata-ai / Google

A Vale-compatible implementation of the Google Developer Documentation Style Guide.
MIT License
69 stars 23 forks source link

Google.Parens flags entire line if parenthesis contains a markdown link #30

Open rainecheck opened 1 year ago

rainecheck commented 1 year ago

Google.Parens triggers from the start of the line to the end of the line, if a link is included inside the parenthesis. Links outside of the parenthesis do not cause this. Triggers on both standard links, http://www.directlinks.example.com, and inline_links. Does not trigger for [text inside square brackets].

There is a prior line.
There is a prior sentence. Test sentence ([this](http://example.com)), please ignore. There is a following sentence.
There is a following line. When split across lines, it will only flag from the line itself.
It won't trigger for (text [inside square brackets] that aren't links)
An example of an ([inline_link][inline_links]).
An example of a (direct link: <http://www.example.com>)
andrewvaughan commented 8 months ago

I won't open another issue, but this also fails in Makefiles if you call any commands:

For example:

##
# Install dependencies for development
#
# Some of these changes may impact the Repository. Commit these changes if they occur.
#
dev-dependencies:
    $(call _title, Updating development dependencies)

    $(call _header, Updating prose style guide)
    echo
    rm -rf .config/linters/vale/styles/Google
    $(NPX) vale sync
    echo

Vale throws errors on all $( calls as well as calling the vale command calls; ideally it would only review comments (I'm having it ignore Makefiles altogether, for now):

 .config/make/50-build.mak
 27:3   suggestion  Use parentheses judiciously.   Google.Parens
 29:3   suggestion  Use parentheses judiciously.   Google.Parens
 31:25  error       Use 'Vale' instead of 'vale'.  Vale.Terms
 32:3   suggestion  Use parentheses judiciously.   Google.Parens
 32:9   error       Use 'Vale' instead of 'vale'.  Vale.Terms