logseq_doctor
Logseq Doctor: heal your Markdown files.
-
class logseq_doctor.LogseqRenderer(*extras: Token)[source]
Render Markdown as an outline with bullets, like Logseq expects.
-
outline(indent: int, text: str, *, nl: bool = True) → str[source]
Render a line of text with the correct indentation.
-
render_heading(token: Heading | SetextHeading) → str[source]
Setext headings: https://spec.commonmark.org/0.30/#setext-headings.
-
render_line_break(token: LineBreak) → str[source]
Render a line break.
-
render_link(token: Link) → str[source]
Render a link as a Markdown link.
-
render_list_item(token: ListItem) → str[source]
Render a list item with the correct indentation.
-
render_paragraph(token: Paragraph) → str[source]
Render a paragraph with the correct indentation.
-
render_thematic_break(token: ThematicBreak) → str[source]
Render a horizontal rule as a line of dashes.
-
logseq_doctor.flat_markdown_to_outline(markdown_contents: str) → str[source]
Convert flat Markdown to an outline.