updated regexp

now supports ; comments
This commit is contained in:
Schrottkatze 2021-12-16 21:12:44 +01:00
parent 4ab1565f9d
commit 0eed22213f
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ use fancy_regex::Regex;
pub fn preprocess(raw_code: String) {
lazy_static! {
static ref COMMENT_RE: Regex = Regex::new(r"(\]\].*?\[\[|&&.*\n|``(.|\n)*?´´)").unwrap();
static ref COMMENT_RE: Regex = Regex::new(r"(\]\].*?\[\[|&&.*\n|;.*\n|``(.|\n)*?´´)").unwrap();
}
let code = COMMENT_RE.replace_all(&raw_code, "");