Need Help With Marked 2 Preprocessor Wiki Links

Hi everyone! I use Marked 2 daily. I have a notes folder with a few subfolders which contains only .md files.

Likewise, I found those examples of using preprocessor in Marked 2 to make wiki links clickable. In examples, applications used are The Archive and nvALT, but I don’t use any of those. Would it be possible to modify the scripts to open the search in nvUltra instead?

I tok a look at URL handler for nvUltra, but couldn’t make it work by modifying the script. Replacing nvalt with x-nvultra. I understand that x-nvultra has another format, and I could not escape characters the right way.

Ideally, I would like to navigate from file to file in Marked 2 itself. For example, when I’m viewing a file in Marked 2 (which is located in my notes directory), clicking on a wiki link will open the new file in Marked 2 window.

Could someone help to modify the scripts or at least point in the right direction?

Okay, I made it work by modifying the script which was written for The Archive. Here is the part I needed to change at the bottom of the script:

From:

"[#{match[1]}](thearchive://match/#{URI.escape(match[1])}.txt)"

To:

"[#{match[1]}](x-nvultra://find/#{URI.escape(match[1])})"