From dca4c76226b4939ed490e47841e4acc8a8d6be95 Mon Sep 17 00:00:00 2001 From: Reda Al Sulais Date: Mon, 6 Nov 2023 19:02:39 +0300 Subject: [PATCH] enhance `title`, `accTitle`, and `accDescr` regexes --- packages/parser/src/language/common/common.langium | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/parser/src/language/common/common.langium b/packages/parser/src/language/common/common.langium index baf933e0fc4..7989de19318 100644 --- a/packages/parser/src/language/common/common.langium +++ b/packages/parser/src/language/common/common.langium @@ -13,9 +13,9 @@ fragment EOL returns string: ; terminal NEWLINE: /\r?\n/; -terminal ACC_DESCR: /accDescr([\t ]*:[^\n\r]*(?=%%)|\s*{[^}]*})|accDescr([\t ]*:[^\n\r]*|\s*{[^}]*})/; -terminal ACC_TITLE: /accTitle[\t ]*:[^\n\r]*(?=%%)|accTitle[\t ]*:[^\n\r]*/; -terminal TITLE: /title([\t ][^\n\r]*|)(?=%%)|title([\t ][^\n\r]*|)/; +terminal ACC_DESCR: /[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/; +terminal ACC_TITLE: /[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/; +terminal TITLE: /[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/; hidden terminal WHITESPACE: /[\t ]+/; hidden terminal YAML: /---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/;