From 141d000ff4b44c5ec7d2dab19fd244e884b31761 Mon Sep 17 00:00:00 2001 From: j4nk Date: Sat, 30 Mar 2024 20:46:23 -0400 Subject: [PATCH] Fixed issue where ordered lists put in spurious --- blog/feed.xml | 2 +- md4tj.el | 2 +- test_file.html | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/blog/feed.xml b/blog/feed.xml index 7a9f630..77d6c30 100644 --- a/blog/feed.xml +++ b/blog/feed.xml @@ -1,4 +1,4 @@ -RSS Testhttp://example.comAn example blog for testing RSS capability of md4tj.en-USTue, 10 Jun 2003 04:00:00 GMTeditor@example.comwebmaster@example.comhttps://www.rssboard.org/rss-specificationmd4tj-rss.elSat, 30 Mar 2024 20:15:27 GMTBlog Post 2https://example.com/blog/blogpost2.htmlhttps://example.com/blog/blogpost2.html +RSS Testhttp://example.comAn example blog for testing RSS capability of md4tj.en-USTue, 10 Jun 2003 04:00:00 GMTeditor@example.comwebmaster@example.comhttps://www.rssboard.org/rss-specificationmd4tj-rss.elSat, 30 Mar 2024 20:45:29 GMTBlog Post 2https://example.com/blog/blogpost2.htmlhttps://example.com/blog/blogpost2.html <br> diff --git a/md4tj.el b/md4tj.el index f6a28f5..eb84b2b 100644 --- a/md4tj.el +++ b/md4tj.el @@ -173,7 +173,7 @@ (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 (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 (not (string-match "^|.*|$" currline)) (or (eq prevstate 'begintable) (eq prevstate 'headtable) (eq prevstate 'table))) 'endtable) (t 'nothing)) diff --git a/test_file.html b/test_file.html index a733859..81d393c 100644 --- a/test_file.html +++ b/test_file.html @@ -39,7 +39,6 @@
  1. ordered item 1

  2. -
  3. ordered item 2

@@ -75,7 +74,7 @@ int main() {

This is a div that has monospace text.

-

Last updated: Sun 31 Mar 2024 00:15 UTC

+

Last updated: Sun 31 Mar 2024 00:45 UTC