MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / prepare_text_for_dbml

Function prepare_text_for_dbml

pydbml/renderer/dbml/default/utils.py:10–13  ·  view source on GitHub ↗

Escape single quotes

(text: str)

Source from the content-addressed store, hash-verified

8
9
10def prepare_text_for_dbml(text: str) -> str:
11 '''Escape single quotes'''
12 pattern = re.compile(r"('''|')")
13 return pattern.sub(r'\\\1', text)
14
15
16def quote_string(text: str) -> str:

Callers 4

default_to_strFunction · 0.90
quote_stringFunction · 0.85
note_option_to_dbmlFunction · 0.85

Calls

no outgoing calls

Tested by 1