Repository navigation
v0.6.0
Changed
- Conversion is slower than in 0.5.0: md → org takes about 1.6 to 2.8
times as long, org → md about 10 % longer. The escapes below have to
check how org reads the output, which takes org parses of the text
concerned; org → md guards_.lines and drops the escapes again.
A performance check in CI now keeps it from growing unnoticed.
Fixed
Mostly found by round-tripping a real Obsidian vault, the rest by code
review and fuzzing; each of these silently changed text.
- Markup touching a word character (
`x`s,foo**bar**baz) no
longer comes back with literal markers. Org only reads markup next to
whitespace or punctuation, so md → org now separates the two with a
zero-width space, the org manual's escape character, and org → md
drops it again. - Literal text org would read as markup, such as the path
/etc/or an
escaped\*b\*, stays literal instead of turning italic or bold,
also when another inline node sits between the markers
(\*b `x` c\*). - Relative links and images (
[t](notes.md#Some%20Heading)) become
orgfile:links ([[file:notes.md::Some Heading][t]]) and come
back as the same Markdown links. They used to become bare org paths,
which org reads as a heading search rather than a file, so Emacs
would not open them and theobsidianpreset turned them into
wikilinks. A path holding a literal%5B,%5Dor::keeps it
instead of pointing at another file, and an orgfile:path holding
#or%([[file:C# notes.md]]) comes back pointing at that file,
not atC. - A heading inside a list item keeps its text as a line of the item
and reports viaonWarning, instead of silently coming back as
literal\*\* …: org has no headline inside a list. - A paragraph line that starts like org line syntax, such as an
escaped1\.,\-or\#, or a lazy continuation line, stays text
instead of turning into a list item, headline, comment or table. This
includes a line starting with a footnote reference ([^1] text,
which org reads as a footnote definition), one following a nested
list or code block inside a list item, one inside bold or a link
text spanning two lines, one ending in a bare bullet (1.), and one
in alogseqblock below its first line. The same goes for line
syntax spanning lines (an escaped\#+begin_src…\#+end_src) or
depending on the heading above (SCHEDULED: <…>). A paragraph that
is exactly one of the org constructs morg writes into Markdown
verbatim (drawers, fixed-width lines, clocks, …) still comes back as
org. - A line starting
_.or_)converts in both directions: uniorg,
morg's org parser, took it for a list bullet and failed on the whole
document, or, when a list followed, silently dropped the line. Org
reads it as text, and so does morg now. - List item text after a nested list (
- a\n - b\n\n c) stays in
the outer item instead of moving into the nested one on the next
round trip: org → md keeps the blank line Markdown needs there. - A literal
\[fn:1]in Markdown text stays text instead of becoming a
footnote reference. - Inline code holding a
~that ends org code early (`a~ b`)
becomes org=a~ b=instead of breaking the rest of the line. Code
that a=would end early too stays plain text and reports via
onWarning. #+OPTIONS: ^:nilis honored on org → md:a_bstaysa_b
instead of becominga\_{b}, and the option stays.- Bold, italic or strikethrough spanning more than two lines keeps its
markup: org markup spans at most two lines, so its line endings
become spaces, as Markdown renders them anyway. - A heading inside a blockquote keeps its text as a line of the quote
and reports viaonWarning: Emacs ends a quote block at a headline. - A fenced code block inside a list item keeps its indentation in both
directions. md → org used to shrink the code's own indentation by up
to the item's (if x:\n y()lost two spaces), and org → md added
the item's indentation to every line. - An escaped
\|in a Markdown table cell becomes org's\vert{}
entity instead of splitting the cell, and comes back as\|. - Bare underscores and carets (
my_notes_2021.md,x^y, also right
after markup or a link:**a**_b, or in anobsidianwikilink alias:
[[a_b.md|a_b]]) are no longer read as org sub/superscripts. md → org adds^:{}to#+OPTIONS:when the text
needs it; org → md honors it in a top-level#+OPTIONS:and consumes
it where the text needs it, so an author's ownoptions: ^:{}stays. - Inline code spanning three or more lines converts to org; its line
endings (LF, CRLF or CR) become spaces, which is how CommonMark
renders them anyway. - Inline code with whitespace at either end, as a padding typo easily
leaves, converts to org instead of breaking the rest of the
paragraph: org markup may not start or end with whitespace, so the
whitespace moves just outside the code. Whitespace-only code stays
plain text and reports viaonWarning. - An image with an anchor (
) comes back as an image
instead of a plain link. - A space between text and markup inside an org table cell is kept;
only the cell's alignment padding is trimmed. - With the
obsidianpreset, an aliased wikilink in a table cell is
written[[Page\|alias]], as Obsidian does, instead of splitting the
cell.