diff --git a/lib/markdown2.py b/lib/markdown2.py index a79af09f..56dd2f11 100755 --- a/lib/markdown2.py +++ b/lib/markdown2.py @@ -452,7 +452,7 @@ def preprocess(self, text): r"(.*:\s+>\n\s+[\S\s]+?)(?=\n\w+\s*:\s*\w+\n|\Z)", re.MULTILINE ) _key_val_list_pat = re.compile( - r"^-(?:[ \t]*([^:\s]*)(?:[ \t]*[:-][ \t]*(\S+))?)(?:\n((?:[ \t]+[^\n]+\n?)+))?", + r"^-(?:[ \t]*([^\n]*)(?:[ \t]*[:-][ \t]*(\S+))?)(?:\n((?:[ \t]+[^\n]+\n?)+))?", re.MULTILINE, ) _key_val_dict_pat = re.compile( diff --git a/test/tm-cases/metadata.metadata b/test/tm-cases/metadata.metadata index ebb79271..1ee2c4fe 100644 --- a/test/tm-cases/metadata.metadata +++ b/test/tm-cases/metadata.metadata @@ -7,5 +7,5 @@ "and some": "long value\n that goes multiline", "another": "example", "alist": ["a", "b", "c"], - "adict": {"key": "foo", "a nested list": ["one", "two", "Even multiline strings are allowed\n in nested structured data\n if linebreaks and indent are respected !", {"subkey": "and another dict in a list"}]} + "adict": {"key": "foo", "a nested list": ["one", "two", "Even multiline strings are allowed\n in nested structured data\n if linebreaks and indent are respected !", {"subkey": "and another dict in a list"}, "but one-liners remains: simple strings"]} } diff --git a/test/tm-cases/metadata.text b/test/tm-cases/metadata.text index b2e14ae8..c12494df 100644 --- a/test/tm-cases/metadata.text +++ b/test/tm-cases/metadata.text @@ -23,6 +23,7 @@ adict: if linebreaks and indent are respected ! - subkey: and another dict in a list + - but one-liners remains: simple strings --- # The real text