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

[Suggestion]: Generalize link-modifier to work everywhere #49

Open
boltlessengineer opened this issue Oct 4, 2024 · 0 comments
Open

Comments

@boltlessengineer
Copy link

boltlessengineer commented Oct 4, 2024

related: #28

Currently link-modifier only works with attached modifiers:

word:*bold*

But there are more places where we may need it like anchor+link case:

[anchor]{https://i-want-link-here.com}[link?]

Parser can't know if it is link or anchor after [anchor]. If we give right precedence here, user can't put link right after anchor.

[anchor](){https://i-want-link-here.com}[link]

Placing empty attribute might work, but this will put additional useless information to [anchor] considering empty attributes set can mean something (reference: #38)

So let's redefine link-modifier to ": character between two non-whitespace characters".
Now every : character between non-whitespace characters will work as non-printable divider.

norg html
word:word wordword
word: word word: word
word:*bold* word<strong>bold</strong>
[anchor]:{https://example.com}[link] <a href="#anchor">anchor</a><a href="https://example.com">link</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant