Process string with inline patterns and replace it with placeholders. Arguments: data: A line of Markdown text. patternIndex: The index of the `inlinePattern` to start with. Returns: String with placeholders.
(self, data: str, patternIndex: int = 0)
| 118 | return placeholder |
| 119 | |
| 120 | def __handleInline(self, data: str, patternIndex: int = 0) -> str: |
| 121 | """ |
| 122 | Process string with inline patterns and replace it with placeholders. |
| 123 | |
| 124 | Arguments: |
| 125 | data: A line of Markdown text. |
| 126 | patternIndex: The index of the `inlinePattern` to start with. |
| 127 | |
| 128 | Returns: |
| 129 | String with placeholders. |
| 130 | |
| 131 | """ |
| 132 | if not isinstance(data, util.AtomicString): |
| 133 | startIndex = 0 |
| 134 | count = len(self.inlinePatterns) |
| 135 | while patternIndex < count: |
| 136 | data, matched, startIndex = self.__applyPattern( |
| 137 | self.inlinePatterns[patternIndex], data, patternIndex, startIndex |
| 138 | ) |
| 139 | if not matched: |
| 140 | patternIndex += 1 |
| 141 | return data |
| 142 | |
| 143 | def __processElementText(self, node: etree.Element, subnode: etree.Element, isText: bool = True) -> None: |
| 144 | """ |
no test coverage detected