feat: allow using : or = as a delimiter #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This might not be what you want to do for this specific module, but I figured I would ask.
I changed the regular expression to look for anything that is not a space or ":" or "=", basically would work the same way but also would take into account keys that have dots or any other type of characters in the key, not only words:
Screenshots
Important
My only question is if patterns are applied as FIFO, in other words, if the first pattern matched a comment, will it just skip the rest, or will it also match for keyword.
This is because with my regular expression ^\s*([^\\s:=]+), this also matches a comment. It basically matches any characters after spaces and then stops if a space or ":" or "=" is found.
Edge cases
The only problem I see is edge cases like these where there is some manual word-wrap: