logseq / logseq/mldoc

Markdown: Unsupported parsing cases

Open
#133 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
281
Forks
30
Avg merge
5h 30m
Merged PRs (30d)
4

Description

Mldoc cannot parse following cases (but several of them successfully displays in Logseq).
But it is required to be done with mldoc to use this parser in plugin development separately from Logseq.

case markdown parsed as
horizontal line ___ & --- & *** plain
headings ### h3 Heading plain
blockquotes > Blockquotes can also be nested... plain
numbered lists 1. Lorem ipsum dolor sit amet plain
unordered lists - Lorem ipsum dolor sit amet plain
code block ```js
var foo = bar()
```
["Code", "` js\nvar foo = bar()\n"],
["Plain", "`"],
inline code ```var foo = bar()``` ["Code", "`var foo = bar()\n"],
["Plain", "`"],
table | A | B | \n | 1 | 2 | plain
inclusion url metadata not presented ![Logseq](https://logseq.com) ["Link", {
"full_text": "![Logseq](https://logseq.com)",
"url": ["Complex",{"protocol": "https", "link": "logseq.com"}],
"label": [ ["Plain", "Logseq"] ],
"metadata": ""}]
reference by id ![Alt text][id]
With a reference later
[id]: https://dojocat.jpg "The Dojocat"
plain
inline footnote Inline footnote^[Text of inline footnote] definition. plain
footnotes with bug in id assignment Footnote link[^first]
[^first]: Footnote
["Footnote_Reference",{"id": 1,"name": "first"}],
["Footnote_Reference",{"id": 2,"name": "first"}],

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing each listed Markdown case with mldoc and compare its output with the examples and Logseq behavior; done means the listed headings, lists, code, tables, links, footnotes, and horizontal lines are parsed rather than returned as plain text, with the footnote IDs corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, ocaml
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.