knqyf263 / pet

Simple command-line snippet manager
MIT License
4.44k stars 223 forks source link

fix regexp match and add test #224

Closed oslivan closed 7 months ago

oslivan commented 1 year ago

SearchForParams function will be fine in most of case, but the following text won't work.

# command 
cat <<EOF > <file=path/to/file>
EOF

In general, the param name must be characters, so I replaced \S to \w, and the unit test was submitted.

RamiAwar commented 7 months ago

It seems like this is fixed in another PR! Here's your test with the current regex pattern:

image
RamiAwar commented 7 months ago

I like the test however, will add that in in a separate PR :)