unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Michal Herko <michal.herko@disroot.org>
To: guile-user <guile-user@gnu.org>
Subject: guile-lib <p> handling
Date: Mon, 16 Mar 2020 14:40:45 +0100	[thread overview]
Message-ID: <1584366045.2123.1@disroot.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

Dear maintainor of guile-lib.
I believe the special handling of <p> elements in (htmlprag) module to 
be a bug.
For example:

(use-modules (htmlprag))
(html->shtml "<html><body><div><p>text</p></div></body></html>")
; expected result (*TOP* (html (body (div (p "text")))))
; actual (*TOP* (html (body (div) (p "text"))))

Note that the <p> element is parsed outside the <div> element.
I attach the simple patch to remove the special case for <p> elements.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 405 bytes --]

diff --git a/src/htmlprag.scm b/src/htmlprag.scm
index 3bd352b..df99612 100644
--- a/src/htmlprag.scm
+++ b/src/htmlprag.scm
@@ -1099,7 +1099,6 @@
               (meta     . (head))
               (noframes . (frameset))
               (option   . (select))
-              (p        . (body td th))
               (param    . (applet))
               (tbody    . (table))
               (td       . (tr))

             reply	other threads:[~2020-03-16 13:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 13:40 Michal Herko [this message]
2020-03-16 17:15 ` guile-lib <p> handling tomas
2020-03-16 17:16 ` sirgazil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1584366045.2123.1@disroot.org \
    --to=michal.herko@disroot.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).