adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

Editor and Live Preview gets lines off with Complex Text Languages (CTL) like Thai #4099

Open raguay opened 11 years ago

raguay commented 11 years ago

I am using Brackets as my only Markdown editor now. But, I take notes in Thai and English. In the editor, the lines with Thai gets the cursor off. It forgets to count the characters that are above and below the other characters as not taking space. But, I am mostly pasting Thai and writing in English. But, for a native Thai, this would be unacceptable.

Once I convert my notes from Markdown to HTML and use Live Preview to edit the HTML, all edits are horribly wrong or not displayed at all. As it is, Live Preview is only usable with English like character sets, but does not work well at all if Thai is present.

jasonsanjose commented 11 years ago

Reviewed. Assigning to @jasonsanjose, low priority.

@raguay thanks for filing this bug. It would be helpful if you could provide some screenshots. Also, I'm not sure if that I understand your workflow. With live preview, Brackets currently only supports refreshing HTML files when saved. If your HTML file is dirty, those edits won't appear in the browser. We only support true live preview with CSS files.

Also, to be clear, there is a separate markdown extension here https://github.com/gruehle/MarkdownPreview that isn't installed by default. Are you using this extension?

raguay commented 11 years ago

Hi,

You can see what I mean here: https://www.evernote.com/shard/s250/sh/03ef1487-4282-45e1-aa5c-1df31d341f63/0a7b8071cca9bfe5415c6bc4dbba5afc

This is just the Brackets editor. This is without the markdown extension enabled. It is the same either way. What I do is work on my notes in Brackets which is Thai and English (but the majority is Thai). Once done, I will use TextSoap.app to convert the markdown to HTML and then copy back into Brackets and view the HTML in live mode to do some cleanup and CSS tweaking. Then I will print from the browser.

The pictures show the problem. The cursor is suppose to be at the end of the line, but it is far from the last character. If I backspace, the last Thai character is erased. This makes it impossible to edit the Thai in Brackets. I end up doing my editing of Thai using DevonThink, which handles it fine. I have had this issue in many web apps for Firefox as well and have given bug reports to them (mostly the SQLite Manager handling Thai data in the database). It is due to the cursor being forwarded for every character, but characters in a Complex Text Language (hence CTL) do not always push the cursor forward. The Unicode characters have flags for characters that do not increase the spacing, but Bracket is ignoring that flag.

For me, the issue is minor. But, it will never be adopted by a Thai audience because of these issues. Therefore, I thought I would bring it to your attention.

Richard

On Sat, Jun 8, 2013 at 4:05 AM, Jason San Jose notifications@github.comwrote:

Reviewed. Assigning to @jasonsanjose https://github.com/jasonsanjose, low priority.

@raguay https://github.com/raguay thanks for filing this bug. It would be helpful if you could provide some screenshots. Also, I'm not sure if that I understand your workflow. With live preview, Brackets currently only supports refreshing HTML files when saved. If your HTML file is dirty, those edits won't appear in the browser. We only support true live preview with CSS files.

Also, to be clear, there is a separate markdown extension here https://github.com/gruehle/MarkdownPreview that isn't installed by default. Are you using this extension?

— Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/4099#issuecomment-19132886 .