atom-todo-show icon indicating copy to clipboard operation
atom-todo-show copied to clipboard

Improvements for tags: Allow non-ASCII characters; allow tags anywhere in the line

Open ThomasLandauer opened this issue 7 years ago • 0 comments
trafficstars

First of all: The idea to allow tags to organize TODO's is excellent! I've never seen this anywhere else.

A few ideas to improve tags:

  1. Currently, only ASCII characters are allowed in tags, which is a problem for certain languages (e.g. German). The reason is \w at https://github.com/mrodalgaard/atom-todo-show/blob/master/lib/todo-model.coffee#L66 which only accepts "word characters". However, this could be solved by making the regex-engine locale-sensitive - at least http://www.php.net/manual/en/regexp.reference.escape.php says so. Do you have an idea how this could be achieved?
    Or what about taking another approach and consider basically anything prefixed by # as a tag, something like #[^#\s\.,]+

  2. Is there a specific reason why tags are only allowed at the end of the line? More general: Is there any reference for the "tag" syntax you're using?
    If you would omit the $ from the regex, tags would be possible anywhere: "TODO: #object #profile do this"

  3. Minor: I sometimes add an URL to a TODO for later reference. If the URL contains an html anchor (like e.g. www.example.com/foo.html#bar ), the bar part is extracted as a tag.

ThomasLandauer avatar Sep 09 '18 22:09 ThomasLandauer