Commit Graph

800 Commits

Author SHA1 Message Date
iiSaLMaN a1c580f27e Create "none selected" placeholder state 2019-09-05 05:56:21 +03: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 24d4f0372c Refactor link parsing regexes to use named groups
For the sake of readability, consistency and to make further changes
easier, introduce named groups (?<text>) and (?<url>) to all link
parsing regexes which have parts containing the desired link text
and (optionally) URL.

The introduction of the named groups additionally simplifies
handleMatches() and makes all calls to it consistent.
2019-09-04 00:06:52 +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
Dean Herbert d21d68b36c Refactor to match web implementation 1:1 2019-09-02 17:04:38 +09:00
Dean Herbert 0985b1679f Move enum to response class 2019-09-02 15:57:55 +09:00
Dean Herbert 3d551b08a9 Rename legacy actions 2019-09-02 15:57:23 +09:00
Dean Herbert 13fadec6ec Merge remote-tracking branch 'upstream/master' into kudosu-info 2019-09-02 15:25:41 +09:00
Andrei Zavatski 72dbeaec16 Fix the comment 2019-08-30 10:26:11 +03:00
Andrei Zavatski b03b520818 Move Absing from the APIKudosuHistory 2019-08-30 10:13:21 +03:00
StanR d303083179 Update to match api 2019-08-29 12:29:31 +03:00
StanR 3347ee8170 Merge branch 'master' into beatmapset-genre-language 2019-08-29 09:57:53 +03:00
Andrei Zavatski ed827d514f Add comments 2019-08-27 15:36:08 +03:00
Andrei Zavatski f4d2bb036b Expand KudosuAction list 2019-08-22 16:50:54 +03:00
Andrei Zavatski 015406f4d2 Fix link parser 2019-08-18 22:02:59 +03:00
Andrei Zavatski 4c9b621f43 Fix some user links can't be opened inside the game 2019-08-18 22:01:36 +03:00
Andrei Zavatski 2393bbc69b Expand APIKudosuHistory 2019-08-18 21:27:53 +03:00
Andrei Zavatski 093359c13b fix incorrect json property 2019-08-09 11:19:14 +03:00
Andrei Zavatski 5073bce2dc Basic request implementation 2019-08-09 10:47:52 +03:00
Dan Balasescu bb90a273ac
Merge branch 'master' into system-user-color 2019-08-08 19:02:24 +09:00
Dean Herbert a76d3f1218
Add chat /join command (#5602)
Add chat /join command
2019-08-08 17:11:44 +09:00
Dean Herbert 6d5a7041fd Move system user colour assignment to ensure consistency 2019-08-08 17:10:06 +09:00
Max Hübner 0bed3bfece formatting inspection 2 2019-08-08 09:02:09 +02:00
Max Hübner bcd443a3aa remove /j 2019-08-08 08:56:52 +02:00
Andrei Zavatski b1c78c43f3 Simplify target string 2019-08-07 06:57:46 +03:00
Andrei Zavatski c16e84e5e6 Fix unability to get local user with specific ruleset 2019-08-07 06:35:57 +03:00
Andrei Zavatski 3cfbbac5dc Expand requests 2019-08-06 17:47:31 +03:00
Max Hübner ffb6794b4e formatting inspection 2019-08-06 16:11:13 +02:00
smoogipoo ee9e8f6261 Fix memory leaks from download buttons 2019-08-05 17:58:16 +09:00
Max Hübner 2f5d23b354 add join command 2019-08-05 01:02:42 +02:00
Joehu e84c79d140 Update osu!direct categories sorting with web changes 2019-08-02 13:16:33 -07:00
Andrei Zavatski 0f36088ef8 Add loved section 2019-08-01 11:06:29 +03:00
Dean Herbert 9e34582c17
Merge branch 'master' into separate-glowing-text-from-leaderboardscore 2019-07-23 11:31:47 +09:00
Andrei Zavatski de8ac9a428 Simple implementation 2019-07-21 21:41:07 +03:00
iiSaLMaN ed0ef90613 Separate glowing sprite text into it's own class 2019-07-21 12:14:55 +03:00
Dean Herbert e76b3e2b40 User property instead of method 2019-07-21 10:42:40 +09:00
iiSaLMaN 842417cf42 Check if selected scope requires API 2019-07-21 03:07:27 +03:00
smoogipoo 066bee3535 Simplify offset calculation 2019-07-19 16:02:33 +09:00
smoogipoo 2a66cf36d5 Merge remote-tracking branch 'Joehuu/master' into requests-limit-usage 2019-07-19 15:33:18 +09:00
smoogipoo 99ab77b926 Add PaginatedWebRequest to handle request pagination 2019-07-19 15:33:09 +09:00
Dean Herbert 66036508b6 Fix potential crash when displaying leaderbaords 2019-07-17 17:39:04 +09:00
Andrei Zavatski 9458bca58f Update usage of requests 2019-07-15 13:37:25 +03:00
Andrei Zavatski 111541fe7a Use limit in requests 2019-07-15 13:31:57 +03:00
StanR cd7c03c13a Add genre and language sections to beatmapset overlay 2019-07-11 16:44:48 +03:00
Dean Herbert 548008c9ce
Merge pull request #5311 from Joehuu:lb-sign-out-placeholder
Update beatmap leaderboard to placeholder when signing out
2019-07-11 13:55:18 +09:00
Dean Herbert c22633967b Merge remote-tracking branch 'upstream/master' into user-best-score 2019-07-11 11:32:47 +09:00
iiSaLMaN b2f23a10c8 Use the correct property to retrieve the milliseconds 2019-07-10 23:12:18 +03:00
Dean Herbert 2285c2b1df
Merge branch 'master' into user-best-score 2019-07-11 00:31:26 +09:00
Joehu b9be4080d3 Update beatmap leaderboard to placeholder when signing out 2019-07-09 07:59:38 -07:00