logseq / mldoc

Another Emacs Org-mode and Markdown parser.
GNU Affero General Public License v3.0
233 stars 20 forks source link

URL Schemes in Logseq blocks will be broken after converting to html #123

Closed why8023 closed 1 year ago

why8023 commented 2 years ago

This original contents in Logseq, which contains the MarginNote URL Schemes:

image

After I select these blocks and copy them as HTML, they will be:

image

there are both missing two slash.

stdword commented 1 year ago

@cnrpman Issue can be closed: Logseq 0.9.1 and Mldoc 1.5.3 parses url correctly:

% echo 'marginnote3app://note/8B11CF4A-DE3C-4A71-84G8-ODF5EE2EBO4C' | npx mldoc convert -f ast
...
Reading data from stdin...
Parsing file...
Converting to ast
Writing data to stdout...
[
    [
        "Link",
        {
            "url": [
                "Complex",
                {
                    "protocol": "marginnote3app",
                    "link": "note/8B11CF4A-DE3C-4A71-84G8-ODF5EE2EBO4C"
                }
            ],
            "label": [
                [
                    "Plain",
                    "marginnote3app://note/8B11CF4A-DE3C-4A71-84G8-ODF5EE2EBO4C"
                ]
            ],
            "full_text": "marginnote3app://note/8B11CF4A-DE3C-4A71-84G8-ODF5EE2EBO4C",
            "metadata": ""
        }
    ],
    [
        "Break_Line"
    ]
]

DONE!