Tokens may contain any character, including a } at its end. The current parser to detect tokens greedily picks up the sequence }}, which does not include any number of trailing } which would actually end the token. For example, given {{{ a }}}, the parser would detect the token as { a, and leave a trailing } on the line, when the actual token is { a }.
This PR modifies our regex so that we include any number of } characters greedily before our final }} that closes the token, so that we force the final }} as our token closure. This looks like it handles both examples given in #184 as expected, and a quick look did not show any pages as looking abnormal.
Fixes #184
Tokens may contain any character, including a
}
at its end. The current parser to detect tokens greedily picks up the sequence}}
, which does not include any number of trailing}
which would actually end the token. For example, given{{{ a }}}
, the parser would detect the token as{ a
, and leave a trailing}
on the line, when the actual token is{ a }
.This PR modifies our regex so that we include any number of
}
characters greedily before our final}}
that closes the token, so that we force the final}}
as our token closure. This looks like it handles both examples given in #184 as expected, and a quick look did not show any pages as looking abnormal.