[go: up one dir, main page]

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

fix: add card hashtag to line without property #9910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djm2k
Copy link
Contributor
@djm2k djm2k commented Jul 23, 2023

Fixes #9380

I neglected to add the suggested workaround for property-only blocks as I noticed the same issue occurs with e.g. /H1 command, which will add # to the property in the first line of a block; so this should probably be handled elsewhere in a more generic way.
h1-behaviour

Testing Video

flashcard-tag-behaviour

@github-actions github-actions bot added the fix label Jul 23, 2023
@djm2k djm2k force-pushed the fix/flashcard-tag-block-title branch 3 times, most recently from 6c12d41 to 1a8d690 Compare August 3, 2023 19:52
@djm2k
Copy link
Contributor Author
djm2k commented Aug 3, 2023

Rebased and moved comments to docstring, move regex explanation to commit message after looking at other PR conventions.

@djm2k djm2k changed the title enhance: add card hashtag to line without property fix: add card hashtag to line without property Aug 5, 2023
@djm2k djm2k force-pushed the fix/flashcard-tag-block-title branch 3 times, most recently from e53b589 to 5041641 Compare August 5, 2023 00:58
@cnrpman cnrpman added the looking-for-review PRs that requires attention label Aug 10, 2023
Use a RegEx to append #card to lines without properties:
'(?m)' for multiline, '(?<!::.*)' to skip properties, ' ?' for optional space, '$' for end of line.
@djm2k djm2k force-pushed the fix/flashcard-tag-block-title branch from 5041641 to 98147c4 Compare August 21, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix looking-for-review PRs that requires attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flash cards] «Make flashcard» context menu command appends #card to properties
2 participants