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

feat: support unespacing backslash when following wikilinks #211

Merged
merged 4 commits into from
Oct 26, 2023
Merged

feat: support unespacing backslash when following wikilinks #211

merged 4 commits into from
Oct 26, 2023

Conversation

y3owk1n
Copy link
Contributor

@y3owk1n y3owk1n commented Oct 23, 2023

Hi everyone, appreciate the work being done here. I currently have a use case to include wikilinks within a table, however seems like the passthrough (gf) does not work as intended. I made some changes to make it work, and if this is something that can be part of the project, please let me know, happy to contribute.

Changes:

Allow user to escape wikilink in certain case, e.g. within a table. The code did not alter anything, but just add a check to remove backslash if needed.

Example:

Column1 Column2 Column3
Item1 [[NOTE-ID|TITLE]] Item1

The wikilink should be able to follow, without the '', some auto format might go crazy by treating the '|' as column separator.

Allow user to escape wikilink in certain case, e.g. within a table.

| Column1 | Column2            | Column3 || ------- | ------------------ | ------- || Item1   | [[NOTE-ID\|TITLE]] | Item1   |
@epwalsh
Copy link
Owner

epwalsh commented Oct 25, 2023

Hey @y3owk1n thanks for this. Could you just add a test case in test/obsidian/util_spec.lua?

@y3owk1n
Copy link
Contributor Author

y3owk1n commented Oct 26, 2023

Hey @y3owk1n thanks for this. Could you just add a test case in test/obsidian/util_spec.lua?

Hello @epwalsh, I've added a test case to support the implementation, please let me know if there's anything that needed from my side. 🤝

Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @y3owk1n!

@epwalsh epwalsh merged commit 1149c5b into epwalsh:main Oct 26, 2023
4 of 5 checks passed
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