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
I was just going through cleaning up my version of this code that I ported to C# and noticed a possible problem with the way the trie data is generated for the line break data.
Seems this code is trying to coalesce consecutive ranges with the same class into a single trie.setRange call. The problem is that it's checking for a change of class, but not that the ranges are consecutive and without gaps.
Also, it seems the UnicodeTrieBuilder already coalesces runs so this isn't even necessary. I reduced it to this:
varre=/^([0-9A-F]+)(?:\.\.([0-9A-F]+))?\s*;\s*(.*?)\s*#/gmvarm;while(m=re.exec(data)){varfrom=parseInt(m[1],16);varto=m[2]===undefined ? from : parseInt(m[2],16);varprop=m[3];lineBreakClassesTrie.setRange(from,to,LineBreakClass[prop],true);}
Unfortunately none of this resolves any of those 30 non-passing tests.
The text was updated successfully, but these errors were encountered:
I was just going through cleaning up my version of this code that I ported to C# and noticed a possible problem with the way the trie data is generated for the line break data.
See this line of code
linebreak/src/generate_data.js
Line 31 in 9096a22
Seems this code is trying to coalesce consecutive ranges with the same class into a single trie.setRange call. The problem is that it's checking for a change of class, but not that the ranges are consecutive and without gaps.
Shouldn't that line read something like this:
Also, it seems the UnicodeTrieBuilder already coalesces runs so this isn't even necessary. I reduced it to this:
Unfortunately none of this resolves any of those 30 non-passing tests.
The text was updated successfully, but these errors were encountered: