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

Unable to prevent Dendron from treating @ as a user tag by escaping it #3039

Open
2 of 7 tasks
bugfixd opened this issue Jun 3, 2022 · 4 comments
Open
2 of 7 tasks
Labels
scope.markdown Relating to markdown features (i.e. supporting new language syntax) scope.workspace Workspace related functionality (i.e. intellisense, vault, workspace) type.enhancement Extension to a previously shipped feature. Minor functionality update.

Comments

@bugfixd
Copy link

bugfixd commented Jun 3, 2022

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • Lookup. Dendron's Lookup Command
  • Views. Dendron Preview, Tree View, Side Panels in the UI
  • Schema. Dendron Schemas
  • Pod. Data import from / export to Dendron
  • Publish. External Site Publish
  • Markdown. Markdown features, such as syntax support and features

Describe the bug

I sometimes want to prevent Dendron from treating an "at sign" followed by a word (e.g. @hello) as a user tag.

I've tried escaping the @ sign, e.g. \@hello, but Dendron still treats it as a user tag.

My current workaround is to enclose the whole thing in backticks, e.g. `@hello`.

Note: This is not exactly a bug — maybe just an oversight? Escaping works with hashtags (e.g. \#not-a-tag) and links (e.g. \[not a link]), and so imho it should also work with @ signs. 😉

Expected behavior

I would like to be able to escape an @ sign to prevent Dendron from interpreting it as a user tag.

Desktop (please complete the following information)

  • OS: Windows 10 Pro
  • Browser (if with published websites; include version): Chrome
  • Versions (all that apply to bug):
    • Dendron Extension: 0.97.0
    • VS Code version: 1.67.2
@github-actions github-actions bot added scope.markdown Relating to markdown features (i.e. supporting new language syntax) scope.workspace Workspace related functionality (i.e. intellisense, vault, workspace) status.triage-needed type.bug Something isn't working labels Jun 3, 2022
@bugfixd bugfixd changed the title Unable to prevent Dendron from treating @ as a user tag Unable to prevent Dendron from treating @ as a user tag by escaping it Jun 3, 2022
@SeriousBug SeriousBug self-assigned this Jun 3, 2022
@SeriousBug
Copy link
Contributor

Thanks for the report, I'll take a look!

I didn't know hashtags supported escaping actually 😅 but it should be easy enough to add to user tags too.

@bugfixd
Copy link
Author

bugfixd commented Jun 7, 2022

@SeriousBug ,

I've noticed a related issue:

When a word has an @ sign in the middle of it, Dendron treats it as a user tag — although it correctly handles words that look like email addresses:

image

@SeriousBug
Copy link
Contributor

Thanks, I can recreate the issue. The same actually seems to happen with hashtags, test#ing will cause the #ing part to be recognized as a tag.

I'm pretty sure this used to work, I think our parser changed how it works so it's not functioning anymore. In any case, I'm working on a fix for this. I'll also add support for escaping.

@SeriousBug
Copy link
Contributor

Dendron 0.99 will now ignore @ and # symbols inside of words when parsing user and hashtags. I'll convert this issue to an enhancement to add support for escaping tags.

@SeriousBug SeriousBug added type.enhancement Extension to a previously shipped feature. Minor functionality update. and removed type.bug Something isn't working labels Jun 14, 2022
@SeriousBug SeriousBug removed their assignment Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope.markdown Relating to markdown features (i.e. supporting new language syntax) scope.workspace Workspace related functionality (i.e. intellisense, vault, workspace) type.enhancement Extension to a previously shipped feature. Minor functionality update.
Projects
None yet
Development

No branches or pull requests

2 participants