MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / fromCodePoint

Function fromCodePoint

markdown_it/common/utils.py:78–85  ·  view source on GitHub ↗

Convert ordinal to unicode. Note, in the original Javascript two string characters were required, for codepoints larger than `0xFFFF`. But Python 3 can represent any unicode codepoint in one character.

(c: int)

Source from the content-addressed store, hash-verified

76
77
78def fromCodePoint(c: int) -> str:
79 """Convert ordinal to unicode.
80
81 Note, in the original Javascript two string characters were required,
82 for codepoints larger than `0xFFFF`.
83 But Python 3 can represent any unicode codepoint in one character.
84 """
85 return chr(c)
86
87
88# UNESCAPE_MD_RE = re.compile(r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])')

Callers 2

entityFunction · 0.85
replaceEntityPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…