Since I thoroughly looked through the snippet extractor docs recently (see this forum thread), I noticed a few errors in the extended mode docs.
I might just be misunderstanding the syntax somehow, but I double-checked and I think there’s some issues with the examples:
- The example on lines 55-58 has
Somein the result, but wouldn’t10 + 20remain instead after the#rule is applied? - The examples in the multiline modifier section seem to be missing the closing
/for the multiline comment rules. The first example still works without it, but in the second example, the result would have a slash at the beginning: “/ const n = 15;”. - The first example in the examples section does have the closing
/, but it seems to have some stray characters (?\) after the multiline modifier (-->>). - For the last example, wouldn’t the rule need the
\pmodifier to match###[More Doc]###?
There also seems to be a few typos:
- The ellipsis on line 19 has two dots (
..) instead of three (...). - On line 28, “forces the parse to” seems like it should be “forces the parser to”.
- On line 45, “Unlike the basic version rules apply to” is missing a comma: “Unlike the basic version, rules apply to”.