11 lines
355 B
Python
11 lines
355 B
Python
|
|
from yuxi.channel.extensions.tlon.story import markdown_to_story, story_to_text
|
||
|
|
|
||
|
|
|
||
|
|
def markdown_to_native(md_text: str) -> list[dict]:
|
||
|
|
return markdown_to_story(md_text)
|
||
|
|
|
||
|
|
|
||
|
|
def native_to_markdown(native_content: list[dict] | str) -> str:
|
||
|
|
if isinstance(native_content, list):
|
||
|
|
return story_to_text(native_content)
|
||
|
|
return str(native_content)
|