You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs don't cover matching comments. It seems like there is support and I was able to reverse-engineer a bit of it, but wasn't able to figure out how to match comments with a specific format (e.g. TODO\((.*)\) where the capture group is a bug identifier).
`// TODO` matches only comments whose text is exactly "TODO"
`// TODO$_` matches all comments whose prefix is "TODO"
`// r"TODO"`, `// r"TODO.*"`, `r"// TODO"`, `r"// TODO.*"`, `// TODO.*`, and `// TODO*` don't match anything
The text was updated successfully, but these errors were encountered:
By default, Grit treats block comments as different from line comments - since sometimes you want to transform one into the other. We can consider adding an equivalence class, but if you use the AST node it works well.
This should do what you want:
engine marzano(0.1)
language js
string(fragment="str")
I'm unable to replicate your concern with AST nodes:
The docs don't cover matching comments. It seems like there is support and I was able to reverse-engineer a bit of it, but wasn't able to figure out how to match comments with a specific format (e.g.
TODO\((.*)\)
where the capture group is a bug identifier).`// TODO`
matches only comments whose text is exactly "TODO"`// TODO$_`
matches all comments whose prefix is "TODO"`// r"TODO"`
,`// r"TODO.*"`
,`r"// TODO"`
,`r"// TODO.*"`
,`// TODO.*`
, and`// TODO*`
don't match anythingThe text was updated successfully, but these errors were encountered: