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

Hierarchical tags #115

Merged
merged 25 commits into from
Apr 17, 2020
Merged

Hierarchical tags #115

merged 25 commits into from
Apr 17, 2020

Conversation

felko
Copy link
Contributor

@felko felko commented Apr 17, 2020

This PR implements hierarchical tags as described in #49.

Tags can be nested using the same syntax as POSIX file paths, and queries support tag globbing as well (including recursive globs).

@srid srid self-requested a review April 17, 2020 17:45
Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

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

Nice work! Here's my initial review. I'll test it locally a bit later.

src/Neuron/Web/View.hs Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Tag.hs Outdated Show resolved Hide resolved
test/Neuron/Zettelkasten/TagSpec.hs Show resolved Hide resolved
src/Neuron/Zettelkasten/Query.hs Outdated Show resolved Hide resolved
test/Neuron/Zettelkasten/TagSpec.hs Outdated Show resolved Hide resolved
@felko
Copy link
Contributor Author

felko commented Apr 17, 2020

While writing more tests I noticed that trailing / might cause problems For example, journal did not match journal/ and journal/*/** matches journal/. Should tags and tag patterns be parsed or normalized?

@felko felko closed this Apr 17, 2020
@felko
Copy link
Contributor Author

felko commented Apr 17, 2020

Sorry, missclick

@felko felko reopened this Apr 17, 2020
@srid
Copy link
Owner

srid commented Apr 17, 2020

"journal/" is not a sensible tag (why would anyone add a slash at the end?). We don't have to support it.

@srid srid self-requested a review April 17, 2020 21:36
@srid srid merged commit 511e6ea into srid:master Apr 17, 2020
@felko felko deleted the hierarchical-tags branch April 17, 2020 21:43
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