bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19801: 25.0.50; eww uses incorrect base paragraph direction displayi


From: Lars Ingebrigtsen
Subject: bug#19801: 25.0.50; eww uses incorrect base paragraph direction displaying Wikipedia "Languages"
Date: Fri, 25 Dec 2015 07:46:09 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> To reproduce:
>
>  emacs -Q
>  M-x eww RET http://en.wikipedia.org/wiki/Ocelot RET
>  C-s Languages
>
> This scrolls to near the end of the page, where we are shown the list
> of other languages in which this page is available.  Observe that the
> list of languages is displayed as R2L text, flushed all the way to the
> right edge of the window.
>
> This happens because the first language in the list is Arabic, written
> in the Arabic script, so Emacs decides that the following paragraph
> has a R2L base direction.  And since there are no empty lines between
> the languages, the whole list is then displayed as a single R2L
> paragraph.

Yup.

> I presume that the page source specifies "dir=" somewhere, in which
> case the solution is for eww to force bidi-paragraph-direction to the
> corresponding value, or (if different blocks have different "dir="
> attributes) to insert an LRM or RLM character at the beginning of each
> such block of text.  See
> http://www.w3.org/International/questions/qa-html-dir for more details
> about this.

Yes, there is a

<html lang="en" dir="ltr" class="client-nojs">

in there...

> As the first stop-gap measure, I suggest to force the value of
> bidi-paragraph-direction to 'left-to-right in the eww buffers, since
> the vast majority of HTML pages are left to right.

I've now done this, as well as made it respect ltr/rtl in the <html>
element.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]