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

Function to_ascii

markdown_it/_punycode.py:61–67  ·  view source on GitHub ↗
(obj: str)

Source from the content-addressed store, hash-verified

59
60
61def to_ascii(obj: str) -> str:
62 def mapping(obj: str) -> str:
63 if REGEX_NON_ASCII.search(obj):
64 return "xn--" + encode(obj)
65 return obj
66
67 return map_domain(obj, mapping)

Callers

nothing calls this directly

Calls 1

map_domainFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…