Commit graph

12 commits

Author SHA1 Message Date
Tom Smeding
2a79d9c38b Another fix to the a hypothesis precondition
Addition to 91b42e8 since I messed up
2020-08-30 20:02:20 +02:00
Tom Smeding
91b42e8671 Fix test hypothesis precondition 2020-08-29 20:19:01 +02:00
Tom Smeding
a5e6434c31
Fix handling of backslashes in relation to code blocks (#203)
Backslashes are now correctly preserved inside code blocks while still allowing the user to escape a backtick. The handling of backticks and bold/italic wrappers was unified so that they share the same escaping code.

Backslashes only escape Markdown wrapper characters (*, _, `). If they are encountered before another character, they are considered literal.
2020-06-03 11:06:16 +00:00
Tom Smeding
170c5811a3
Better half-markdown (#202)
Better half-markdown.

This fixes some issues with the current semi-markdown-parser to make life easier until a full markdown parser is implemented.

Changes:
- A * that would normally start italics but isn't matched by a closing *, is now left alone.
- A ` that would normally start a code block but isn't matched by a closing `, is now left alone.
- Backslashes should work as expected.
- Support for **bold** and the alternative _italic_ style.
2020-05-31 12:09:29 +00:00
Denis Kasak
e9e5facc7c Add (disabled) test for unbalanced asterisks at the start of line. 2019-01-27 15:25:43 +01:00
Damir Jelić
b61e9ecbd8 tests: Add more format parsing tests. 2019-01-26 16:48:06 +01:00
Damir Jelić
549a13f204 tests: Add color input line parsing test. 2019-01-25 21:51:49 +01:00
Denis Kasak
e39b6a82b1 Add test for normalization of spaces in inline code. 2019-01-16 16:37:53 +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
poljar (Damir Jelić)
416e154359 Fix tests for python2. 2018-03-18 23:31:57 +01:00
Denis Kasak
d7485cc746 Always output HTML colors as hex codes. 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