Skip to content
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

Support contenteditable better with \u00a0 characters #52

Closed
OscarGodson opened this issue May 20, 2012 · 2 comments
Closed

Support contenteditable better with \u00a0 characters #52

OscarGodson opened this issue May 20, 2012 · 2 comments

Comments

@OscarGodson
Copy link

As you know from my ticket, contneditables will convert spaces to \u00a0. From: http://www.fileformat.info/info/unicode/char/A0/index.htm

It's decomposition is actually a \u0020, or, a space. It'd be nice if Marked checked for both of those characters since they mean almost the same thing. I can't imagine someone wanting to keep a no-break space but convert spaces.

Thoughts?

@chjj
Copy link
Member

chjj commented May 20, 2012

I guess we should check for \u2424 as well? Are there any other weird unicode characters?

Probably fixed with this in block.lexer:

src = src.replace(/\u00a0/g, ' ');
src = src.replace(/\u2424/g, '\n');

@OscarGodson
Copy link
Author

Probably. I'd say whatever would be the expectation since I think almost everyone would be using this in some sort of automated fashion where special characters would make it in there depending on browser, platform, even language. This is for sure the best parser used to date and I've tried quite a few popular ones, so I respect your judgement on this stuff. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants