]> code.delx.au - gnu-emacs/commitdiff
Fix filling text with bidirectional characters in shr.el
authorEli Zaretskii <eliz@gnu.org>
Tue, 29 Dec 2015 16:49:57 +0000 (18:49 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 29 Dec 2015 16:49:57 +0000 (18:49 +0200)
* lisp/net/shr.el (shr-insert-document): Bind
bidi-display-reordering to nil while filling lines.  This is
required for when a line includes characters whose bidi
directionality is opposite to the base paragraph direction,
because columns are counted in the logical order.  (Bug#22250)

lisp/net/shr.el

index d5c56362f60a2e7cf0f0c578d9cbb798805d9eca..330f7b5d84ba48298cdc4fbdd506f248f20e6b85 100644 (file)
@@ -244,7 +244,8 @@ DOM should be a parse tree as generated by
                                      (if (and (null shr-width)
                                               (not (shr--have-one-fringe-p)))
                                          (* (frame-char-width) 2)
-                                       0))))))
+                                       0)))))
+        bidi-display-reordering)
     (shr-descend dom)
     (shr-fill-lines start (point))
     (shr-remove-trailing-whitespace start (point))