You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is actually working properly.
But I notice that some expressions doesn't work. If I use something like words: ['([a-z]+ ){1,}'] won't work. I realize it is because of the "(" and ")". The code will fire window.console.error('Cannot process: ' + match);
If I use words: ['([a-z]+ ){1,}'] then matches.length = 3 which will never be processed since the code only accepts lengths of 2 and 4.
I tried changing your code to if (match.length === 2 || match.length === 3) this will style the content but will set the caret at the begginng :(
Could you explain please a little bit more about this hack and why sometimes it outputs 3 matches? Do you think I should change some parts of your code in order to use regex explessions instead of words?
The text was updated successfully, but these errors were encountered:
medium-editor-auto-style-extension/src/auto-style.js
Line 222 in dc51b9a
First of all thanks for this repository 👍
I am trying to use your package using regex expressions instead of words. Something like:
It is actually working properly.
But I notice that some expressions doesn't work. If I use something like
words: ['([a-z]+ ){1,}']
won't work. I realize it is because of the "(" and ")". The code will firewindow.console.error('Cannot process: ' + match);
If I use
words: ['([a-z]+ ){1,}']
thenmatches.length = 3
which will never be processed since the code only accepts lengths of 2 and 4.I tried changing your code to
if (match.length === 2 || match.length === 3)
this will style the content but will set the caret at the begginng :(Could you explain please a little bit more about this hack and why sometimes it outputs 3 matches? Do you think I should change some parts of your code in order to use regex explessions instead of words?
The text was updated successfully, but these errors were encountered: