diff options
-rw-r--r-- | contrib/markdown2html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/markdown2html b/contrib/markdown2html index be705d65..8b7a3f09 100644 --- a/contrib/markdown2html +++ b/contrib/markdown2html @@ -160,7 +160,7 @@ def _identify_quotes_for_later(mdwn): # The lead-in to a quote is a single line immediately preceding the # quote, and ending with ':'. Note that there could be multiple of # these: - if re.match(r'^.+:\s*$', cur) and nxt.startswith('>'): + if nxt and re.match(r'^.+:\s*$', cur) and nxt.startswith('>'): ret.append(f'{{.quotelead}}{cur.strip()}') # pandoc needs an empty line before the blockquote, so # we enter one for the purpose of HTML rendition: |