Closed rickihastings closed 9 years ago
This appears to be because the string's have a dash in them, why is the regex not matching that?
The problem seems to be with the regex:
html: {
exec : "<!--[ \t]*@exec[ \t]*(([^\n-]*)[ \t]*\\(([^\n-]*)\\))[ \t]*-->",
}
The regex disallows hyphens in the parameters passed through to the exec function - is there a reason for this?
No this is imported from the @echo
regex. I guess we could allow the -
.
Hi,
I'm using the following string:
But the regex doesn't seem to correctly be picking this up, I can see that the function works and is correctly exposed. When I run this, the output is:
As you can see the last one is replaced, but the first two aren't. I did some digging and it appears some of the regex in https://github.com/jsoverson/preprocess/blob/master/lib/regexrules.js#L10 appears to be incorrect, it's only matching the last rule. I'm not sure if this is something I'm doing wrong though?