Updating import script to handle \\\r case (import escaped javascript string)
authorCharles Holbrow <charlesholbrow@gmail.com>
Wed, 23 Jan 2013 20:15:13 +0000 (15:15 -0500)
committerCharles Holbrow <charlesholbrow@gmail.com>
Wed, 23 Jan 2013 20:15:13 +0000 (15:15 -0500)
bin/import_json/run.py

index 7bb1e2628a38bafefef7e9f3b8a943cf7a70a818..fd98853c5d7167ece8bf009a3236a8dd2f2f4495 100644 (file)
@@ -113,6 +113,7 @@ for note in note_dicts:
                # fix the weird javascript issue
                if n.html:
                        n.html = re.sub(r'\\(.)', r'\1', n.html)
+                       n.html = re.sub(r'\\\n', r'', n.html)
 
                # Add the tags, if any
                for t in tags: n.tags.add(t)