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

Function replaceAt

markdown_it/rules_core/smartquotes.py:17–21  ·  view source on GitHub ↗
(string: str, index: int, ch: str)

Source from the content-addressed store, hash-verified

15
16
17def replaceAt(string: str, index: int, ch: str) -> str:
18 # When the index is negative, the behavior is different from the js version.
19 # But basically, the index will not be negative.
20 assert index >= 0
21 return string[:index] + ch + string[index + 1 :]
22
23
24def process_inlines(tokens: list[Token], state: StateCore) -> None:

Callers 1

process_inlinesFunction · 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…