From c52ba3b6d90382792eb182092f6e5ff49fa097c6 Mon Sep 17 00:00:00 2001 From: Midgard Date: Sat, 29 Feb 2020 22:26:17 +0100 Subject: [PATCH] Stop parsing names at comment marker --- app/hlds/hlds.tatsu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/hlds/hlds.tatsu b/app/hlds/hlds.tatsu index 6bc8e0d..b4d47b8 100644 --- a/app/hlds/hlds.tatsu +++ b/app/hlds/hlds.tatsu @@ -29,8 +29,8 @@ location = >location_header items:{ block } ; attributes = - name:/[^\n]*?(?= +-- | +:: | +€ |\n)/ - [ s '--' ~ s description:/[^\n]*?(?= +:: | +€ |\n)/ ] + name:/[^\n#]*?(?= +-- | +:: | +€ | *\n| *#)/ + [ s '--' ~ s description:/[^\n#]*?(?= +:: | +€ | *\n| *#)/ ] [ s '::' {s ('{' tags+:identifier '}')} ] [ [ s '::' ~ ] s price:price ] ; @@ -78,7 +78,7 @@ n = '\n' {{'\t'} '\n'} ; @name identifier = /[a-z0-9_-]+/ ; -string = /[^\n]+/ ; +string = /[^\n#]+/ ; choice_type = 'single_choice' | 'multi_choice' ; int = /[0-9]+/ ;