mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 14:52:36 -05:00
Support superscript formatting
This commit is contained in:
@@ -624,6 +624,9 @@ var Tools = {
|
||||
// **bold**
|
||||
str = str.replace(/\*\*([^< ](?:[^<]*?[^< ])??)\*\*/g,
|
||||
options.hidebold ? '$1' : '<b>$1</b>');
|
||||
// ^^superscript^^
|
||||
str = str.replace(/\^\^([^< ](?:[^<]*?[^< ])??)\^\^/g,
|
||||
options.hidesuperscript ? '$1' : '<sup>$1</sup>');
|
||||
|
||||
if (!options.hidespoiler) {
|
||||
var untilIndex = 0;
|
||||
|
||||
@@ -577,6 +577,7 @@
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="italics" ' + (cur.hideitalics ? 'checked' : '') + ' /> Suppress __<em>italics</em>__</label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="monospace" ' + (cur.hidemonospace ? 'checked' : '') + ' /> Suppress ``<code>code formatting</code>``</label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="strikethrough" ' + (cur.hidestrikethrough ? 'checked' : '') + ' /> Suppress ~~<s>strikethrough</s>~~</label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="superscript" ' + (cur.hidesuperscript ? 'checked' : '') + ' /> Suppress ^^<sup>superscript</sup>^^</label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="me" ' + (cur.hideme ? 'checked' : '') + ' /> Suppress <kbd>/me</kbd> <em>action formatting</em></label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="greentext" ' + (cur.hidegreentext ? 'checked' : '') + ' /> Suppress <span class="greentext">>' + ['meme arrows', 'greentext', 'quote formatting'][Math.floor(Math.random() * 3)] + '</span></label></p>';
|
||||
buf += '<p><label class="optlabel"><input type="checkbox" name="spoiler" ' + (cur.hidespoiler ? 'checked' : '') + ' /> Suppress spoiler hiding</label></p>';
|
||||
|
||||
Reference in New Issue
Block a user