Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An extended syntax feature #5

Open
YJ2CS opened this issue Dec 28, 2020 · 1 comment
Open

An extended syntax feature #5

YJ2CS opened this issue Dec 28, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@YJ2CS
Copy link

YJ2CS commented Dec 28, 2020

#1
This is not a bug, but I think a feature needs to be supported,

It is the following syntax:

[[Wiki Links|click here]] -> [click here](Wiki%20Links.md)

This is a feature supported by Obisdian. Below is a screenshot of its effect

Source code

image

Preview

image

example

Below I give a regular expression example, but I am not sure whether it is useful to you, because I did not look at the source code carefully.

There are still some problems. Normally, it should trim the spaces on both sides of the string.

/\[\[([^\x00-\x1f|]+?)(\|)+?(([\s\S]+?)?)\]\]/g

to

($3)[$1.md]

image

@agathauy
Copy link
Owner

Oh I see! Will get back to a next update to this soon I think. Didn't know that was how it's being done with Obsidian these days (have yet to even try aliases haha). Thanks for mentioning this!

@agathauy agathauy added the enhancement New feature or request label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants