Skip to content

Commit

Permalink
chore(craft-macros): fix REGEX_STR
Browse files Browse the repository at this point in the history
  • Loading branch information
andeya committed Sep 29, 2024
1 parent d6e6988 commit 7aa26c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/craft-macros/src/craft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) fn generate(input: Item) -> syn::Result<TokenStream> {
}
}

const REGEX_STR: &'static str = r#"(?s)#\s*\[\s*(::)?\s*([a-zA-z][a-zA-z0-9]*\s*::\s*)*\s*craft\s*\(\s*(?P<name>handler|endpoint)\s*(?P<content>\(.*\))?\s*\)\s*\]"#;
const REGEX_STR: &'static str = r#"(?s)#\s*\[\s*(::)?\s*([A-Za-z_][A-Za-z0-9_]*\s*::\s*)*\s*craft\s*\(\s*(?P<name>handler|endpoint)\s*(?P<content>\(.*\))?\s*\)\s*\]"#;

fn take_method_macro(item_fn: &mut ImplItemFn) -> syn::Result<Option<Attribute>> {
let mut index: Option<usize> = None;
Expand Down

0 comments on commit 7aa26c8

Please sign in to comment.