summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-31 08:08:48 +0700
committerDaniil Baturin <daniil@baturin.org>2018-05-31 08:08:48 +0700
commita45c2404c964049f41789e7b46049c99c9daf211 (patch)
tree0c865663c4057dd66ffdb20331e26fc1d160c28f
parentd1927854401c2109f80fe858cfd69f3925e8c9a3 (diff)
downloadlibvyosconfig-a45c2404c964049f41789e7b46049c99c9daf211.tar.gz
libvyosconfig-a45c2404c964049f41789e7b46049c99c9daf211.zip
Trim comments strings to avoid adding extra whitespace.
-rw-r--r--parser/vyos1x_parser.mly2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/vyos1x_parser.mly b/parser/vyos1x_parser.mly
index f786c7a..80ed4df 100644
--- a/parser/vyos1x_parser.mly
+++ b/parser/vyos1x_parser.mly
@@ -35,7 +35,7 @@
(* If there are multiple comments before a node, consider the last one its real comment *)
comments:
- cs = list(COMMENT) { match cs with [] -> None | _ -> Some (List.rev cs |> List.hd) }
+ cs = list(COMMENT) { match cs with [] -> None | _ -> Some (List.rev cs |> List.hd |> String.trim) }
value:
| v = STRING