unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19587: shr: produces an extra newline before a block element in <li />
@ 2015-01-13 18:50 Ivan Shmakov
  2015-12-25 17:33 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Shmakov @ 2015-01-13 18:50 UTC (permalink / raw)
  To: 19587

Package:  emacs
Severity: minor

	As of ec7605b4b137 (2015-01-10 16:54:24 +0000), shr produces an
	extra newline before a “block” element which is the first child
	to a <li /> element.  Consider, e. g.:

(with-temp-buffer
  (let ((r
         (shr-tag-ul
          '(ul nil
               (li nil (div nil "One item."))
               (li nil (div nil "Another item."))))))
    (cons r (buffer-string))))
(nil . "\
• 
  One item.
• 
  Another item.\n\n")

	There, I’d rather expect no newline between the bullet and the
	div elements’ contents, like:

(nil . "\
• One item.
• Another item.\n\n")

	Somewhat surprisingly, this produces a still less consistent
	result when the p elements are used:

(with-temp-buffer
  (let ((r
         (shr-tag-ul
          '(ul nil
               (li nil (p nil "One item."))
               (li nil (p nil "Another item."))
               (li nil
                   (p nil "One more item.")
                   (p nil "And one more paragraph to the same item."))))))
    (cons r (buffer-string))))
(nil . "\
* 
  One item.

*   Another item.

*   One more item.

  And one more paragraph to the same item.\n\n")

	I’d rather expect it to be formatted as follows:

(nil . "\
* One item.

* Another item.

* One more item.

  And one more paragraph to the same item.\n\n")

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-29  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 18:50 bug#19587: shr: produces an extra newline before a block element in <li /> Ivan Shmakov
2015-12-25 17:33 ` Lars Ingebrigtsen
2015-12-26  9:12   ` Ivan Shmakov
2015-12-26 19:17     ` Ivan Shmakov
2016-02-29  7:07       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).