Compare commits
1 Commits
28ddd3e44f
...
3be4475ddf
Author | SHA1 | Date | |
---|---|---|---|
|
3be4475ddf |
@ -1,10 +1,8 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from .org_rw import (Bold, Code, Headline, Italic, Line, RawLine, ListItem, Strike, Text,
|
from .org_rw import (Bold, Code, Headline, Italic, Line, RawLine, Strike, Text,
|
||||||
Underlined, Verbatim)
|
Underlined, Verbatim)
|
||||||
|
|
||||||
from .org_rw import dump_contents
|
|
||||||
|
|
||||||
|
|
||||||
def get_hl_raw_contents(doc: Headline) -> str:
|
def get_hl_raw_contents(doc: Headline) -> str:
|
||||||
lines = []
|
lines = []
|
||||||
@ -38,8 +36,6 @@ def get_raw_contents(doc) -> str:
|
|||||||
return "".join([get_raw_contents(chunk) for chunk in doc])
|
return "".join([get_raw_contents(chunk) for chunk in doc])
|
||||||
if isinstance(doc, (Text, Bold, Code, Italic, Strike, Underlined, Verbatim)):
|
if isinstance(doc, (Text, Bold, Code, Italic, Strike, Underlined, Verbatim)):
|
||||||
return doc.get_raw()
|
return doc.get_raw()
|
||||||
if isinstance(doc, ListItem):
|
|
||||||
return dump_contents(doc)[1]
|
|
||||||
print("Unhandled type: " + str(doc))
|
print("Unhandled type: " + str(doc))
|
||||||
raise NotImplementedError("Unhandled type: " + str(doc))
|
raise NotImplementedError("Unhandled type: " + str(doc))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user