updated regexp
now supports ; comments
This commit is contained in:
parent
4ab1565f9d
commit
0eed22213f
2 changed files with 3 additions and 3 deletions
|
@ -27,12 +27,12 @@
|
||||||
&& € means false
|
&& € means false
|
||||||
|
|
||||||
&& == is implied in if conditions
|
&& == is implied in if conditions
|
||||||
|
; test comment
|
||||||
&& = is equal to ===
|
&& = is equal to ===
|
||||||
|
|
||||||
&& if condition is true log the text
|
&& if condition is true log the text
|
||||||
¿??$/condition\ | (
|
¿??$/condition\ | (
|
||||||
¡<=/"condition was true"!
|
¡<=/"condition was true"!; hello test
|
||||||
)?
|
)?
|
||||||
|
|
||||||
&& if condition is false log the text
|
&& if condition is false log the text
|
||||||
|
|
|
@ -3,7 +3,7 @@ use fancy_regex::Regex;
|
||||||
|
|
||||||
pub fn preprocess(raw_code: String) {
|
pub fn preprocess(raw_code: String) {
|
||||||
lazy_static! {
|
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, "");
|
let code = COMMENT_RE.replace_all(&raw_code, "");
|
||||||
|
|
Loading…
Reference in a new issue