Commit graph

12 commits

Author SHA1 Message Date
0454dc3a3c Remove empty chunks when joining 2019-06-20 20:48:33 +00:00
148f2d2667 Remove unused function
As far as I know, the function produced incorrect results. I don't need
it anways, so I'm just throwing it out.
2019-06-08 09:10:59 +00:00
c035817ba8 Unit test markup and fix all issues found 2019-06-08 09:10:59 +00:00
7e2c802364 Increase spacing in modules 2019-06-08 09:10:59 +00:00
55cea8ea7f Fix AttributedText types 2019-06-08 09:10:59 +00:00
f222b6a390 Add split_by and str-like join 2019-06-08 09:10:59 +00:00
4a1db74245 Improve AttributedText constructor usability
The AttributedText constructor now allows setting attributes as a dict
via the "attributes" argument. It also interprets all other named
arguments as attributes, which override the attributes set via the
"attributes" argument.
2019-06-08 09:10:59 +00:00
3a542caac7 Alias AttributedText to AT 2019-06-08 09:10:59 +00:00
7c89ada5f0 Reorganize files 2019-06-08 09:10:59 +00:00
2e56b1b925 Satisfy mypy and (re-)move files 2019-06-08 09:10:59 +00:00
2eb26c5532 Rename and add attribute setting/getting 2019-06-08 09:10:59 +00:00
96f29a49cf Add class representing text with attributes
Attributes can be set and deleted on sections of a MarkedUp object.
Chunk attributes work like dicts (name + arbitrary value). This can be
used to set color info or attach a link/URL to parts of a string, for
example.
2019-06-08 09:10:59 +00:00