Fixed issue where ordered lists put in spurious </ul>

This commit is contained in:
j4nk 2024-03-30 20:46:23 -04:00
parent 915d6671b2
commit 141d000ff4
3 changed files with 3 additions and 4 deletions

View File

@ -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:15:27 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: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>
&lt;br&gt; &lt;br&gt;

View File

@ -173,7 +173,7 @@
(cond ((and (string-match "^- " currline) (or (eq prevstate 'ol) (eq prevstate 'beginol))) 'endol) (cond ((and (string-match "^- " currline) (or (eq prevstate 'ol) (eq prevstate 'beginol))) 'endol)
((and (string-match "^[0-9]+\\. " currline) (or (eq prevstate 'ul) (eq prevstate 'beginul))) 'endul) ((and (string-match "^[0-9]+\\. " currline) (or (eq prevstate 'ul) (eq prevstate 'beginul))) 'endul)
((and (not (string-match "^- " currline)) (or (eq prevstate 'beginul) (eq prevstate 'ul))) 'endul) ((and (not (string-match "^- " currline)) (or (eq prevstate 'beginul) (eq prevstate 'ul))) 'endul)
((and (not (string-match "[0-9]+\\. " currline)) (or (eq prevstate 'beginol) (eq prevstate 'ol))) 'endul) ((and (not (string-match "[0-9]+\\. " currline)) (or (eq prevstate 'beginol) (eq prevstate 'ol))) 'endol)
((and (string-match "```$" currline) (or (eq prevstate 'code) (eq prevstate 'begincode))) 'endcode) ((and (string-match "```$" currline) (or (eq prevstate 'code) (eq prevstate 'begincode))) 'endcode)
((and (not (string-match "^|.*|$" currline)) (or (eq prevstate 'begintable) (eq prevstate 'headtable) (eq prevstate 'table))) 'endtable) ((and (not (string-match "^|.*|$" currline)) (or (eq prevstate 'begintable) (eq prevstate 'headtable) (eq prevstate 'table))) 'endtable)
(t 'nothing)) (t 'nothing))

View File

@ -39,7 +39,6 @@
<ol> <ol>
<li><p>ordered item 1</p></li> <li><p>ordered item 1</p></li>
</ul>
<li><p>ordered item 2</p></li> <li><p>ordered item 2</p></li>
</ol> </ol>
@ -75,7 +74,7 @@ int main() {
<p>This is a div that has monospace text.</p> <p>This is a div that has monospace text.</p>
</div> </div>
<p id="lastupdated">Last updated: Sun 31 Mar 2024 00:15 UTC</p> <p id="lastupdated">Last updated: Sun 31 Mar 2024 00:45 UTC</p>
<br> <br>