Small update to parsing regex

This commit is contained in:
Manuel Ebert 2014-04-01 20:14:49 -07:00
parent 0a2dc73716
commit e649711ca4
3 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@ Changelog
### 1.7 (December 22, 2013) ### 1.7 (December 22, 2013)
* __1.7.18__ Small update to parsing regex
* __1.7.17__ Fixes writing new lines between entries * __1.7.17__ Fixes writing new lines between entries
* __1.7.16__ Even more unicode fixes! * __1.7.16__ Even more unicode fixes!
* __1.7.15__ More unicode fixes * __1.7.15__ More unicode fixes

View file

@ -280,7 +280,7 @@ class Journal(object):
raw = raw.replace('\\n ', '\n').replace('\\n', '\n') raw = raw.replace('\\n ', '\n').replace('\\n', '\n')
starred = False starred = False
# Split raw text into title and body # Split raw text into title and body
sep = re.search("\n|[\?!.]+ *", raw) sep = re.search("\n|[\?!.]+ *\n?", raw)
title, body = (raw[:sep.end()], raw[sep.end():]) if sep else (raw, "") title, body = (raw[:sep.end()], raw[sep.end():]) if sep else (raw, "")
starred = False starred = False
if not date: if not date:

View file

@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line.
from __future__ import absolute_import from __future__ import absolute_import
__title__ = 'jrnl' __title__ = 'jrnl'
__version__ = '1.7.17' __version__ = '1.7.18'
__author__ = 'Manuel Ebert' __author__ = 'Manuel Ebert'
__license__ = 'MIT License' __license__ = 'MIT License'
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'