HTML divs should end in a line break, and use hex values for binary flags
This commit is contained in:
+1
-1
@@ -338,7 +338,7 @@ class ToHtml(Tokenizer):
|
||||
))
|
||||
retText += ", ".join(refTags)
|
||||
|
||||
return "<div>%s</div>" % retText
|
||||
return "<div>%s</div>\n" % retText
|
||||
|
||||
def _buildRegEx(self):
|
||||
"""Build the regular expressions
|
||||
|
||||
+20
-17
@@ -39,13 +39,15 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class Tokenizer():
|
||||
|
||||
FMT_B_B = 1 # Begin bold
|
||||
FMT_B_E = 2 # End bold
|
||||
FMT_I_B = 3 # Begin italics
|
||||
FMT_I_E = 4 # End italics
|
||||
FMT_D_B = 5 # Begin strikeout
|
||||
FMT_D_E = 6 # End strikeout
|
||||
# In-Text Format
|
||||
FMT_B_B = 1 # Begin bold
|
||||
FMT_B_E = 2 # End bold
|
||||
FMT_I_B = 3 # Begin italics
|
||||
FMT_I_E = 4 # End italics
|
||||
FMT_D_B = 5 # Begin strikeout
|
||||
FMT_D_E = 6 # End strikeout
|
||||
|
||||
# Block Type
|
||||
T_EMPTY = 1 # Empty line (new paragraph)
|
||||
T_SYNOPSIS = 2 # Synopsis comment
|
||||
T_COMMENT = 3 # Comment line
|
||||
@@ -59,17 +61,18 @@ class Tokenizer():
|
||||
T_SEP = 11 # Scene separator
|
||||
T_SKIP = 12 # Paragraph break
|
||||
|
||||
A_NONE = 0 # No special style
|
||||
A_LEFT = 1 # Left aligned
|
||||
A_RIGHT = 2 # Right aligned
|
||||
A_CENTRE = 4 # Centred
|
||||
A_JUSTIFY = 8 # Justified
|
||||
A_PBB = 16 # Page break before always
|
||||
A_PBB_AV = 32 # Page break before avoid
|
||||
A_PBB_NO = 64 # Page break before never
|
||||
A_PBA = 128 # Page break after always
|
||||
A_PBA_AV = 256 # Page break after avoid
|
||||
A_PBA_NO = 512 # Page break after avoid
|
||||
# Block Style
|
||||
A_NONE = 0x0000 # No special style
|
||||
A_LEFT = 0x0001 # Left aligned
|
||||
A_RIGHT = 0x0002 # Right aligned
|
||||
A_CENTRE = 0x0004 # Centred
|
||||
A_JUSTIFY = 0x0008 # Justified
|
||||
A_PBB = 0x0010 # Page break before always
|
||||
A_PBB_AV = 0x0020 # Page break before avoid
|
||||
A_PBB_NO = 0x0040 # Page break before never
|
||||
A_PBA = 0x0080 # Page break after always
|
||||
A_PBA_AV = 0x0100 # Page break after avoid
|
||||
A_PBA_NO = 0x0200 # Page break after avoid
|
||||
|
||||
def __init__(self, theProject, theParent):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user