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:
parent
feb0a31bba
commit
7cde51e884
@ -67,7 +67,7 @@ fn handle_token(s: &str) -> nom::IResult<&str, Token> {
|
|||||||
|
|
||||||
/// classify handle based on leading character
|
/// classify handle based on leading character
|
||||||
fn classify_handle(s: &str) -> Token {
|
fn classify_handle(s: &str) -> Token {
|
||||||
let start = s.trim();
|
let start = s.trim_start_matches('{').trim();
|
||||||
if start.len() < 2 {
|
if start.len() < 2 {
|
||||||
return Token::Replacement(start);
|
return Token::Replacement(start);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user