Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Fix regex for detecting project, context, tag #11

Merged
merged 2 commits into from
May 21, 2018
Merged

Fix regex for detecting project, context, tag #11

merged 2 commits into from
May 21, 2018

Conversation

Strubbl
Copy link
Contributor

@Strubbl Strubbl commented May 21, 2018

This commit fixes the regex for detection of projects, contexts and tags
in the todo lines. It switches from "zero or more" quantifier to "one or
more" quantifier, because otherwise empty projects or contexts would be
allowed and something like "test:" would be a tag.

This commit fixes the regex for detection of projects, contexts and tags
in the todo lines. It switches from "zero or more" quantifier to "one or
more" quantifier, because otherwise empty projects or contexts would be
allowed and something like "test:" would be a tag.
@Strubbl
Copy link
Contributor Author

Strubbl commented May 21, 2018

Tag regex is still not very good. I try to find a better solution

This commit changes the tag regex to not match URLs anymore. The new
tag regex matches with the following examples:

line: 2018-05-20 h:1 @pc +music us/hh////:a//asdf
match1:  h:1
match2:  us/hh////:a

line: 2018-05-19 read http://todotxt.org/  +background
match: NONE
@Strubbl
Copy link
Contributor Author

Strubbl commented May 21, 2018

With the latest commit, URLs are not matched as tags anymore.

@EpocDotFr EpocDotFr merged commit 07a0825 into EpocDotFr:master May 21, 2018
@EpocDotFr
Copy link
Owner

EpocDotFr commented May 21, 2018

Thank you for you PR! I'll release a new version of todotxtio on PyPI soon.

Edit: released 0.2.3 https://github.com/EpocDotFr/todotxtio/releases/tag/todotxtio-0.2.3

Edit 2: PyPI package updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants