Zim

Merge lp:~bkidwell/zim/quicknote-checkbox into lp:~jaap.karssenberg/zim/pyzim

Proposed by Brendan Kidwell
Status: Merged
Merged at revision: 676
Proposed branch: lp:~bkidwell/zim/quicknote-checkbox
Merge into: lp:~jaap.karssenberg/zim/pyzim
Diff against target: 13 lines (+3/-0)
1 file modified
zim/plugins/quicknote.py (+3/-0)
To merge this branch: bzr merge lp:~bkidwell/zim/quicknote-checkbox
Reviewer Review Type Date Requested Status
Jaap Karssenberg Approve
Review via email: mp+199596@code.launchpad.net

Description of the change

Fix for lp:791793

To post a comment you must log in.
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Merged in pyzim-refactor

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'zim/plugins/quicknote.py'
2--- zim/plugins/quicknote.py 2013-03-23 16:39:07 +0000
3+++ zim/plugins/quicknote.py 2013-12-19 00:42:15 +0000
4@@ -325,6 +325,9 @@
5 bounds = buffer.get_bounds()
6 text = buffer.get_text(*bounds)
7
8+ # Change "[]" at start of line into "[ ]" so checkboxes get inserted correctly
9+ text = re.sub(r'^(\s*)\[\](\s)', r'\1[ ]\2', text, flags=re.M)
10+
11 if self.form['new_page']:
12 if not self.form.widgets['namespace'].get_input_valid() \
13 or not self.form['basename']: