ignore extra { chars in replacement

This will still show a trailing } with {{{field}}}, but will at
least show the field content instead of 'unknown field'.
This commit is contained in:
Damien Elmes 2020-01-11 18:02:24 +10:00
parent feb0a31bba
commit 7cde51e884

View File

@ -67,7 +67,7 @@ fn handle_token(s: &str) -> nom::IResult<&str, Token> {
/// classify handle based on leading character
fn classify_handle(s: &str) -> Token {
let start = s.trim();
let start = s.trim_start_matches('{').trim();
if start.len() < 2 {
return Token::Replacement(start);
}