-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Ignore markdown codeblocks for tags #66
Conversation
Thanks for giving this a go. When I get some time I'll take a look and run some tests 👍 |
Hi @elmodor, I've had a look at this this morning and have some thoughts. My first thought is that I also think that codeblock content should still be indexed and therefore searchable. Just not as tags. So I think we need to something along these lines: |
I agree, I should have named it Regarding your diagram, I think there should not be a line from tags to content_ex_tags?
|
I had in mind to use Of course, I can imagine the most efficient way of doing all of this would be to update |
I wasn't able to get one line |
The changes look good. When I get a chance I just want to run a couple of tests on my dataset. I'm interested to see if there's much of a change to the indexing speed and I'm also keen to see the difference in tags before and after this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump INDEX_SCHEMA_VERSION
constant to 4. This will force an index rebuild when flatnotes is updated.
Index rebuild times seem unchanged and having compared my list of indexed tags before and after the changes, I can confirm the hashtags found in code blocks are no longer indexed. Just one change requested and then this is ok to merge. |
* Ignore markdown codeblocks for tags * Changed `content_ex_tags` to use `content` instead of `content_ex_codeblock` * Bumped `INDEX_SCHEMA_VERSION`
This reverts commit f7d206c.
This reverts commit f7d206c.
* Revert "3.2.2" This reverts commit 6b601fe. * Revert "Corrected group variable typo in entrypoint.sh" This reverts commit 3cb86a1. * Revert "Updated README to resolve dullage#100" This reverts commit 05fc652. * Revert "3.2.1" This reverts commit 4651830. * Revert "Prevent recently modified from showing in read_only mode" This reverts commit a3aa2a8. * Revert "Various config settings are no longer required in read_only mode" This reverts commit 3535978. * Revert "3.2.0" This reverts commit ee328bc. * Revert "Updated README" This reverts commit 253155a. * Revert "Updated README" This reverts commit b731a1c. * Revert "Implement read-only mode" This reverts commit 608a414. * Revert "Fix theme issues. Resolves dullage#94." This reverts commit 20725e8. * Revert "Added _edit_only auth types" This reverts commit 0e2a3f5. * Revert "Remove async from path functions" This reverts commit 161978c. * Revert "3.1.1" This reverts commit 8881755. * Revert "Fix issue clicking links in unordered lists" This reverts commit c3a073d. * Revert "Disable checkboxes in view mode. Resolves dullage#81." This reverts commit 1548b66. * Revert "Formatting changes only" This reverts commit 3aeb903. * Revert "Assign ID to headers with CustomHTMLRenderer (dullage#84)" This reverts commit 26e6b56. * Revert "Ensure root knows when note title changes. Fixes dullage#82." This reverts commit 851c640. * Revert "Override default font-family for code blocks to fix dullage#78" This reverts commit f9af501. * Revert "Added VOLUME and EXPOSE keywords to Dockerfile" This reverts commit 44e2b7a. * Revert "3.1.0" This reverts commit 8aa641c. * Revert "Enabled extended autolinks" This reverts commit 4b477f6. * Revert "Ignore markdown codeblocks for tags (dullage#66)" This reverts commit f7d206c. * Revert "Fix get_tags method" This reverts commit 99c2909. * Revert "Updated README" This reverts commit 39d54fc. * Revert "3.0.3" This reverts commit 5acf117. * Revert "Secret key is now printed to console if using TOTP allowing for manual entry" This reverts commit 5b74804. * Revert "3.0.2" This reverts commit 15d93af. * Revert "Table headers in WYSIWYG editor now honour theme color" This reverts commit 050b6d8. * Revert "PR comments" This reverts commit efdf4bf. * Revert "Update site.webmanifest" This reverts commit 285ab5d.
* Ignore markdown codeblocks for tags * Changed `content_ex_tags` to use `content` instead of `content_ex_codeblock` * Bumped `INDEX_SCHEMA_VERSION`
3.2.2 Revert "Corrected group variable typo in entrypoint.sh" This reverts commit 3cb86a1. Revert "Updated README to resolve dullage#100" This reverts commit 05fc652. Revert "3.2.1" This reverts commit 4651830. Revert "Prevent recently modified from showing in read_only mode" This reverts commit a3aa2a8. Revert "Various config settings are no longer required in read_only mode" This reverts commit 3535978. Revert "3.2.0" This reverts commit ee328bc. Revert "Updated README" This reverts commit 253155a. Revert "Updated README" This reverts commit b731a1c. Revert "Implement read-only mode" This reverts commit 608a414. Revert "Fix theme issues. Resolves dullage#94." This reverts commit 20725e8. Revert "Added _edit_only auth types" This reverts commit 0e2a3f5. Revert "Remove async from path functions" This reverts commit 161978c. Revert "3.1.1" This reverts commit 8881755. Revert "Fix issue clicking links in unordered lists" This reverts commit c3a073d. Revert "Disable checkboxes in view mode. Resolves dullage#81." This reverts commit 1548b66. Revert "Formatting changes only" This reverts commit 3aeb903. Revert "Assign ID to headers with CustomHTMLRenderer (dullage#84)" This reverts commit 26e6b56. Revert "Ensure root knows when note title changes. Fixes dullage#82." This reverts commit 851c640. Revert "Override default font-family for code blocks to fix dullage#78" This reverts commit f9af501. Revert "Added VOLUME and EXPOSE keywords to Dockerfile" This reverts commit 44e2b7a. Revert "3.1.0" This reverts commit 8aa641c. Revert "Enabled extended autolinks" This reverts commit 4b477f6. Revert "Ignore markdown codeblocks for tags (dullage#66)" This reverts commit f7d206c. Revert "Fix get_tags method" This reverts commit 99c2909. Revert "Updated README" This reverts commit 39d54fc. Revert "3.0.3" This reverts commit 5acf117. Revert "Secret key is now printed to console if using TOTP allowing for manual entry" This reverts commit 5b74804. Revert "3.0.2" This reverts commit 15d93af. Revert "Table headers in WYSIWYG editor now honour theme color" This reverts commit 050b6d8. Revert "PR comments" This reverts commit efdf4bf. Revert "Update site.webmanifest" This reverts commit 285ab5d. Update site.webmanifest PR comments Table headers in WYSIWYG editor now honour theme color 3.0.2 Secret key is now printed to console if using TOTP allowing for manual entry 3.0.3 Updated README Fix get_tags method Ignore markdown codeblocks for tags (dullage#66) * Ignore markdown codeblocks for tags * Changed `content_ex_tags` to use `content` instead of `content_ex_codeblock` * Bumped `INDEX_SCHEMA_VERSION` Enabled extended autolinks 3.1.0 Added VOLUME and EXPOSE keywords to Dockerfile Override default font-family for code blocks to fix dullage#78 Ensure root knows when note title changes. Fixes dullage#82. Assign ID to headers with CustomHTMLRenderer (dullage#84) Formatting changes only Disable checkboxes in view mode. Resolves dullage#81. Fix issue clicking links in unordered lists 3.1.1 Remove async from path functions Added _edit_only auth types Fix theme issues. Resolves dullage#94. Implement read-only mode Updated README Updated README 3.2.0 Various config settings are no longer required in read_only mode Prevent recently modified from showing in read_only mode 3.2.1 Updated README to resolve dullage#100 Corrected group variable typo in entrypoint.sh 3.2.2 Revert "Master" (#3) * Revert "3.2.2" This reverts commit 6b601fe. * Revert "Corrected group variable typo in entrypoint.sh" This reverts commit 3cb86a1. * Revert "Updated README to resolve dullage#100" This reverts commit 05fc652. * Revert "3.2.1" This reverts commit 4651830. * Revert "Prevent recently modified from showing in read_only mode" This reverts commit a3aa2a8. * Revert "Various config settings are no longer required in read_only mode" This reverts commit 3535978. * Revert "3.2.0" This reverts commit ee328bc. * Revert "Updated README" This reverts commit 253155a. * Revert "Updated README" This reverts commit b731a1c. * Revert "Implement read-only mode" This reverts commit 608a414. * Revert "Fix theme issues. Resolves dullage#94." This reverts commit 20725e8. * Revert "Added _edit_only auth types" This reverts commit 0e2a3f5. * Revert "Remove async from path functions" This reverts commit 161978c. * Revert "3.1.1" This reverts commit 8881755. * Revert "Fix issue clicking links in unordered lists" This reverts commit c3a073d. * Revert "Disable checkboxes in view mode. Resolves dullage#81." This reverts commit 1548b66. * Revert "Formatting changes only" This reverts commit 3aeb903. * Revert "Assign ID to headers with CustomHTMLRenderer (dullage#84)" This reverts commit 26e6b56. * Revert "Ensure root knows when note title changes. Fixes dullage#82." This reverts commit 851c640. * Revert "Override default font-family for code blocks to fix dullage#78" This reverts commit f9af501. * Revert "Added VOLUME and EXPOSE keywords to Dockerfile" This reverts commit 44e2b7a. * Revert "3.1.0" This reverts commit 8aa641c. * Revert "Enabled extended autolinks" This reverts commit 4b477f6. * Revert "Ignore markdown codeblocks for tags (dullage#66)" This reverts commit f7d206c. * Revert "Fix get_tags method" This reverts commit 99c2909. * Revert "Updated README" This reverts commit 39d54fc. * Revert "3.0.3" This reverts commit 5acf117. * Revert "Secret key is now printed to console if using TOTP allowing for manual entry" This reverts commit 5b74804. * Revert "3.0.2" This reverts commit 15d93af. * Revert "Table headers in WYSIWYG editor now honour theme color" This reverts commit 050b6d8. * Revert "PR comments" This reverts commit efdf4bf. * Revert "Update site.webmanifest" This reverts commit 285ab5d. Revert "Revert "Master" (#3)" This reverts commit 44e3fc4.
* Update site.webmanifest * PR comments * Table headers in WYSIWYG editor now honour theme color * 3.0.2 * Secret key is now printed to console if using TOTP allowing for manual entry * 3.0.3 * Updated README * Fix get_tags method * Ignore markdown codeblocks for tags (dullage#66) * Ignore markdown codeblocks for tags * Changed `content_ex_tags` to use `content` instead of `content_ex_codeblock` * Bumped `INDEX_SCHEMA_VERSION` * Enabled extended autolinks * 3.1.0 * Added VOLUME and EXPOSE keywords to Dockerfile * Override default font-family for code blocks to fix dullage#78 * Ensure root knows when note title changes. Fixes dullage#82. * Assign ID to headers with CustomHTMLRenderer (dullage#84) * Formatting changes only * Disable checkboxes in view mode. Resolves dullage#81. * Fix issue clicking links in unordered lists * 3.1.1 * Remove async from path functions * Added _edit_only auth types * Fix theme issues. Resolves dullage#94. * Implement read-only mode * Updated README * Updated README * 3.2.0 * Various config settings are no longer required in read_only mode * Prevent recently modified from showing in read_only mode * 3.2.1 * Updated README to resolve dullage#100 * Corrected group variable typo in entrypoint.sh * 3.2.2 --------- Co-authored-by: Abraham Elias <46859202+abe6@users.noreply.github.com> Co-authored-by: Abraham Elias <abraham@manjaro> Co-authored-by: Adam Dullage <adam@dullage.com> Co-authored-by: Adam Dullage <adam.dullage@itris.co.uk> Co-authored-by: elmodor <elmodor@users.noreply.github.com> Co-authored-by: Pietro Bonaldo Gregori <45976792+pbogre@users.noreply.github.com>
Hello,
I took a quick look on how to exclude tags inside markdown codeblocks.
This should help out for #35
I'm using a second regex to remove all markdown codeblocks.
However, this will also remove the markdown from the return value of
extract_tags
.I tested the code with various markdown codeblocks. The tag
#TagIgnore
does not show up when searching fortags:tagignore
whiletags:tagok
shows up.Tested with following file: