-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix search word splitter in JavaScript #3154
Conversation
3a5e061
to
9b19531
Compare
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Provides Python compatible word splitter to JavaScript | ||
|
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.
Could you add a comment like "DO NOT EDIT. This is generated by compat_regexp_generator.py."?
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.
done
@@ -0,0 +1,128 @@ | |||
# -*- coding: utf-8 -*- |
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.
Should this script be installed? What about move this into utils
directory of root directory?
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.
compat_regexp
is very vague for me.
What about jssplitter_generator
?
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.
done
LGTM with nits |
9b19531
to
441730f
Compare
LGTM! |
441730f
to
304f6d0
Compare
@@ -10,6 +10,7 @@ Bugs fixed | |||
* #3068: Allow the '=' character in the -D option of sphinx-build.py | |||
* #3074: ``add_source_parser()`` crashes in debug mode | |||
* #3135: ``sphinx.ext.autodoc`` crashes with plain Callable | |||
* #3150: Fix query word splitter in JavaScript. It behaves as same as Python's regular expressio. |
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.
"It behaves the same as Python's regular expression."
console.log("test splitting Emoji(surrogate pair) characters. It should keep emojis.") | ||
assert.deepEqual(['😁😁'], splitQuery('😁😁')); | ||
console.log(' ... ok\\n') | ||
|
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.
It'd be great to add a test with umlauts here, like:
console.log("test splitting umlauts. It should keep umlauts.")
assert.deepEqual(['Löschen', 'Prüfung', 'Abändern', 'ærlig', 'spørsmål'], splitQuery('Löschen Prüfung Abändern ærlig spørsmål'));
console.log(' ... ok\\n')
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.
I added. Thank you for your feedback.
LGTM! |
Okay, I will merge this tomorrow. |
412e1de
to
873fab5
Compare
Merged. Thank you always! |
Now I made code generator and it works as same as Python.
It fix #3150