#### Angus McIntyre

20 Feb, 2021 06:10 PM

There's an interesting open-source project called Obsidian that allows users to create a kind of personal wiki based on a simple directory of Markdown files.

To allow linking between different files, Obsidian uses a syntax that looks like [[foo]] (for links within a document) and ![[foo]] for links to other documents.

Even if it's not possible to extend Marked 2 to handle linking, it might be nice if the Marked 2 renderer could present Obsidian links in a slightly more attractive way (currently, they're simply rendered as literal text).

Obsidian does include its own preview renderer for Markdown, but Marked 2's rendering is more attractive, so sometimes it might be nice to be able to read Obsidian documents using Marked 2.

1. Support Staff Posted by Brett on 21 Feb, 2021 01:11 PM

Hi Angus,

Marked does not function well as a wiki, but it's entirely possible to extend it to recognize the link syntax using custom preprocessors. It's unlikely I'll make the additional syntax part of the core installation, though.

nvUltra, my upcoming notes app, also recognizes Wiki links, as does nvALT before it. But they make sense in apps like that which can handle them internally. Marked would never know for sure what to do with them. Add an MD extension? Assume a rendered HTML file? Is the target relative to the document? What if we're in a streaming preview without base url? Too many inconsistencies between implementations to make any assumptions.

As I mentioned, though, a few lines in a custom preprocessor script could not only make them look better, but render them to link in just the way you expect them to. If I find time, I'll write one up, but if you have any scripting knowledge, it's just a simple regex replacement.

- Brett

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

### »

#### Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 26 Feb, 2021 02:24 PM *manual* refresh needed when using mathjax from script 24 Feb, 2021 06:25 AM pdflatex not found 23 Feb, 2021 06:39 PM streaming preview beachballs when URL is supplied 21 Feb, 2021 05:24 PM LanguageTool support 21 Feb, 2021 01:11 PM Obsidian and link support

## Recent Articles

 Intra-document links in exported PDFs Using Ulysses with Marked Fenced code blocks inside indented code blocks Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked