From 44616813ea32f7eba163b08d30c16b81ebebfd7c Mon Sep 17 00:00:00 2001 From: Todd Lewis Date: Sun, 7 May 2017 20:48:58 -0400 Subject: [PATCH] handle comment in plain scalars --- yaml.jsf | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/yaml.jsf b/yaml.jsf index 0ebe7e0..9d88635 100644 --- a/yaml.jsf +++ b/yaml.jsf @@ -23,15 +23,11 @@ "#" line_comment recolor=-1 " " line_start -:maybe_idlecomment Comment - * idle noeat - "#" line_comment recolor=-1 - :idle Constant * plain_scalar noeat "\n" line_start - " " maybe_idlecomment "%" directive recolor=-1 + " " maybe_idle_comment "'" string_sq_1 recolor=-1 "\"" string_dq_1 recolor=-1 "{[]}" brace recolor=-1 @@ -43,6 +39,7 @@ * plain_scalar "\t" bad_tab recolor=-1 "\n" line_start noeat + " " maybe_plain_scalar_comment :maybe_key Idle * maybe_key1 recolor=-1 mark @@ -66,6 +63,14 @@ :bad_tab BadTab * line_start noeat +:maybe_plain_scalar_comment Comment + * plain_scalar noeat + "#" line_comment + +:maybe_idle_comment Comment + * idle noeat + "#" line_comment + :line_comment Comment * line_comment "\n" line_start