-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[#877] Fix for error in PFW when bullets use special char #902
Conversation
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.
@@ -1085,7 +1085,8 @@ | |||
symbol = element.attributes[ 'cke-symbol' ]; | |||
|
|||
element.forEach( function( node ) { | |||
if ( !removed && node.value.match( symbol.replace( ')', '\\)' ).replace( '(', '' ) ) ) { | |||
// Changing `match` -> `indexOf`, symbol is String not RegExp (#877). |
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.
This comment is true, however if you look at the match
docs:
A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj)...
which means it can be used with a String too. I assume what was the intention of this comment, but maybe it will be better to put here something like:
Since symbol may contains special characters we use simple
indexOf
instead of RegExp which is sufficient (#877).
|
||
---- | ||
1. Open browser console. | ||
1. Open [file](../generated/_fixtures/Unordered_list_special_char_bullet/Unordered_list_special_char_bullet.docx) in Word. |
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.
Maybe you can put file name here as a link [Unordered_list_special_char_bullet.docx](...)
?
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.
LGTM 👍
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
yes
This PR contains
What changes did you make?
Close #877