-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anchors #74
Comments
@rschwass Could you write up a spec for reproducing your paint point? |
First run of an old app under sinatra v2, exciting!
I find I've wrapped a lot of path patterns in anchors.
I update all of the above to use
Using anchors is good practice with regex but Mustermann is new to me. If it does deal with it then I'm fine, it's just good to know or not. Regards, |
Mustermann will insert them for you. The reason it insists on not having them in there is to allow pattern concatenation without having to rewrite the regular expression (which might be faulty). |
@rkh Okay, that makes sense. Thanks. |
That is a really good point I never thought of before, perhaps this should go in the docs if it's not already! |
sinatra/mustermann#74 Signed-off-by: Thore Bödecker <[email protected]>
If I dont set anchors and the option to ignore checking for them, is mustermann automatically putting them in at the beginning and end of my route like in sinatra i do:
get %r{/stuff/([0-9a-f]{32})}i
is that the same as
get %r{\A/stuff/([0-9a-f]{32})\z}i, :mustermann_opts => { :type => :regexp, :check_anchors => false}
How do I know where mustermann is applying the anchors without specifically setting them?
The text was updated successfully, but these errors were encountered: