basis-template
basis-template copied to clipboard
Fix handling of code span delimiters {{ }}
This breaks the tokenizer:
{{ map = {}}}
Paranthesis need to be properly matched in the tokenizer. When encountering {{ we search for the closing }}. If we encounter an unescaped { along the way, we need to match it with a corresponding closing }. Curlies can be arbitrarily nested, a simple stack can keep track of opening and closing curlies.