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.
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))