Corrected a couple of typos and left some todo
This commit is contained in:
parent
c7104175bc
commit
3e00a31041
|
|
@ -1,5 +1,4 @@
|
||||||
# Module for final generation of the translated website
|
# Module for final generation of the translated website
|
||||||
|
|
||||||
from bootstraparse.modules import config, pathresolver, error_mngr
|
from bootstraparse.modules import config, pathresolver, error_mngr
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
@ -23,13 +22,15 @@ def format_optionals(optionals):
|
||||||
on one hand and var on the other hand.
|
on one hand and var on the other hand.
|
||||||
rtype: str
|
rtype: str
|
||||||
"""
|
"""
|
||||||
if optionals != '':
|
if optionals:
|
||||||
h, c = optionals.content.html_insert, optionals.content.class_insert
|
h, c = optionals.content.html_insert, optionals.content.class_insert # TODO : Simplify this
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
if h != '':
|
if h != '':
|
||||||
h = h.content.html_insert
|
h = h.content.html_insert
|
||||||
output = f'''{' '.join(h)}{' ' if h and c else ''}{f'class="{c}"' if c else ''}'''
|
if c != '':
|
||||||
|
c = " ".join(c.content.class_insert) # TODO : Simplify this (sic.)
|
||||||
|
output = f'''{' '.join(h)}{' ' if h and c else ''}{f'class="{c}"' if c else ''}''' # The inconsistency is here with " and '
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue