Allow escaping of - and .

This commit is contained in:
Laurenz 2022-02-10 13:17:29 +01:00
parent 624471db61
commit 5965515a1e
3 changed files with 4 additions and 1 deletions

View File

@ -248,7 +248,7 @@ impl<'s> Tokens<'s> {
// Parenthesis and hashtag.
'[' | ']' | '{' | '}' | '#' |
// Markup.
'*' | '_' | '=' | '~' | '`' | '$' => {
'~' | '*' | '_' | '`' | '$' | '=' | '-' | '.' => {
self.s.eat_assert(c);
NodeKind::Escape(c)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -24,6 +24,9 @@
// Some code stuff in text.
let f() , ; : | + - /= == 12 "string"
// Escaped dot.
10\. May
---
// Unicode codepoint does not exist.
// Error: 1-11 invalid unicode escape sequence