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

Markdown syntax not captured in "Select word or next occurrence" #48

Open
danyim opened this issue Dec 26, 2022 · 5 comments
Open

Markdown syntax not captured in "Select word or next occurrence" #48

danyim opened this issue Dec 26, 2022 · 5 comments

Comments

@danyim
Copy link

danyim commented Dec 26, 2022

Hello, thanks for developing this plugin first of all!
Version: v1.10.0

I tend to use the "Select word or next occurrence" feature often and found that there's a bug when attempting to select Markdown formatting artifacts in Live Preview & Source mode.

To reproduce:

### Test 1
### Test 2
### Test 3

Selecting just the ### and invoking "Select word or next occurrence" should select the next instance of ### into the selection, but it does nothing. I was also able to repro using lists as well, searching for - .

The bug might be in findNextMatchPosition @ https://github.com/timhor/obsidian-editor-shortcuts/blob/master/src/actions.ts#L210

@danyim
Copy link
Author

danyim commented Dec 26, 2022

May be related to #35

@timhor
Copy link
Owner

timhor commented Dec 27, 2022

Interesting, I can reproduce the H3 example you provided in Live Preview, but not in Source mode.

Dec-27-2022 10-56-39

Lists also work as expected in both modes for me.

Dec-27-2022 10-47-54

I'll look into the Live Preview issue; in the meantime, could you please double check the Source mode and list scenarios in a new vault with only Code Editor Shortcuts enabled?

@danyim
Copy link
Author

danyim commented Dec 29, 2022

Hmm, I tested Source mode using a new vault with just a theme and only your plugin enabled. Source mode seems to work but live preview breaks as you saw before.

Here's an example of the function breaking in Live Preview:
live-preview

And here's an example of the list bullets breaking in LP:
list

@timhor
Copy link
Owner

timhor commented Dec 29, 2022

Ah I see, so it was list characters before checkboxes. Presumably anything else that gets automatically hidden by Live Preview would have this bug too.

Thanks, will investigate! 👍

@timhor
Copy link
Owner

timhor commented Jan 11, 2023

It looks like this is a bug on Obsidian's end – I made a minimal reproducible example and submitted a bug report to them here.

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

2 participants