From a45c2404c964049f41789e7b46049c99c9daf211 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 31 May 2018 08:08:48 +0700 Subject: Trim comments strings to avoid adding extra whitespace. --- parser/vyos1x_parser.mly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parser') 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 -- cgit v1.2.3