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

Conceal link modifier #101

Merged
merged 5 commits into from
Sep 9, 2021
Merged

Conceal link modifier #101

merged 5 commits into from
Sep 9, 2021

Conversation

mrossinek
Copy link
Member

This adds support for concealing the link modifier, :. Since tree-sitter will not allow us to do concealing natively we will have to rely on our trusty Vim syntax regions defined via regexes anyways.

Actual text

screenshot_1631138571

Concealed

screenshot_1631138580

Up for discussion

Right now, I implemented the link modifier regex to only require being suff- and prefixed with another markup modifier on the opening and closing link modifiers, respectively. However, this somewhat contradicts the current spec which requires a non-whitespace character in front of the opening modifier. However, I find that is a limitation because it will prevent e.g. the following: This is :*im*:possible!
I believe, that this is a not uncommon scenario so I am open for suggestions on how to rephrase the spec accordingly. I placed a temporary TODO comment at the relevant position of the markdown file.
As of right now, the spec does not contain a similar limitation for the closing :.

PS: I also did some minor touch-ups on the other conceal elements

docs/NFF-0.1-spec.md Outdated Show resolved Hide resolved
@mrossinek mrossinek mentioned this pull request Sep 8, 2021
9 tasks
Co-authored-by: Max Rossmannek <max.rossmannek@uzh.ch>
@vhyrro vhyrro merged commit d3cef39 into main Sep 9, 2021
@mrossinek mrossinek deleted the conceal-link-modifier branch September 9, 2021 15:53
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

Successfully merging this pull request may close these issues.

2 participants