mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 04:23:01 -05:00
Support <<roomid>> links in chat
This commit is contained in:
parent
2723b1df3d
commit
c1330dc050
|
|
@ -362,7 +362,7 @@ var Tools = {
|
|||
// Don't format console commands (>>).
|
||||
if (str.substr(0, 8) === '>>') return str;
|
||||
// Don't format console results (<<).
|
||||
if (str.substr(0, 8) === '<<') return str;
|
||||
if (str.substr(0, 9) === '<< ') return str;
|
||||
|
||||
var options = Tools.prefs('chatformatting') || {};
|
||||
|
||||
|
|
@ -372,6 +372,9 @@ var Tools = {
|
|||
// ~~strikethrough~~
|
||||
str = str.replace(/\~\~([^< ](?:[^<]*?[^< ])??)\~\~/g,
|
||||
options.hidestrikethrough ? '$1' : '<s>$1</s>');
|
||||
// <<roomid>>
|
||||
str = str.replace(/<<([a-z0-9-]+)>>/g,
|
||||
options.hidelinks ? '«$1»' : '«<a href="/$1">$1</a>»');
|
||||
// linking of URIs
|
||||
if (!options.hidelinks) {
|
||||
str = str.replace(linkRegex, function(uri) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user