diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 0c84e67..babd408 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -86,6 +86,7 @@ def wip_article(target): wip_words_tags() # Paragraphs, strongs, italics wip_links() # Links_%i from headers in DB wip_images() # Images_%i from headers in DB + wip_titles() # Quotes. Decode base64 Q64 and convert to HTML wip_quotes() @@ -454,24 +455,74 @@ def wip_bcodes(): # Convert src_bcode for line in src_bcode.rsplit('\n'): - # CSS + opened marker if line.startswith(tyto.words_tags[12][0]): set_css = tyto.get_css(line) html_bcode = '
\n'%set_css + \
' '
-
# closed marker
elif line.startswith(tyto.words_tags[12][1]):
html_bcode = '%s\n
\n'%html_bcode + \
'
'
-
# Block-code content per line
else:
html_bcode = '%s\n %s'%(html_bcode, line)
article_bottom = article_bottom.replace(rep_bcode, html_bcode)
+
+#========================================#
+# Convert titles to HTML #
+# Check between titles to set div or not #
+#----------------------------------------#
+def wip_titles():
+ global article_bottom
+ article_temp = article_bottom
+ article_tmp2 = '' # COnstruct article, without empty lines
+
+ for line in article_bottom.rsplit('\n'):
+ if line.startswith('#'):
+ hx = line[1]
+ title_cont = line[2: len(line)].lstrip()
+ title_html = '