From e649711ca4ed96cbe46a095ce0ca4a83dba0e2c1 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Tue, 1 Apr 2014 20:14:49 -0700 Subject: [PATCH] Small update to parsing regex --- CHANGELOG.md | 1 + jrnl/Journal.py | 2 +- jrnl/__init__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efe8ba88..137cc1d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.7 (December 22, 2013) +* __1.7.18__ Small update to parsing regex * __1.7.17__ Fixes writing new lines between entries * __1.7.16__ Even more unicode fixes! * __1.7.15__ More unicode fixes diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 68417bea..3a7f00f5 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -280,7 +280,7 @@ class Journal(object): raw = raw.replace('\\n ', '\n').replace('\\n', '\n') starred = False # 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, "") starred = False if not date: diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 212aae6f..a96791e4 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line. from __future__ import absolute_import __title__ = 'jrnl' -__version__ = '1.7.17' +__version__ = '1.7.18' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'