openSUSE / suse-vale-styleguide

Humble style guide for technical writers by a technical writer
GNU General Public License v3.0
21 stars 5 forks source link

The regex Action may be Required #104

Open alexvonme opened 3 weeks ago

alexvonme commented 3 weeks ago

We may need to implement regex action for several rules to maintain consistency and to provide accurate fixes. However, the VS Code extension which we link to, and is likely to be used by most people, doesn't yet support that action. The extension developer is in the process of switching to the language server, which can be tracked under ChrisChinchilla/vale-vscode#23.

I'm opening this issue to be closed when:

ccoVeille commented 3 weeks ago

I'm curious to see what could be the current need of using a regexp.

I can understand how it could be used to capture pattern and playing provide things by playing with $1 $2 .…

Do you have any real life example?

ccoVeille commented 3 weeks ago

Found this one about replacing snake case by kebab case in this post

ccoVeille commented 3 weeks ago

But I'm curious for any example you have

ccoVeille commented 3 weeks ago

Is there a reason to link ticket 45 in addition of 23 on vale VS Code extension ?

I'm just providing the number to do not link them, if I'm totally wrong 😅

alexvonme commented 3 weeks ago

I'd argue that a lot of swap options would be much better written with regex. Take any long list for swap with repeated words, such as the Contractions.yml file here, and you'll realize that a few simple rules with regex would be much cleaner and therefore easier to expand or maintain.

ccoVeille commented 3 weeks ago

Thanks for replying me. I get it now