fix lexing inline sequences/mappings with trailing whitespaces
This commit is contained in:
parent
b562a54e53
commit
66bc898f61
|
@ -741,11 +741,11 @@ class Parser
|
|||
|
||||
try {
|
||||
if ('' !== $value && '{' === $value[0]) {
|
||||
$cursor = \strlen($this->currentLine) - \strlen($value);
|
||||
$cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value));
|
||||
|
||||
return Inline::parse($this->lexInlineMapping($cursor), $flags, $this->refs);
|
||||
} elseif ('' !== $value && '[' === $value[0]) {
|
||||
$cursor = \strlen($this->currentLine) - \strlen($value);
|
||||
$cursor = \strlen(rtrim($this->currentLine)) - \strlen(rtrim($value));
|
||||
|
||||
return Inline::parse($this->lexInlineSequence($cursor), $flags, $this->refs);
|
||||
}
|
||||
|
|
Reference in New Issue