diff options
Diffstat (limited to 'kronos/parser.py')
-rw-r--r-- | kronos/parser.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kronos/parser.py b/kronos/parser.py index 147682f..cf848e0 100644 --- a/kronos/parser.py +++ b/kronos/parser.py | |||
@@ -11,16 +11,15 @@ from kronos.model import Activity | |||
11 | 11 | ||
12 | 12 | ||
13 | def parse_activity(text): | 13 | def parse_activity(text): |
14 | tokens = text.split(' ') | ||
15 | tags = _parse_tags(tokens) | ||
16 | text = _strip_tags(tokens) | ||
17 | |||
14 | description = None | 18 | description = None |
15 | tags = [] | ||
16 | if ',' in text: | 19 | if ',' in text: |
17 | text, description = text.split(',', 1) | 20 | text, description = text.split(',', 1) |
18 | description = description.strip() | 21 | description = description.strip() |
19 | 22 | ||
20 | tokens = description.split(' ') | ||
21 | tags = _parse_tags(tokens) | ||
22 | description = _strip_tags(tokens) | ||
23 | |||
24 | category = None | 23 | category = None |
25 | if '@' in text: | 24 | if '@' in text: |
26 | text, category = text.split('@', 1) | 25 | text, category = text.split('@', 1) |