Compress consecutive spaces in inline code blocks.
This commit is contained in:
parent
d6a415e54a
commit
dbf5b1d6bc
1 changed files with 3 additions and 1 deletions
|
@ -104,9 +104,11 @@ class Formatted(object):
|
|||
# Markdown inline code
|
||||
elif line[i] == "`":
|
||||
if text:
|
||||
# strip leading and trailing spaces from inline code blocks
|
||||
# strip leading and trailing spaces and compress consecutive
|
||||
# spaces in inline code blocks
|
||||
if attributes["code"]:
|
||||
text = text.strip()
|
||||
text = re.sub(r"\s+", " ", text)
|
||||
|
||||
substrings.append(
|
||||
FormattedString(text, attributes.copy())
|
||||
|
|
Loading…
Add table
Reference in a new issue