Extract id from data string, start from index. Arguments: data: String. index: Index, from which we start search. Returns: Placeholder id and string index, after the found placeholder.
(self, data: str, index: int)
| 94 | return hash, id |
| 95 | |
| 96 | def __findPlaceholder(self, data: str, index: int) -> tuple[str | None, int]: |
| 97 | """ |
| 98 | Extract id from data string, start from index. |
| 99 | |
| 100 | Arguments: |
| 101 | data: String. |
| 102 | index: Index, from which we start search. |
| 103 | |
| 104 | Returns: |
| 105 | Placeholder id and string index, after the found placeholder. |
| 106 | |
| 107 | """ |
| 108 | m = self.__placeholder_re.search(data, index) |
| 109 | if m: |
| 110 | return m.group(1), m.end() |
| 111 | else: |
| 112 | return None, index + 1 |
| 113 | |
| 114 | def __stashNode(self, node: etree.Element | str, type: str) -> str: |
| 115 | """ Add node to stash. """ |
no outgoing calls
no test coverage detected