Escapes % characters. Escapes any % characters so that Windows-style environment variable expansions will leave them alone. See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile to understand why we have
(s)
| 739 | |
| 740 | |
| 741 | def _EscapeEnvironmentVariableExpansion(s): |
| 742 | """Escapes % characters. |
| 743 | |
| 744 | Escapes any % characters so that Windows-style environment variable |
| 745 | expansions will leave them alone. |
| 746 | See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile |
| 747 | to understand why we have to do this. |
| 748 | |
| 749 | Args: |
| 750 | s: The string to be escaped. |
| 751 | |
| 752 | Returns: |
| 753 | The escaped string. |
| 754 | """ |
| 755 | s = s.replace("%", "%%") |
| 756 | return s |
| 757 | |
| 758 | |
| 759 | quote_replacer_regex = re.compile(r'(\\*)"') |
no outgoing calls
no test coverage detected