Handle escaped separators in split()#128
Conversation
LeaVerou
left a comment
There was a problem hiding this comment.
I think since escaped colons are an older bug, they should remain separate. For the exports, I'm not sure this is the right fix. Can you commit the JSdoc fixes directly to types-refactor and slim this PR down to the colon handling fix?
Co-Authored-By: Dmitry Sharabin <dmitrysharabin@gmail.com>
Done |
12de338 to
14df9c8
Compare
Done. After the type refactors PR is landed, we'll retarget it to the |
14df9c8 to
6eddbf4
Compare
✅ Deploy Preview for nude-element ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
LeaVerou
left a comment
There was a problem hiding this comment.
I think instead of handling this ad hoc, parseEntries() should be using split() which I believe handles escapes already (and if it doesn't, it should).
6eddbf4 to
3a603b4
Compare
Summary
split()honors\<sep>as an escaped separator: not split on, and the backslash is stripped from the yielded part.MapType.parseEntries()uses it for:-splitting.Test plan
npx htest test/split.js --cinpx htest test/PropType.js --ci