diff options
| author | Lars Magne Ingebrigtsen | 2016-03-20 15:15:32 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2016-03-20 15:15:32 +0100 |
| commit | 78bcd428573f4eed83bf143d296fbd38a3ffd71e (patch) | |
| tree | 18df42abacce473dc4cd4175380004d232766199 | |
| parent | 61b2e837d8eefcba7ae8dbe442a818f05d5ed6f0 (diff) | |
| download | emacs-78bcd428573f4eed83bf143d296fbd38a3ffd71e.tar.gz emacs-78bcd428573f4eed83bf143d296fbd38a3ffd71e.zip | |
Further empty <li> tweaks
* lisp/net/shr.el (shr-tag-li): When showing several empty
<li> elements, ensure that they really get inserted on a new line.
| -rw-r--r-- | lisp/net/shr.el | 4 | ||||
| -rw-r--r-- | test/data/shr/li-empty.html | 1 | ||||
| -rw-r--r-- | test/data/shr/li-empty.txt | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 4adb4a6099c..60794158024 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1617,7 +1617,9 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1617 | (put-text-property start (1+ start) | 1617 | (put-text-property start (1+ start) |
| 1618 | 'shr-continuation-indentation shr-indentation) | 1618 | 'shr-continuation-indentation shr-indentation) |
| 1619 | (put-text-property start (1+ start) 'shr-prefix-length (length bullet)) | 1619 | (put-text-property start (1+ start) 'shr-prefix-length (length bullet)) |
| 1620 | (shr-generic dom))))) | 1620 | (shr-generic dom)))) |
| 1621 | (unless (bolp) | ||
| 1622 | (insert "\n"))) | ||
| 1621 | 1623 | ||
| 1622 | (defun shr-mark-fill (start) | 1624 | (defun shr-mark-fill (start) |
| 1623 | ;; We may not have inserted any text to fill. | 1625 | ;; We may not have inserted any text to fill. |
diff --git a/test/data/shr/li-empty.html b/test/data/shr/li-empty.html new file mode 100644 index 00000000000..05cfee7bdd4 --- /dev/null +++ b/test/data/shr/li-empty.html | |||
| @@ -0,0 +1 @@ | |||
| <ol><li></li><li></li><li></li></ol> | |||
diff --git a/test/data/shr/li-empty.txt b/test/data/shr/li-empty.txt new file mode 100644 index 00000000000..8320bc0097b --- /dev/null +++ b/test/data/shr/li-empty.txt | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | 3 | ||