mirror of
https://github.com/neocities/neocities.git
synced 2025-05-13 16:07:19 +02:00
improve underline links, update ace, add more ace themes
This commit is contained in:
parent
37cac9d1bd
commit
7788437c33
467 changed files with 324936 additions and 321 deletions
|
@ -1,4 +1,131 @@
|
|||
define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"^\\s*--.*$"},{token:["keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:"constant.numeric",regex:/[\d_]+(?:(?:[\.\d_]*)?)/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"markup.heading",regex:/^(\w.*)$/}]}};r.inherits(s,i),t.CabalHighlightRules=s}),define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.isHeading=function(e,t){var n="markup.heading",r=e.getTokens(t)[0];return t==0||r&&r.type.lastIndexOf(n,0)===0},this.getFoldWidget=function(e,t,n){if(this.isHeading(e,n))return"start";if(t==="markbeginend"&&!/^\s*$/.test(e.getLine(n))){var r=e.getLength();while(++n<r)if(!/^\s*$/.test(e.getLine(n)))break;if(n==r||this.isHeading(e,n))return"end"}return""},this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(this.isHeading(e,n)){while(++n<o)if(this.isHeading(e,n)){n--;break}a=n;if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var f=e.getLine(a).length;return new s(u,i,a,f)}}else if(this.getFoldWidget(e,t,n)==="end"){var a=n,f=e.getLine(a).length;while(--n>=0)if(this.isHeading(e,n))break;var r=e.getLine(n),i=r.length;return new s(n,i,a,f)}}}.call(o.prototype)}),define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_cabal_highlight_rules").CabalHighlightRules,o=e("./folding/haskell_cabal").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell_cabal"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/**
|
||||
* Haskell Cabal files highlighter (https://www.haskell.org/cabal/users-guide/developing-packages.html)
|
||||
**/
|
||||
"use strict";
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var CabalHighlightRules = function () {
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
token: "comment",
|
||||
regex: "^\\s*--.*$"
|
||||
}, {
|
||||
token: ["keyword"],
|
||||
regex: /^(\s*\w.*?)(:(?:\s+|$))/
|
||||
}, {
|
||||
token: "constant.numeric", // float
|
||||
regex: /[\d_]+(?:(?:[\.\d_]*)?)/
|
||||
}, {
|
||||
token: "constant.language.boolean",
|
||||
regex: "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
|
||||
}, {
|
||||
token: "markup.heading",
|
||||
regex: /^(\w.*)$/
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
oop.inherits(CabalHighlightRules, TextHighlightRules);
|
||||
exports.CabalHighlightRules = CabalHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module){/*
|
||||
* Folding mode for Cabal files (Haskell): allow folding each seaction, including
|
||||
* the initial general section.
|
||||
*/
|
||||
"use strict";
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var Range = require("../../range").Range;
|
||||
var FoldMode = exports.FoldMode = function () { };
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
(function () {
|
||||
this.isHeading = function (session, row) {
|
||||
var heading = "markup.heading";
|
||||
var token = session.getTokens(row)[0];
|
||||
return row == 0 || (token && token.type.lastIndexOf(heading, 0) === 0);
|
||||
};
|
||||
this.getFoldWidget = function (session, foldStyle, row) {
|
||||
if (this.isHeading(session, row)) {
|
||||
return "start";
|
||||
}
|
||||
else if (foldStyle === "markbeginend" && !(/^\s*$/.test(session.getLine(row)))) {
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
if (!(/^\s*$/.test(session.getLine(row)))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (row == maxRow || this.isHeading(session, row)) {
|
||||
return "end";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
this.getFoldWidgetRange = function (session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var startColumn = line.length;
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
var endRow = row;
|
||||
if (this.isHeading(session, row)) {
|
||||
while (++row < maxRow) {
|
||||
if (this.isHeading(session, row)) {
|
||||
row--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
if (endRow > startRow) {
|
||||
while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
|
||||
endRow--;
|
||||
}
|
||||
if (endRow > startRow) {
|
||||
var endColumn = session.getLine(endRow).length;
|
||||
return new Range(startRow, startColumn, endRow, endColumn);
|
||||
}
|
||||
}
|
||||
else if (this.getFoldWidget(session, foldStyle, row) === "end") {
|
||||
var endRow = row;
|
||||
var endColumn = session.getLine(endRow).length;
|
||||
while (--row >= 0) {
|
||||
if (this.isHeading(session, row)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
var line = session.getLine(row);
|
||||
var startColumn = line.length;
|
||||
return new Range(row, startColumn, endRow, endColumn);
|
||||
}
|
||||
};
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"], function(require, exports, module){/**
|
||||
* Haskell Cabal files mode (https://www.haskell.org/cabal/users-guide/developing-packages.html)
|
||||
**/
|
||||
"use strict";
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var CabalHighlightRules = require("./haskell_cabal_highlight_rules").CabalHighlightRules;
|
||||
var FoldMode = require("./folding/haskell_cabal").FoldMode;
|
||||
var Mode = function () {
|
||||
this.HighlightRules = CabalHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
(function () {
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = null;
|
||||
this.$id = "ace/mode/haskell_cabal";
|
||||
}).call(Mode.prototype);
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
window.require(["ace/mode/haskell_cabal"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue