Compare commits
11 Commits
d72abdc4c0
...
7591a71471
| Author | SHA1 | Date | |
|---|---|---|---|
| 7591a71471 | |||
| e02074d96b | |||
| 0c83ef6ce7 | |||
| 8046f1a424 | |||
| 2f95654c52 | |||
| 0449f70c63 | |||
|
|
0e1267139f | ||
|
|
02dab2807c | ||
|
|
70164a1d45 | ||
|
|
8f95a362d2 | ||
|
|
ee363d9894 |
@ -16,6 +16,15 @@ class GlossaryError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def str_presenter(dumper: yaml.Dumper, data: str) -> yaml.ScalarNode:
|
||||
"""
|
||||
Changes the YAML dump style to multiline syntax for multiline strings.
|
||||
"""
|
||||
if len(data.splitlines()) > 1:
|
||||
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|')
|
||||
return dumper.represent_scalar('tag:yaml.org,2002:str', data)
|
||||
|
||||
|
||||
@dataclass
|
||||
class Glossary:
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user