Commit graph

43 commits

Author SHA1 Message Date
Will McGugan
f7327de3f5 added test 2025-06-23 17:11:06 +01:00
Will McGugan
5daf203de9 padding property 2025-06-22 15:30:38 +01:00
Will McGugan
6ae321ad86
Merge branch 'master' into remove-typing-extensions-runtime 2025-06-18 18:49:34 +01:00
Will McGugan
82afcb4ff5 test fixes 2025-06-18 08:29:31 +01:00
Damian Shaw
27fe68c85f Remove all sys.version_info >= (3, 8) checks as Python 3.7 is no longer supported 2025-06-15 11:02:57 -04:00
Will McGugan
9b4e3f1783
Merge branch 'master' into fix-syntax-include-padding-with-background-color-override 2024-07-01 21:00:06 +01:00
Ofek Lev
eb357884ad Fix warning in test suite 2024-05-01 09:18:57 -04:00
TomJGooding
aea08b77be add test 2024-02-29 22:09:54 +00:00
Will McGugan
3f8c4af451 tests for 3.12 2023-09-30 14:35:17 +01:00
Will McGugan
42e1ec9157 relax tests for old pygments 2023-03-04 15:14:15 +00:00
Darren Burns
8e87818d19
Fix failing tests 2023-01-17 16:02:50 +00:00
Will McGugan
fe1ed5399e fix for syntax measure 2022-10-01 15:21:45 +01:00
Will McGugan
7d126c867f added test for measure 2022-09-20 10:49:04 +01:00
Will McGugan
ac69488768 fix for syntax measure 2022-09-20 10:44:10 +01:00
Olivier Philippon
6e634705b7 [syntax] silently clamp the column index of stylised ranges to the maximum possible value 2022-06-24 16:01:29 +01:00
Olivier Philippon
8e58adcab0 [syntax] address PR feedback for stylized ranges 2022-06-21 11:46:43 +01:00
Olivier Philippon
0b3379f528 [syntax] better API and performance for stylized ranges 2022-06-17 16:31:26 +01:00
Olivier Philippon
75315fabc5 [syntax] improve performance for stylize_ranges() 2022-06-16 16:38:36 +01:00
Olivier Philippon
ebc5d2797e [syntax] add a highlight_ranges optional arg to the Syntax ctor
With this new API we can apply a style from (LINE A, COLUMN A) to (LINE B, COLUMN B) - which is something we will need to be able to add arbitrary ranges to Syntax
2022-06-15 15:30:41 +01:00
Darren Burns
79a41db38f
Add padding support to Syntax (#2247)
* Add padding to Syntax constructor

* Add padding to from_path constructor, use correct type

* Padding for `Syntax` - support vertical padding

* Extract logic for create base syntax without padding

* Add test for padded `Syntax`

* Small refactor of Syntax padding

* Small refactor of Syntax padding

* Remove some dead code

* Update changelog
2022-05-03 16:32:50 +01:00
Michał Górny
8e3a0be6fb Fix test_syntax not to use identity comparison on string
Fix test_syntax to compare strings via "==" rather than "is", in order
to fix test failure on PyPy3.
2022-02-01 12:28:58 +01:00
Darren Burns
9247705bd8 Allow override of lexer in Syntax.from_path 2022-01-27 10:38:55 +00:00
Darren Burns
49e9fe9bd2 Improving Syntax.guess_lexer test 2022-01-25 10:55:34 +00:00
Darren Burns
15e72ab433 Tidying up Syntax.guess_lexer, adding test 2022-01-25 10:54:49 +00:00
Darren Burns
47e6da19d5 Use hardcoded monokai Pygments theme in syntax tests 2022-01-06 11:54:17 +00:00
Darren Burns
5f311dc2d7 Try using monokai theme to avoid ubuntu/macos variance 2022-01-06 11:10:38 +00:00
Darren Burns
2cf35b18a8 Try using default theme in test to avoid ubuntu/macos variance 2022-01-06 11:07:23 +00:00
Patrick Arminio
6c2510ed11
Use only one argument for passing a lexer 2021-12-12 12:31:40 +00:00
Patrick Arminio
7d03118a9e
Add lexer parameter to Syntax 2021-12-09 19:15:25 +00:00
Will McGugan
a25d286acc fix line endings in syntax 2021-05-06 14:49:54 +01:00
Will McGugan
a05ff5f942 pretty printable dataclasses 2021-03-06 14:14:06 +00:00
Will McGugan
637d3d0a85 max_lines 2020-10-30 17:32:36 +00:00
Will McGugan
be1b14d42b indentaion guides 2020-10-22 21:17:03 +01:00
Will McGugan
05ce5105b4 background style, table width calculation 2020-10-15 21:17:03 +01:00
Low Wei Lun
eb49f84376 black reformat 2020-10-10 23:56:26 +08:00
Low Wei Lun
0fae28ca90 increse coverage to 100% 2020-10-10 23:51:01 +08:00
phase06
136e07bffb update and add test to increase coverage 2020-10-05 22:37:16 +08:00
phase06
9ce45ad9b2 reformat after run black 2020-10-05 22:37:05 +08:00
phase06
eba1cf35d9 add more test for syntax 2020-10-05 22:35:57 +08:00
Will McGugan
54036402a1 tests 2020-10-03 14:18:02 +01:00
Will McGugan
ebb4eaa26f themed tracebacks 2020-10-03 12:06:19 +01:00
Will McGugan
e389c05ec3 test fixes 2020-09-18 11:56:28 +01:00
Will McGugan
0c810d564c tests 2020-07-16 18:24:18 +01:00