spacepluk / weechat-biditext

Use fribidi to handle RTL text on Weechat
1 stars 3 forks source link

Correct paragraph direction detection. #6

Closed tasn closed 8 years ago

tasn commented 9 years ago

The paragraph direction is an important part of the BiDi algorithm. Before this patch, the paragraph direction was hard-coded to LTR which meant some text was not presented correctly.

This patch fixes that by attempting to find the separator between the nick and the message (it assumes it's a tab, I don't know if this can be anything else) and then only reorders the message, while letting it automatically detect the paragraph direction for it.

BiDi text now shows correctly. An example text to illustrate the issue: A (1) (A being a bidi character) would be printed as: 1) A) Instead of: (1) A

tasn commented 9 years ago

Ping

tasn commented 8 years ago

Ping?

spacepluk commented 8 years ago

woah, sorry I completely missed this PR.

tasn commented 8 years ago

No worries.

I was just following up on my pull requests and saw this one was still open. :)