Fixed issue where tags were not being properly closed within divs
This commit is contained in:
parent
141d000ff4
commit
9ef7c03a15
|
@ -1,4 +1,4 @@
|
|||
<rss version="2.0"><channel><title>RSS Test</title><link>http://example.com</link><description>An example blog for testing RSS capability of md4tj.</description><language>en-US</language><pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate><managingEditor>editor@example.com</managingEditor><webMaster>webmaster@example.com</webMaster><docs>https://www.rssboard.org/rss-specification</docs><generator>md4tj-rss.el</generator><lastBuildDate>Sat, 30 Mar 2024 20:45:29 GMT</lastBuildDate><item><title>Blog Post 2</title><link>https://example.com/blog/blogpost2.html</link><guid>https://example.com/blog/blogpost2.html</guid><description>
|
||||
<rss version="2.0"><channel><title>RSS Test</title><link>http://example.com</link><description>An example blog for testing RSS capability of md4tj.</description><language>en-US</language><pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate><managingEditor>editor@example.com</managingEditor><webMaster>webmaster@example.com</webMaster><docs>https://www.rssboard.org/rss-specification</docs><generator>md4tj-rss.el</generator><lastBuildDate>Sat, 30 Mar 2024 20:57:14 GMT</lastBuildDate><item><title>Blog Post 2</title><link>https://example.com/blog/blogpost2.html</link><guid>https://example.com/blog/blogpost2.html</guid><description>
|
||||
|
||||
<br>
|
||||
|
||||
|
|
2
md4tj.el
2
md4tj.el
|
@ -112,7 +112,7 @@
|
|||
"Last updated: " (format-time-string "%a %d %b %Y %H:%M UTC" nil t)
|
||||
(md4tj-end-tag "p")))
|
||||
((string-match "^@@DIV" line) (md4tj-begin-tag "div" (list (list "class" (nth 1 (split-string line))))))
|
||||
((string-match "^@@ENDDIV" line) (md4tj-end-tag "div"))
|
||||
((string-match "^@@ENDDIV" line) (concat (mapconcat #'md4tj-state-to-html state "\n") (md4tj-end-tag "div")))
|
||||
((string-match "^@@BLOGINSERT" line) (with-current-buffer inbuf (md4tj-blog-html)))
|
||||
((string-match "^@@RSSINSERT" line) (md4tj-rss-link-string (concat (with-current-buffer inbuf (save-excursion (md4tj-blog-base-url))) "feed.xml")))
|
||||
((and (string-match "^$$.*$$" line) (eq (nth 1 state) 'normal)) ;; LaTeX formula
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="test_css.css">
|
||||
<title>Test webpage</title>
|
||||
|
||||
|
@ -73,8 +75,9 @@ int main() {
|
|||
<div class="monospace-text">
|
||||
|
||||
<p>This is a div that has monospace text.</p>
|
||||
|
||||
</div>
|
||||
<p id="lastupdated">Last updated: Sun 31 Mar 2024 00:45 UTC</p>
|
||||
<p id="lastupdated">Last updated: Sun 31 Mar 2024 00:57 UTC</p>
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -111,5 +114,18 @@ int main() {
|
|||
<br>
|
||||
|
||||
<p>Content after the table</p>
|
||||
|
||||
<br>
|
||||
<div class="div2">
|
||||
|
||||
<ul>
|
||||
<li><p>This is a div that</p></li>
|
||||
|
||||
<li><p>tests proper termination of list</p></li>
|
||||
|
||||
<li><p>within it</p></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -44,4 +44,10 @@ This is a div that has monospace text.
|
|||
|----------|----------|---------|
|
||||
| *Item 1* | **Item 2** | ~~Item 3~~ |
|
||||
|
||||
Content after the table
|
||||
Content after the table
|
||||
|
||||
@@DIV div2
|
||||
- This is a div that
|
||||
- tests proper termination of list
|
||||
- within it
|
||||
@@ENDDIV
|
Loading…
Reference in New Issue