diff options
| author | Lars Ingebrigtsen | 2016-03-01 11:19:52 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-03-01 11:19:52 +1100 |
| commit | 3dd82d7501a28c1ac6cebb9a2fc14399413b5c40 (patch) | |
| tree | ba8eda725d105016f7bd8fa8e785ac42a5a5690f | |
| parent | fc819ea94ef1f466e422ed290e1fa01d5ec0302b (diff) | |
| download | emacs-3dd82d7501a28c1ac6cebb9a2fc14399413b5c40.tar.gz emacs-3dd82d7501a28c1ac6cebb9a2fc14399413b5c40.zip | |
Support <bdo> and <bdi>
* lisp/net/shr.el (shr-tag-bdo): New function.
(shr-tag-bdi): Ditto.
| -rw-r--r-- | lisp/net/shr.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index ab04b9a065a..c469e699ae8 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1681,6 +1681,24 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1681 | (shr-colorize-region start (point) color | 1681 | (shr-colorize-region start (point) color |
| 1682 | (cdr (assq 'background-color shr-stylesheet)))))) | 1682 | (cdr (assq 'background-color shr-stylesheet)))))) |
| 1683 | 1683 | ||
| 1684 | (defun shr-tag-bdo (dom) | ||
| 1685 | (let* ((direction (dom-attr dom 'dir)) | ||
| 1686 | (char (cond | ||
| 1687 | ((equal direction "ltr") | ||
| 1688 | #x202d) ; LRO | ||
| 1689 | ((equal direction "rtl") | ||
| 1690 | #x202e)))) ; RLO | ||
| 1691 | (when char | ||
| 1692 | (insert char)) | ||
| 1693 | (shr-generic dom) | ||
| 1694 | (when char | ||
| 1695 | (insert #x202c)))) ; PDF | ||
| 1696 | |||
| 1697 | (defun shr-tag-bdi (dom) | ||
| 1698 | (insert #x2068) ; FSI | ||
| 1699 | (shr-generic dom) | ||
| 1700 | (insert #x2069)) ; PDI | ||
| 1701 | |||
| 1684 | ;;; Table rendering algorithm. | 1702 | ;;; Table rendering algorithm. |
| 1685 | 1703 | ||
| 1686 | ;; Table rendering is the only complicated thing here. We do this by | 1704 | ;; Table rendering is the only complicated thing here. We do this by |