MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / educateDashes

Method educateDashes

markdown/extensions/smarty.py:209–217  ·  view source on GitHub ↗
(self, md: Markdown)

Source from the content-addressed store, hash-verified

207 self.inlinePatterns.register(pattern, name, priority-ind)
208
209 def educateDashes(self, md: Markdown) -> None:
210 emDashesPattern = SubstituteTextPattern(
211 r'(?<!-)---(?!-)', (self.substitutions['mdash'],), md
212 )
213 enDashesPattern = SubstituteTextPattern(
214 r'(?<!-)--(?!-)', (self.substitutions['ndash'],), md
215 )
216 self.inlinePatterns.register(emDashesPattern, 'smarty-em-dashes', 50)
217 self.inlinePatterns.register(enDashesPattern, 'smarty-en-dashes', 45)
218
219 def educateEllipses(self, md: Markdown) -> None:
220 ellipsesPattern = SubstituteTextPattern(

Callers 1

extendMarkdownMethod · 0.95

Calls 2

registerMethod · 0.80

Tested by

no test coverage detected