diff --git a/src/var/lib/tyto/help/styles.css b/src/var/lib/tyto/help/styles.css index 4a202c8..21ecc2f 100644 --- a/src/var/lib/tyto/help/styles.css +++ b/src/var/lib/tyto/help/styles.css @@ -112,6 +112,13 @@ cite.cite { span.custom { } +/* Block_code */ +code.DOMAIN { +} +pre.bcode { +} +div.bcode { +} /* section for author and date */ section#article_infos { diff --git a/src/var/lib/tyto/program/tyto.py b/src/var/lib/tyto/program/tyto.py index 1c661c2..49b36bf 100644 --- a/src/var/lib/tyto/program/tyto.py +++ b/src/var/lib/tyto/program/tyto.py @@ -329,14 +329,6 @@ def protect_bcodes_quotes(process, post_bottom): b64_quote = b64('Encode', quote, 'Q64.', '.Q64') line = b64_quote - ''' - # Remove coemments and empty lines for wip - if not in_quote and not in_bcode: - if not line: - continue - if line.startswith('#') and not line.startswith(titles_tags): - continue - ''' # Counters and keep tags for check process #----------------------------------------- @@ -344,21 +336,19 @@ def protect_bcodes_quotes(process, post_bottom): if in_bcode and not start_bcode \ or in_quote and not start_quote : line = '#-Protectedline-' - - + # Set new article content for wip process #---------------------------------------- elif process == "wip": # Remove empty line and comments if not in_quote and not in_bcode: - if not line: + if not line: continue - elif line.startswith('#') \ - and not line.startswith(titles_tags): + elif line.startswith('#') and not line.startswith(titles_tags): continue # bcode convertion to base64 - if in_bcode: + elif in_bcode: # Convert lines to b64 if not bcode: bcode = line else: bcode = '%s\n%s'%(bcode, line) diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index eee8cda..1784fd9 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -92,7 +92,9 @@ def manage(target): # wip is up-to-date: ask to wip again else: logs.out("19", db.date_wip, False) - form.asking(' ├ [%s] %s%s '%(db.title, langs.site.wip_new, langs.site.q), True) + form.asking(' ├ [%s] %s%s '%( + db.title, langs.site.wip_new, langs.site.q + ), True) wip_article(db.uri_file) @@ -236,8 +238,7 @@ def file_to_string(post_file): continue if sep: - if not line: continue - elif not post_bottom: post_bottom = line + if not post_bottom: post_bottom = line else: post_bottom = '%s\n%s'%(post_bottom, line) else: if not post_header: post_header = line @@ -676,19 +677,19 @@ def wip_bcodes(): if line.startswith(tyto.words_tags[12][0]): set_css = tyto.get_css(line) html_bcode = \ - '
\n'%set_css + \
- ' '
+ '\n'%set_css + \
+ ' '
# closed marker
elif line.startswith(tyto.words_tags[12][1]):
html_bcode = \
- '%s\n
\n'%html_bcode + \
- '
'
+ '%s\n \n'%html_bcode + \
+ ''
# Block-code content per line
else:
html_bcode = \
- '%s\n %s'%(
+ '%s\n