(
text: Union[str, Pattern[str]], exact: bool = None, case_sensitive: bool = None
)
| 52 | |
| 53 | |
| 54 | def escape_for_text_selector( |
| 55 | text: Union[str, Pattern[str]], exact: bool = None, case_sensitive: bool = None |
| 56 | ) -> str: |
| 57 | if isinstance(text, Pattern): |
| 58 | return escape_regex_for_selector(text) |
| 59 | return json.dumps(text) + ("s" if exact else "i") |
| 60 | |
| 61 | |
| 62 | def escape_for_attribute_selector( |
no test coverage detected