You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inputPreset and outputPreset conversion options: the dialect the
input is read in and the one the output is written in, Vanilla when
left out (ADR 0006). preset still sets both, leaving a side Vanilla
whose format it has no dialect for; a side preset without one throws,
as does preset together with another side preset, and normalize*
with different presets per side.
--input-preset / --output-preset and inputPreset / outputPreset in morg.toml, and the preset name vanilla. Each
side resolves on its own: side flag, --preset, side key, preset; preset next to a different side preset in one place is an error.
Logseq org → Vanilla Markdown (--input-preset logseq): blocks become
a nested list, a heading block a heading whose children start a new
list, numbered blocks an ordered list. Task markers render as Logseq
shows them (- [ ], - [x], - [ ] LATER …); planning and
properties become key:: value lines in the item, under the orgismKeys names; collapsed and drawers are dropped with a
warning. A block's title stays inline text, as Logseq reads it, even
where it looks like org line syntax (: a, - a). After a heading
block, Markdown has no way back to the top level, so a later
top-level block reads back as the heading's child. Logseq's inline
syntax is carried as Logseq Markdown writes it, as text a return trip
restores: page and block refs
([[Page]], [label]([[Page]])), macros ({{video …}}), tags,
priorities, hiccup, highlights; a query block becomes a query code
block.
Vanilla Markdown → Logseq org (--output-preset logseq), as Logseq
reads a file it did not write: a list item is a block, its nested
list its children; a heading is a block nesting by level, the text
below it its content; other text after a list a block of its own.
Task items, key:: value lines and ordered lists come back as task
markers, planning, properties and numbered blocks. Reference links
become inline before the page splits into blocks, and a footnote's
definition moves to the block of its first reference. Logseq's syntax
carried in Vanilla Markdown (page and block refs, macros, a query
code block) is Logseq's again.
Logseq Markdown ↔ Vanilla org: Vanilla org is read and written as
Logseq org, which it is, page properties as leading keywords.
Logseq page properties ↔ plain Vanilla Markdown frontmatter
(title: P), as Markdown tools read metadata; a keyword that acts in
Emacs stays in morg_keywords.
Web UI: an Input and an Output select, each naming a format and its
dialect (Org, Org (Logseq), Markdown, Markdown (Logseq), Markdown
(Obsidian)), above their text areas, replace the direction and preset
selects. The direction follows from the two; the same on both sides
normalizes, and says so; a dialect change within one format is not
offered; ⇄ swaps the sides. The demo follows the input; sides
remembered by 0.8.0 are restored.
Obsidian ↔ Logseq: an Obsidian wikilink and a Logseq page ref map
onto each other ([[Page|label]] ↔ [[Page][label]]).
Changed
Breaking. A FragmentConverter takes a third argument, the
preset whose syntax a Vanilla side carries. Preset.convertOrg and Preset.convertMarkdown get a third argument, the conversion's
context (exported as ConversionContext): the side the preset is on
(both, input or output), onWarning and orgismKeys.
Breaking.Preset holds one dialect per format, each read in
one direction and written in the other (ADR 0006): markdown: { read: { mdast, org }, write } and org: { read, write }, typed MarkdownDialect and OrgDialect. applyToMdast, applyToUniorg and extractFromUniorg are gone. The
built-in presets convert as before.