Denis Kasak
6203a84553
Use uniform spelling: colour -> color.
2019-01-13 13:45:15 +01:00
Denis Kasak
ef7b2b7eaf
Fix FormattedString test failure.
...
Initialize FormattedString().attributes to DEFAULT_ATTRIBUTES so all the
attributes are always present. FormattedString is now a class, not
a namedtuple instance.
2018-11-07 13:34:44 +01:00
Denis Kasak
a74ac888a3
Fix typo: DEFAULT_ATRIBUTES -> DEFAULT_ATTRIBUTES
2018-11-07 12:57:32 +01:00
Denis Kasak
560c8d0c54
Make pygments style configurable.
2018-11-07 12:34:31 +01:00
Denis Kasak
1a796322f3
Simplify Formatted.to_weechat logic.
2018-11-07 12:34:28 +01:00
Damir Jelić
d97655d68c
matrix: Style fixes.
2018-08-30 16:35:05 +02:00
Damir Jelić
798e779391
colors: Handle quoted code segments.
2018-08-30 13:37:13 +02:00
Damir Jelić
67141c980a
matrix: mypy fixes.
2018-08-29 20:57:12 +02:00
Damir Jelić
05a413f7cb
matrix: Style fixes and cleanup.
2018-08-29 19:42:44 +02:00
Damir Jelić
f8a318fef2
colors: Fix blockquote coloring.
2018-08-29 15:57:39 +02:00
Damir Jelić
19eeec4f3b
config: Big config refactor.
2018-08-29 15:35:36 +02:00
Damir Jelić
cb5a4ad1d7
colors: Remove additional newlines from code segments.
2018-08-28 10:53:29 +02:00
Damir Jelić
166ff3b2e3
colors: Replace multiple newlines with a single one.
2018-08-21 12:33:08 +02:00
Damir Jelić
44e065d818
colors: Strip whitespace from both ends of the formatted string.
2018-08-20 13:06:56 +02:00
Damir Jelić
1e016ad495
colors: Colorize code snippets.
2018-08-20 11:12:28 +02:00
Damir Jelić
7f71bf47a1
colors: Colorize matrix block quotes.
2018-08-20 11:11:54 +02:00
Damir Jelić
8fca7d19c7
colors: Rework newline adding for blockquotes and <p> tags.
2018-08-09 17:52:24 +02:00
Damir Jelić
94330922eb
colors: Handle the <p> tag.
2018-08-08 20:42:16 +02:00
Denis Kasak
6e9275da7f
Fix charrefs.
...
Forgot to include # when reconstructing charrefs from their "name".
2018-03-24 14:38:00 +01:00
Denis Kasak
42f34f749b
Handle combination of strikethrough and other attributes.
...
Strikethrough has to be done first, before handling any other attribute,
because otherwise it doesn't render correctly.
The following changes were made:
1. When striking due to redaction, we simply strip all the other
attributes and then do the strikethrough, because this is the only
practical option.
2. When rendering rich text received from the server, we ensure we
handle strikethrough first, before any other attribute.
2018-03-23 09:51:58 +01:00
Denis Kasak
392698b9b5
MatrixHtmlParser: Factor out adding substrings into a method.
2018-03-22 20:47:10 +01:00
Denis Kasak
c6e34dd0b1
Escape each HTML ref individually.
2018-03-22 20:47:03 +01:00
Denis Kasak
4be54d032e
Implement MatrixHtmlParser.unescape shim.
...
This is for Python 2/3 compatibility, since Python 3 deprecates the
instance method and Python 2 doesn't have html.unescape.
2018-03-19 11:01:24 +01:00
Denis Kasak
eea8936822
Unescape all HTML entities prior to parsing.
2018-03-19 11:01:24 +01:00
poljar (Damir Jelić)
c9d953dc4d
colors: Fix index out of range error for markdown style emph.
2018-03-12 19:53:27 +01:00
poljar (Damir Jelić)
207fb44bdc
colors: Add markdown style italics support.
2018-03-06 22:57:57 +01:00
Denis Kasak
d7485cc746
Always output HTML colors as hex codes.
2018-03-03 12:34:26 +01:00
Denis Kasak
8bb383220f
Fix numbering comment for color "white".
2018-03-03 12:34:26 +01:00
Denis Kasak
cc993df68e
Rename first_16 -> weechat_basic_colors.
2018-03-03 12:34:26 +01:00
Denis Kasak
59138a9824
if -> elif
2018-03-03 12:34:26 +01:00
Denis Kasak
c18c10774e
Remove erroneously repeated condition.
2018-03-03 12:34:26 +01:00
poljar (Damir Jelić)
fc6a6e9da9
tests: Implement mock weechat module and add some color tests.
2018-03-02 22:59:43 +01:00
poljar (Damir Jelić)
4fc5b8b41e
colors: Produce email style quotes from html block quotes.
2018-03-01 11:56:38 +01:00
poljar (Damir Jelić)
5791a48b3f
Handle room redaction events.
2018-02-25 14:53:48 +01:00
poljar (Damir Jelić)
2f4137933f
Reformat the source tree using yapf.
2018-02-21 17:04:03 +01:00
poljar (Damir Jelić)
b22deceb00
Mypy fixes.
2018-02-12 10:56:28 +01:00
poljar (Damir Jelić)
6b87994a94
Rework of the color handling, add a Formatted class.
2018-02-10 15:34:40 +01:00
poljar (Damir Jelić)
39c8591926
Refactor the SEND message type.
2018-02-08 14:19:09 +01:00
poljar (Damir Jelić)
5efea04b64
Change the licence to ISC and add license headers.
2018-01-26 18:22:06 +01:00
poljar (Damir Jelić)
27c0836eb5
Move the weechat command setup and some commands.
2018-01-26 17:57:42 +01:00
poljar (Damir Jelić)
85f3a9eef0
Add type annotations to some functions in color.py.
2018-01-26 13:41:24 +01:00
poljar (Damir Jelić)
62adae5aa3
Start splitting up the script into different files.
2018-01-26 12:18:52 +01:00