(ch)
| 18713 | |
| 18714 | |
| 18715 | def make_escape(ch): |
| 18716 | if ch == 92: |
| 18717 | return "\\u005c" |
| 18718 | elif 32 <= ch <= 127 or ch == 10: |
| 18719 | return chr(ch) |
| 18720 | elif 0xd800 <= ch <= 0xdfff: # orphaned surrogate |
| 18721 | return "\\ufffd" |
| 18722 | elif ch <= 0xffff: |
| 18723 | return f"\\u{ch:04x}" |
| 18724 | else: |
| 18725 | return f"\\U{ch:08x}" |
| 18726 | |
| 18727 | |
| 18728 | def JM_append_rune(buff, ch): |
no outgoing calls
no test coverage detected
searching dependent graphs…