MCPcopy Create free account
hub / github.com/bterwijn/memory_graph / format_string

Function format_string

memory_graph/html_table.py:14–22  ·  view source on GitHub ↗

Helper function to format 'value' to be shown in the graph. We escape html characters and convert newlines to tags.

(value, quote_str)

Source from the content-addressed store, hash-verified

12 s = to_string(value)
13 if quote_str and isinstance(value, (str, utils.full_str)):
14 s = utils.quote_string(s)
15 if not isinstance(value, utils.html_str): # <IMG> can't have padding in Graphviz
16 s = utils.pad_string(s)
17 return s
18
19class HTML_Table:
20 """
21 The HTML_Table class is used to create a table of data that can be visualized in the graph.
22 """
23
24 def __init__(self):
25 """

Callers 1

add_valueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected