Brett on 21 Feb, 2021 01:11 PM
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.
"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." Strongly second that, and request to create a simple solution to stream from obsidian to Marked 2,( for those not into coding :))
on 28 Apr, 2021 01:58 AM
Having learned from Brett's post that pre-processors were an option in Marked (I should really read the manual), I did a little playing around. The following trivial Python3 script doesn't add any hyperlinking functionality, but it makes the output look a little nicer.
linkre = re.compile(r"\[\[(.*)\]\]")
for line in sys.stdin:
Save it somewhere, make it executable, and then set it up as a custom preprocessor through the Advanced tab in Preferences.