Create an instant of an inline pattern. Arguments: pattern: A regular expression that matches a pattern. md: An optional pointer to the instance of `markdown.Markdown` and is available as `self.md` on the class instance.
(self, pattern: str, md: Markdown | None = None)
| 224 | md: Markdown | None |
| 225 | |
| 226 | def __init__(self, pattern: str, md: Markdown | None = None): |
| 227 | """ |
| 228 | Create an instant of an inline pattern. |
| 229 | |
| 230 | Arguments: |
| 231 | pattern: A regular expression that matches a pattern. |
| 232 | md: An optional pointer to the instance of `markdown.Markdown` and is available as |
| 233 | `self.md` on the class instance. |
| 234 | |
| 235 | |
| 236 | """ |
| 237 | self.pattern = pattern |
| 238 | self.compiled_re = re.compile(r"^(.*?)%s(.*)$" % pattern, |
| 239 | re.DOTALL | re.UNICODE) |
| 240 | |
| 241 | self.md = md |
| 242 | |
| 243 | def getCompiledRegExp(self) -> re.Pattern: |
| 244 | """ Return a compiled regular expression. """ |