improve underline links, update ace, add more ace themes

This commit is contained in:
Kyle Drake 2024-01-19 11:15:54 -06:00
parent 37cac9d1bd
commit 7788437c33
467 changed files with 324936 additions and 321 deletions

View file

@ -1,4 +1,241 @@
define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e={title:"markup.heading",list:"markup.heading",table:"constant",directive:"keyword.operator",entity:"string",link:"markup.underline.list",bold:"markup.bold",italic:"markup.italic",literal:"support.function",comment:"comment"},t="(^|\\s|[\"'(<\\[{\\-/:])",n="(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";this.$rules={start:[{token:e.title,regex:"(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"},{token:["text",e.directive,e.literal],regex:"(^\\s*\\.\\. )([^: ]+::)(.*$)",next:"codeblock"},{token:e.directive,regex:"::$",next:"codeblock"},{token:[e.entity,e.link],regex:"(^\\.\\. _[^:]+:)(.*$)"},{token:[e.entity,e.link],regex:"(^__ )(https?://.*$)"},{token:e.entity,regex:"^\\.\\. \\[[^\\]]+\\] "},{token:e.comment,regex:"^\\.\\. .*$",next:"comment"},{token:e.list,regex:"^\\s*[\\*\\+-] "},{token:e.list,regex:"^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "},{token:e.list,regex:"^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "},{token:e.table,regex:"^={2,}(?: +={2,})+$"},{token:e.table,regex:"^\\+-{2,}(?:\\+-{2,})+\\+$"},{token:e.table,regex:"^\\+={2,}(?:\\+={2,})+\\+$"},{token:["text",e.literal],regex:t+"(``)(?=\\S)",next:"code"},{token:["text",e.bold],regex:t+"(\\*\\*)(?=\\S)",next:"bold"},{token:["text",e.italic],regex:t+"(\\*)(?=\\S)",next:"italic"},{token:e.entity,regex:"\\|[\\w\\-]+?\\|"},{token:e.entity,regex:":[\\w-:]+:`\\S",next:"entity"},{token:["text",e.entity],regex:t+"(_`)(?=\\S)",next:"entity"},{token:e.entity,regex:"_[A-Za-z0-9\\-]+?"},{token:["text",e.link],regex:t+"(`)(?=\\S)",next:"link"},{token:e.link,regex:"[A-Za-z0-9\\-]+?__?"},{token:e.link,regex:"\\[[^\\]]+?\\]_"},{token:e.link,regex:"https?://\\S+"},{token:e.table,regex:"\\|"}],codeblock:[{token:e.literal,regex:"^ +.+$",next:"codeblock"},{token:e.literal,regex:"^$",next:"codeblock"},{token:"empty",regex:"",next:"start"}],code:[{token:e.literal,regex:"\\S``"+n,next:"start"},{defaultToken:e.literal}],bold:[{token:e.bold,regex:"\\S\\*\\*"+n,next:"start"},{defaultToken:e.bold}],italic:[{token:e.italic,regex:"\\S\\*"+n,next:"start"},{defaultToken:e.italic}],entity:[{token:e.entity,regex:"\\S`"+n,next:"start"},{defaultToken:e.entity}],link:[{token:e.link,regex:"\\S`__?"+n,next:"start"},{defaultToken:e.link}],comment:[{token:e.comment,regex:"^ +.+$",next:"comment"},{token:e.comment,regex:"^$",next:"comment"},{token:"empty",regex:"",next:"start"}]}};r.inherits(o,s),t.RSTHighlightRules=o}),define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rst_highlight_rules").RSTHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.type="text",this.$id="ace/mode/rst",this.snippetFileId="ace/snippets/rst"}.call(o.prototype),t.Mode=o}); (function() {
define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var RSTHighlightRules = function () {
var tokens = {
title: "markup.heading",
list: "markup.heading",
table: "constant",
directive: "keyword.operator",
entity: "string",
link: "markup.underline.list",
bold: "markup.bold",
italic: "markup.italic",
literal: "support.function",
comment: "comment"
};
var startStringPrefix = "(^|\\s|[\"'(<\\[{\\-/:])";
var endStringSuffix = "(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";
this.$rules = {
"start": [
{
token: tokens.title,
regex: "(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"
},
{
token: ["text", tokens.directive, tokens.literal],
regex: "(^\\s*\\.\\. )([^: ]+::)(.*$)",
next: "codeblock"
},
{
token: tokens.directive,
regex: "::$",
next: "codeblock"
},
{
token: [tokens.entity, tokens.link],
regex: "(^\\.\\. _[^:]+:)(.*$)"
},
{
token: [tokens.entity, tokens.link],
regex: "(^__ )(https?://.*$)"
},
{
token: tokens.entity,
regex: "^\\.\\. \\[[^\\]]+\\] "
},
{
token: tokens.comment,
regex: "^\\.\\. .*$",
next: "comment"
},
{
token: tokens.list,
regex: "^\\s*[\\*\\+-] "
},
{
token: tokens.list,
regex: "^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "
},
{
token: tokens.list,
regex: "^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "
},
{
token: tokens.table,
regex: "^={2,}(?: +={2,})+$"
},
{
token: tokens.table,
regex: "^\\+-{2,}(?:\\+-{2,})+\\+$"
},
{
token: tokens.table,
regex: "^\\+={2,}(?:\\+={2,})+\\+$"
},
{
token: ["text", tokens.literal],
regex: startStringPrefix + "(``)(?=\\S)",
next: "code"
},
{
token: ["text", tokens.bold],
regex: startStringPrefix + "(\\*\\*)(?=\\S)",
next: "bold"
},
{
token: ["text", tokens.italic],
regex: startStringPrefix + "(\\*)(?=\\S)",
next: "italic"
},
{
token: tokens.entity,
regex: "\\|[\\w\\-]+?\\|"
},
{
token: tokens.entity,
regex: ":[\\w-:]+:`\\S",
next: "entity"
},
{
token: ["text", tokens.entity],
regex: startStringPrefix + "(_`)(?=\\S)",
next: "entity"
},
{
token: tokens.entity,
regex: "_[A-Za-z0-9\\-]+?"
},
{
token: ["text", tokens.link],
regex: startStringPrefix + "(`)(?=\\S)",
next: "link"
},
{
token: tokens.link,
regex: "[A-Za-z0-9\\-]+?__?"
},
{
token: tokens.link,
regex: "\\[[^\\]]+?\\]_"
},
{
token: tokens.link,
regex: "https?://\\S+"
},
{
token: tokens.table,
regex: "\\|"
}
],
"codeblock": [
{
token: tokens.literal,
regex: "^ +.+$",
next: "codeblock"
},
{
token: tokens.literal,
regex: '^$',
next: "codeblock"
},
{
token: "empty",
regex: "",
next: "start"
}
],
"code": [
{
token: tokens.literal,
regex: "\\S``" + endStringSuffix,
next: "start"
},
{
defaultToken: tokens.literal
}
],
"bold": [
{
token: tokens.bold,
regex: "\\S\\*\\*" + endStringSuffix,
next: "start"
},
{
defaultToken: tokens.bold
}
],
"italic": [
{
token: tokens.italic,
regex: "\\S\\*" + endStringSuffix,
next: "start"
},
{
defaultToken: tokens.italic
}
],
"entity": [
{
token: tokens.entity,
regex: "\\S`" + endStringSuffix,
next: "start"
},
{
defaultToken: tokens.entity
}
],
"link": [
{
token: tokens.link,
regex: "\\S`__?" + endStringSuffix,
next: "start"
},
{
defaultToken: tokens.link
}
],
"comment": [
{
token: tokens.comment,
regex: "^ +.+$",
next: "comment"
},
{
token: tokens.comment,
regex: '^$',
next: "comment"
},
{
token: "empty",
regex: "",
next: "start"
}
]
};
};
oop.inherits(RSTHighlightRules, TextHighlightRules);
exports.RSTHighlightRules = RSTHighlightRules;
});
define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var RSTHighlightRules = require("./rst_highlight_rules").RSTHighlightRules;
var Mode = function () {
this.HighlightRules = RSTHighlightRules;
};
oop.inherits(Mode, TextMode);
(function () {
this.type = "text";
this.$id = "ace/mode/rst";
this.snippetFileId = "ace/snippets/rst";
}).call(Mode.prototype);
exports.Mode = Mode;
}); (function() {
window.require(["ace/mode/rst"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;