Commit Graph

59 Commits

Author SHA1 Message Date
Michael Telatynski
674aec4050
Fix regression around pasting links (#8537)
* Fix regression around pasting links

* Add tests
2022-05-09 12:39:32 +00:00
Michael Telatynski
83ab266533
Fix editing of non-html replies (#8418) 2022-04-27 10:43:10 +02:00
Janne Mareike Koschinski
bca9caa98e
Settings toggle to disable Composer Markdown (#8358) 2022-04-19 14:53:59 +01:00
Yaya Usman
6b13988eaa
Fix: "Code formatting button does not escape backticks" (#8181)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-04-19 09:20:56 +00:00
Kerry
b9da2255c4
Unit test typescriptification - editor utils (#8226)
* editor/mock ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/serialize-test.js -> test/editor/serialize-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix ts in serialize-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/range-test.js -> test/editor/range-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/position-test.js -> test/editor/position-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix position-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/operations-test.js -> test/editor/operations-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/model-test.js -> test/editor/model-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix ts in model-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/history-test.js -> test/editor/history-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix ts in history-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/diff-test.js -> test/editor/diff-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/deserialize-test.js -> test/editor/deserialize-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* ts in deserialize-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test/editor/caret-test.js -> test/editor/caret-test.ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* ts caret-test

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-06 12:40:13 +01:00
Travis Ralston
a987ead7d2 Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
Alexander Stephan
26e6f8deca
Improve formatting features in the editor (#7104)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-16 09:46:07 +00:00
Robin
c10ac9e4a0
Fix a variety of issues with HTML → Markdown conversion (#8004)
* Fix a variety of issues with HTML → Markdown conversion

Signed-off-by: Robin Townsend <robin@robin.town>

* Fix lint

Signed-off-by: Robin Townsend <robin@robin.town>

* Fix @room pill formatting not being applied to link text

Signed-off-by: Robin Townsend <robin@robin.town>
2022-03-09 07:43:05 -05:00
Kerry
8b9263c808
Clean up some unit test logs (#7857)
* kill some unit test logs in arrays-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove mock logs that are asserted against anyway

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix safeCOunterpartTranslate warnings in tests

Signed-off-by: Kerry Archibald <kerrya@element.io>

* more safeCounterpartTranslate warnings

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove more logs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add helper

Signed-off-by: Kerry Archibald <kerrya@element.io>

* naming

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-21 16:57:44 +00:00
Renan Cleyson
9ac85bcaa3
Fix list formatting alternating on edit (#7422)
Co-authored-by: Andy Balaam <andyb@element.io>
2021-12-21 10:07:44 +00:00
Renan Cleyson
b4b81a455e
Fix wrong indentation with nested ordered list unnesting list on edit (#7300) 2021-12-07 09:46:04 +00:00
Dariusz Niemczyk
e3187ed15c
Fix links being parsed as markdown links improperly (#7200)
* Fix links being parsed as markdown links improperly

Fixes #4674

* Fix a typo

* Fix overriding too much stuff

* Fix parsing

* Remove useless console.log

* Remove unnecessary emph function

* Properly fix tests

* Add some better docs

* Add missing license header
2021-11-30 18:09:05 +00:00
Michael Telatynski
316b21408d Fix tests 2021-07-15 10:59:52 +01:00
J. Ryan Stinnett
ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Šimon Brandner
1fe2085309
Fix deserialize test
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-05-01 12:28:18 +02:00
Travis Ralston
375ffafda6 Fix tests failing to load skin
We should find a better way to do this, but this works well enough.
2021-03-09 10:13:16 -07:00
Michael Telatynski
ffa7ceb70e Trim range when formatting so that it excludes leading/trailing spaces
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-09-29 14:15:20 +01:00
J. Ryan Stinnett
ce226ab534 Replace Riot with Element in docs and comments
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.

Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Michael Telatynski
93b0287e11 s/semi-colon/colon/
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-24 00:04:50 +01:00
Michael Telatynski
8018a20680 create acceptance tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 17:40:34 +01:00
Justin Sleep
bdc451d66b Remove escape backslashes in non-Markdown messages 2020-06-03 17:08:13 -05:00
Michael Telatynski
9c1939b756 match all, not just first instance of tokens to escape
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-15 02:31:30 +01:00
Michael Telatynski
4454db30d6 Escape opening square bracket too
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-15 01:02:08 +01:00
Michael Telatynski
f1def8b0de delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-15 00:50:28 +01:00
Michael Telatynski
95eaf94cd8 Fix pills being broken by unescaped characters
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-15 00:40:38 +01:00
Bruno Windels
13b08b5fcc
Revert "Fix escaped markdown passing backslashes through" 2020-02-24 11:27:22 +00:00
BobVul
1df6837649 Missing semicolon 2020-02-04 10:38:43 +11:00
BobVul
fde30577e4 Fix escaped markdown passing backslashes through
Fixes https://github.com/vector-im/riot-web/issues/11230

Signed-off-by: Bob Rao <bob+git@vulpin.com>
2020-01-31 12:33:57 +11:00
Michael Telatynski
d7a4698db8
Merge pull request #3891 from matrix-org/t3chguy/fix_multi_paragraph_formatting
Fix paragraph-awareness of the composer formatting features
2020-01-23 13:31:12 +00:00
Michael Telatynski
832da062cc Improve trailing spurious breaks + tests 2020-01-22 13:37:27 +00:00
Michael Telatynski
e1e53f567f add more tests 2020-01-22 11:56:27 +00:00
Michael Telatynski
9a530a72f6 delint 2020-01-21 15:36:25 +00:00
Michael Telatynski
b2aba6db35 Initial attempt to make toggleInlineFormat paragraph-aware 2020-01-21 15:32:32 +00:00
Michael Telatynski
6ad31fe023 30 test failures to go :D 2019-12-16 11:12:48 +00:00
Bruno Windels
616ff5ce76 adjust list item numbers in test that are now preserved 2019-10-22 15:43:40 +02:00
Bruno Windels
7f4e070807 fix deserialize unit tests 2019-09-23 15:34:01 +02:00
Bruno Windels
be79cdddb0 apply autocomplete changes to mock to fix editor unit tests 2019-08-29 18:00:38 +02:00
Bruno Windels
c44fbb73d0 fix bug when replacing range starting at end of previous part 2019-08-28 15:52:39 +02:00
Bruno Windels
994bcb5c85 dont expect rendered to be called from range.replace() anymore
as this is now called from the `transform` method, unused in this test
2019-08-27 16:43:05 +02:00
Bruno Windels
0e65f71a37 support incrementing/decrementing doc positions with predicate 2019-08-26 16:16:27 +02:00
Bruno Windels
10291bafe0 add support for selecting ranges in the editor model, and replacing them
this to support finding emoticons and replacing them with an emoji
2019-08-26 16:16:27 +02:00
Bruno Windels
5cebce9bbf fix bug detected by tests 2019-08-22 14:41:40 +01:00
Bruno Windels
1dd052d9dd fix test after refactoring 2019-08-22 14:38:24 +01:00
Bruno Windels
299cf8542c Split MessageEditor in edit-specifics & reusable part for main composer 2019-08-05 15:31:18 +02:00
Bruno Windels
af3eebd0a6 add undo steps after word boundary (or capped) when typing or removing 2019-08-02 11:31:01 +02:00
Bruno Windels
07b2e51dce put max step length in constant 2019-08-01 16:27:17 +02:00
Bruno Windels
aa22c90f2c HistoryManager + unit tests 2019-08-01 11:25:04 +02:00
Bruno Windels
4b08bf0e76 add tests for removing multiple characters in edit 2019-07-30 12:31:40 +02:00
Bruno Windels
b8a3c5ebd0 test serialization only produces html messages when needed 2019-07-25 18:47:29 +02:00
Bruno Windels
0b92077bba tests for turning caret position from model into dom position 2019-07-25 18:38:00 +02:00