Change link syntax [[text|link]] -> [[link|text]] for .md files stored by TW on Node.js

66 views
Skip to first unread message

Shareda

unread,
Aug 13, 2021, 1:20:25 PM8/13/21
to TiddlyWiki
Hello! I need to unify links in my tiddlers stored in md files (TW on Node.js) with external storage of markdown files (Obsidian vault). Now I use default TiddlyWiki 5.1.23 system tiddlers an settings.

I've set  $:/config/FileSystemExtensions  to .md and got fine .md files containing text of my tiddlers. But now I need to find a way to convert the link syntax from [[text|link]] to [[link|text]] before saving md files. And convert it back when read md files to my TiddlyWiki.

Please, help me to find a way to do so! 

There is an interesting line in boot.js:
$tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"});  

Maybe I need some custom "deserializer"?
I don't understand where and what should I do :^)
   

Ste

unread,
Aug 19, 2021, 8:06:42 AM8/19/21
to TiddlyWiki
Bumping in the hope someone clever sees it.
Reply all
Reply to author
Forward
0 new messages