Fix italic and underline parsing on the weechat input line.
This commit is contained in:
parent
43c42b3c17
commit
3351e3b4dd
1 changed files with 5 additions and 5 deletions
|
@ -773,7 +773,7 @@ def parse_input_line(line):
|
||||||
attributes = Default_format_attributes.copy()
|
attributes = Default_format_attributes.copy()
|
||||||
i = i + 1
|
i = i + 1
|
||||||
# Italic
|
# Italic
|
||||||
elif line[i] == "0\x1D":
|
elif line[i] == "\x1D":
|
||||||
if text:
|
if text:
|
||||||
substrings.append(FormattedString(text, attributes.copy()))
|
substrings.append(FormattedString(text, attributes.copy()))
|
||||||
text = ""
|
text = ""
|
||||||
|
@ -781,7 +781,7 @@ def parse_input_line(line):
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
# Underline
|
# Underline
|
||||||
elif line[i] == "0\x1F":
|
elif line[i] == "\x1F":
|
||||||
if text:
|
if text:
|
||||||
substrings.append(FormattedString(text, attributes.copy()))
|
substrings.append(FormattedString(text, attributes.copy()))
|
||||||
text = ""
|
text = ""
|
||||||
|
@ -889,10 +889,10 @@ def formatted_to_html(strings):
|
||||||
text=string,
|
text=string,
|
||||||
quote_off="</blockquote>")
|
quote_off="</blockquote>")
|
||||||
elif name == "fgcolor" and value:
|
elif name == "fgcolor" and value:
|
||||||
return "{underline_on}{text}{underline_off}".format(
|
return "{color_on}{text}{color_off}".format(
|
||||||
underline_on="<font color={color}>".format(color=value),
|
color_on="<font color={color}>".format(color=value),
|
||||||
text=string,
|
text=string,
|
||||||
underline_off="</font>")
|
color_off="</font>")
|
||||||
|
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue