Support backslash at the end of a macro.
This commit is contained in:
parent
db3086743c
commit
214e895d85
@ -10,6 +10,7 @@ use nom::multi::separated_list0;
|
||||
|
||||
use super::org_source::OrgSource;
|
||||
use super::Context;
|
||||
use crate::error::CustomError;
|
||||
use crate::error::Res;
|
||||
use crate::parser::object::OrgMacro;
|
||||
use crate::parser::parser_with_context::parser_with_context;
|
||||
@ -86,6 +87,11 @@ fn org_macro_arg<'r, 's>(
|
||||
}
|
||||
if next_char == '\\' {
|
||||
escaping = true;
|
||||
if peek(tag::<_, _, CustomError<_>>(")"))(new_remaining).is_ok() {
|
||||
// Special case for backslash at the end of a macro
|
||||
remaining = new_remaining;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if next_char == ',' || next_char == ')' {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user