Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
argl committed Nov 1, 2024
2 parents f045953 + dbb6d42 commit a8a184c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions crates/rari-doc/src/templ/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ pub enum Token {

fn to_arg(pair: Pair<'_, Rule>) -> Option<Arg> {
match pair.as_rule() {
Rule::single_quoted_string => pair.into_inner().next().and_then(to_arg),
Rule::double_quoted_string => pair.into_inner().next().and_then(to_arg),
Rule::backquoted_quoted_string => pair.into_inner().next().and_then(to_arg),
Rule::sq_string => {
let s = pair.as_span().as_str();
Some(Arg::String(
Expand Down
6 changes: 3 additions & 3 deletions crates/rari-doc/src/templ/rari-templ.pest
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ bq_char = {
dq_string = @{ (!("\"") ~ dq_char )* }
sq_string = @{ (!("\'") ~ sq_char )* }
bq_string = @{ (!("`") ~ bq_char )* }
double_quoted_string = _{ "\"" ~ dq_string ~ "\""}
single_quoted_string = _{ "\'" ~ sq_string ~ "\'"}
backquoted_quoted_string = _{ "`" ~ bq_string ~ "`"}
double_quoted_string = ${ "\"" ~ dq_string ~ "\""}
single_quoted_string = ${ "\'" ~ sq_string ~ "\'"}
backquoted_quoted_string = ${ "`" ~ bq_string ~ "`"}

string = _{
double_quoted_string |
Expand Down

0 comments on commit a8a184c

Please sign in to comment.