Skip to content

Commit 035c11c

Browse files
authored
Merge 8cc8de3 into a874755
2 parents a874755 + 8cc8de3 commit 035c11c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

markdown_it/common/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def isPunctChar(ch):
272272
}
273273

274274

275-
def isMdAsciiPunct(ch: str):
275+
def isMdAsciiPunct(ch: int):
276276
"""Markdown ASCII punctuation characters.
277277
278278
::

markdown_it/rules_core/smartquotes.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,8 @@ def process_inlines(tokens: List[Token], state: StateCore):
9494
nextChar = charCodeAt(tokens[j].content, 0)
9595
break
9696

97-
isLastPunctChar = isMdAsciiPunct(chr(lastChar)) or isPunctChar(
98-
chr(lastChar)
99-
)
100-
isNextPunctChar = isMdAsciiPunct(chr(nextChar)) or isPunctChar(
101-
chr(nextChar)
102-
)
97+
isLastPunctChar = isMdAsciiPunct(lastChar) or isPunctChar(chr(lastChar))
98+
isNextPunctChar = isMdAsciiPunct(nextChar) or isPunctChar(chr(nextChar))
10399

104100
isLastWhiteSpace = isWhiteSpace(lastChar)
105101
isNextWhiteSpace = isWhiteSpace(nextChar)

0 commit comments

Comments
 (0)