Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ Just create a file called `filename.todo`, format it properly and you have a .to
What's important is that the first characters in each line are `-` (list), then an optional space ` `, then `[`, then optionally `x`, then `]`, then the actual todo content.

## Regex
I'm terrible at Regular Expressions (so please submit a pull request), but this is one way of handling the parsing.

```regex
^-(\s|)\[(x|)\](\s|).*$
^\s*-\s*\[x?\].*$
```

in JavaScript
with JavaScript flags,

```regex
/^-(\s|)\[(x|)\](\s|).*$/gi
/^\s*-\s*\[x?\].*$/gim
```

A test case, with this regex
Expand Down