self.debug_print("Note title '%s'" % title)
if contents != '' and not contents.isspace():
contents = strikethrough.sub('', contents)
+ self.debug_print("Note contents:\n%s" % contents)
contents = contents.replace(u'\u2610 ',
u'<LI><INPUT TYPE="checkbox"> ')
-
- #self.debug_print("Note contents:\n%s" % contents)
contents = linkify.sub(r'<a href="\1">\1</a>', contents)
individual_lines = contents.split("\n")
length = len(x)
if length > max_length:
max_length = length
- spaces = len(x) - len(x.lstrip(' '))
- spaces /= 2
- spaces = int(spaces)
+ leading_spaces = len(x) - len(x.lstrip(' '))
+ leading_spaces /= 2
+ leading_spaces = int(leading_spaces)
x = x.lstrip(' ')
- for y in range(0, spaces):
+ # self.debug_print(" * (%d) '%s'" % (leading_spaces, x))
+ for y in range(0, leading_spaces):
x = "<UL>" + x
- for y in range(0, spaces):
+ for y in range(0, leading_spaces):
x = x + "</UL>"
contents = contents + x + "\n"
return True
# Test
-x = gkeep_renderer({"Test", 1234})
-x.periodic_render("Test")
+#x = gkeep_renderer({"Test", 1234})
+#x.periodic_render("Test")