-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Allow searching for number-number on two lines #19324
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
Conversation
When a dash separates two digits, it's very likely to not be a hyphen inserted to split a word into two lines (e.g. "par\n-ser"), but rather either a minus sign, a range, or a date. For example, in the tracemonkey PDF there is `2008-02` (a date) split across two lines. Preserving the dash, similarly to how we do for compound words, allows searches for "2008-02" to find a match.
1286f30
to
8358ab6
Compare
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/4491bd3f7e08e1d/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b332744a1d3841d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/b332744a1d3841d/output.txt Total script time: 2.36 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/4491bd3f7e08e1d/output.txt Total script time: 6.95 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, thank you.
I was originally going for a more complex regexp that checks for "letter"+"diacritics"+"dash"+"newline"+"letter", but if there are diacritics it's already very likely that they are preceded by a letter so the existing
(\\p{M}+(?:-\\n)?)
is good enough.