1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 11:27:24 +08:00
Commit Graph

252 Commits

Author SHA1 Message Date
Dan Balasescu
b161aa22c3
Merge branch 'master' into simplify-exit-logic-of-screens 2019-10-02 18:13:57 +09:00
Ganendra Afrasya
b6dd610af8 Apply reviews 2019-10-01 23:18:03 +07:00
Joehu
5f700f2ae9 Simplify exit logic of screens with textboxes using back button receptor 2019-10-01 08:26:34 -07:00
Ganendra Afrasya
208b9a4eba Add new virtual float for username to timestamp padding 2019-10-01 20:47:53 +07: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
Andrei Zavatski
015406f4d2 Fix link parser 2019-08-18 22:02:59 +03:00
Dan Balasescu
bb90a273ac
Merge branch 'master' into system-user-color 2019-08-08 19:02:24 +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
Max Hübner
ffb6794b4e formatting inspection 2019-08-06 16:11:13 +02:00
Max Hübner
2f5d23b354 add join command 2019-08-05 01:02:42 +02:00
Dean Herbert
4a25a84975 Fix DrawableChannel async flow 2019-06-20 23:01:39 +09:00
Dean Herbert
5bb8649f3b Remove unused property from chat message 2019-06-18 14:22:59 +09:00
Arphox
07e17518e9 Fix all "Maintainability" CodeFactor issues 2019-06-11 10:28:16 +02:00
LeNitrous
4e6d7137aa disallow current user from opening their own private channel 2019-06-03 17:25:19 +08:00
Dean Herbert
bc962bf8f0 Move TooltipText to OsuClickableContainer 2019-05-21 13:51:38 +09:00
Paul Teng
7adaa09263 Move tab channel class into tab item class 2019-05-12 06:31:11 -04:00
Paul Teng
d53fb9a5c8 Check against type instead of channel name 2019-05-12 06:11:16 -04:00
Paul Teng
6cf1ca288f
Do not try to join the Add-channel button 2019-05-11 19:13:48 -04:00
smoogipoo
d7c09e7dbd Merge remote-tracking branch 'origin/master' into fix-new-inspections
# Conflicts:
#	osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs
#	osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs
#	osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs
#	osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs
#	osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
#	osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapScoresContainer.cs
#	osu.Game/Graphics/OsuFont.cs
#	osu.Game/Online/API/Requests/Responses/APILegacyScoreInfo.cs
#	osu.Game/Overlays/Profile/Header/BadgeContainer.cs
#	osu.Game/Overlays/Profile/ProfileHeader.cs
#	osu.Game/Screens/Select/PlaySongSelect.cs
#	osu.Game/Skinning/LegacySkinDecoder.cs
2019-05-07 13:20:17 +09:00
smoogipoo
0bd35ab7bb Turn on warnings, resolve issues 2019-04-25 17:36:17 +09:00
Dean Herbert
612db31c38 Apply newline additions 2019-04-01 12:16:32 +09:00
Dean Herbert
26d53d06a9 Fix remaining issues 2019-02-28 13:31:40 +09:00
Dean Herbert
367bc53a06 Revert some more instances of 'e' variable names 2019-02-22 20:15:25 +09:00
smoogipoo
d8c55bc729 Adjust namespaces 2019-02-21 19:05:52 +09:00
smoogipoo
bca347427f Update with framework bindable changes 2019-02-21 18:56:34 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Unknown
6eff79913b remove blank lines 2019-01-11 10:34:56 +01:00
Dean Herbert
f6018294b5 Update framework 2019-01-07 18:50:27 +09:00
smoogipoo
d4f5a8507c Exit from match screen on escape 2018-12-25 17:14:56 +09:00
Dean Herbert
396caae0a9 Remove redundant newline 2018-12-21 19:01:19 +09:00
Dean Herbert
81104f4803 Make standalone chat reuse more code from main chat overlay 2018-12-21 17:54:12 +09:00
smoogipoo
6a9b0a0ba3 Fix initial messages not being received 2018-12-21 14:02:36 +09:00
smoogipoo
6b6629e9fd Fix not posting to the correct channel 2018-12-21 14:02:29 +09:00
Dean Herbert
bc8b0485d8 Add textbox/posting support 2018-12-20 18:49:03 +09:00
Dean Herbert
65447d6f4a Add optional parameters to target messages at a specific channel 2018-12-20 17:01:08 +09:00
Dean Herbert
3a13899ce1 Add stand-alone chat component 2018-12-20 16:54:49 +09:00
Dean Herbert
ea4dce8454 Add a polling component model 2018-12-10 21:08:14 +09:00
Dean Herbert
2a2561e5c8 Update framework and otehr nuget packages 2018-12-07 19:39:54 +09:00
Dean Herbert
2f9de149dd Add constructor to create a PM channel from a User 2018-12-07 13:56:21 +09:00
smoogipoo
efdad3a3a7 Merge remote-tracking branch 'origin/master' into ChatManager_with_BindableCollection 2018-11-26 16:12:55 +09:00
smoogipoo
cadfe41f83 Merge remote-tracking branch 'origin/master' into external_link_warning 2018-11-23 15:19:52 +09:00
Dean Herbert
a144e97568 Fix crash on creating two new PM channels 2018-11-22 18:27:22 +09:00
smoogipoo
d1ec9fc294 Merge remote-tracking branch 'Joehuu/master' into fix-channel-presence 2018-11-22 13:04:32 +09:00
miterosan
4f41512265 Lowercase the references to joinedChannel and availableChannels 2018-11-21 23:21:27 +01:00
miterosan
21c9353fee Remove not used usings 2018-11-21 23:15:45 +01:00