1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 12:33:03 +08:00
Commit Graph

22 Commits

Author SHA1 Message Date
Alden Wu
0cb7c94c21 Merge branch 'master' of https://github.com/ppy/osu into chat-profile-highlight-v2 2022-11-28 17:59:15 -08:00
Alden Wu
c2d8ffc225 Refactor ChatLine username drawable creation 2022-11-28 17:50:12 -08:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
Dan Balasescu
fa18b5f701 Construct notifications client inside ChannelManager 2022-11-04 18:51:00 +09:00
Dan Balasescu
5b25ef5f2f Construct notifications client via IAPIProvider 2022-11-01 21:34:34 +09:00
Dan Balasescu
169bcc2654 Use polling connector in tests 2022-10-28 18:08:08 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
c661f2b059 Ensure ChannelManager has access to API from point of construction
Closes https://github.com/ppy/osu/issues/18451.
2022-06-08 19:15:23 +09:00
Jai Sharma
60b10fca4e Remove redundant caching of overlays in ChatLink test 2022-05-23 21:02:50 +01:00
Salman Ahmed
3cbc6cd297 Update further tests to cache using IDialogOverlay 2022-04-18 21:04:22 +03:00
Dean Herbert
98aaf83177 Add a centralised constant for the osu URL schema protocol 2022-02-18 15:57:37 +09:00
Dan Balasescu
3cb5f43f77 Fix incorrect action returned for wiki links in DEBUG mode 2022-01-11 17:46:49 +09:00
Dan Balasescu
269df08fc9 Make ChatLink tests into proper unit test methods 2022-01-11 17:42:02 +09:00
Dean Herbert
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
Dean Herbert
f7374703f0 Update tests to match dev domain 2021-02-12 15:29:21 +09:00
smoogipoo
648999a2de Remove all RequiredTypes usages 2020-05-16 18:17:12 +09:00
Dean Herbert
1a6056637b Turn off italics test for now (may come back if we switch chat to content font) 2020-03-15 01:43:48 +09:00
Dean Herbert
ed837d3115 Use framework extension method for FromHex 2020-03-11 10:18:41 +09:00
Bartłomiej Dach
08350a1aca Add parenthesis handling to old link format
Allow users to put both balanced round parentheses, as well as
unbalanced escaped ones, in old style link text. The implementation
is the same as for Markdown and new style links, except for swapping
all instances of

    \[\]

to

    \(\)

for obvious reasons (different type of parenthesis requiring escaping).
Tests also included.
2019-09-04 00:21:27 +02:00
Bartłomiej Dach
f04add6d9e Add bracket handling to Markdown link format
Allow users to put both balanced brackets, as well as unbalanced
escaped ones, in Markdown link text. The implementation is the exact
same as in the case of new format links.

For completion's sake, tests also included.
2019-09-04 00:07:00 +02:00
Bartłomiej Dach
a8f16503e2 Add backslash escaping to new link format
For users to be able to add square brackets inside of links using
the new format, the regular expression used for parsing those links
contained a balancing group, which can be used for matching pairs
of tokens (in this case, opening and closing brackets, in that order).
However, this means that users could not post links with unmatched
brackets inside of them (ie. ones that contain single brackets, or
a closing bracket and then an opening one). Allow for escaping opening
and closing brackets using the backslash character.

The change substitutes this old fragment of the regex in the display
text group:

    [^\[\]]*        // any character other than closing/opening bracket

for this one:

    (((?<=\\)[\[\]])|[^\[\]])*

The second pattern in the alternative remains the same; the first one
performs the escaping, as follows:

    (
        (?<=\\)     // positive lookbehind expression:
                    // this match will succeed, if the next expression
                    // is preceded by a single backslash
        [\[\]]      // either an opening or closing brace
    )

Since the entire display group is matched, unfortunately the lookbehind
expression does not actually strip the backslashes, so they are
manually stripped in handleMatches.

As demonstrated in the unit tests attached, this also allows balanced
brackets to be mixed with escaped ones.
2019-09-03 23:18:39 +02:00
Roman Kapustin
459a285cd8 Rename test cases to test scenes inline with the framework change 2019-05-14 22:37:25 +03:00