Files
AstralRinth/packages/ui/src/utils/ace-mode-log.ts
T
Calum H. 381ea51cce refactor: align files tab with content tab design (#5621)
* fix: files.vue bugs before styling changes

* feat: move files tab to shared layout structure

* fix: qa

* fix: qa

* fix: bugs

* fix: lint

* fix: admonition cleanup with progress + actions

* fix: cleanup

* fix: modals

* fix: admon title

* fix: i18n standard

* fix: lint + i18n pass

* fix: remove transition

* fix: type errors

* feat: files tab in app

* fix: qa

* fix: backup item minmax

* fix: use ContentPageHeader for server panel

* fix: lint

* fix: lint

* fix: lint

* feat: page leave safety

* fix: lint

* fix: cargo fmt fix

* fix: blank in prod

* fix: content card table stuff

* Revert "fix: blank in prod"

This reverts commit 74758fe185cf85a4a20355857f889cb091b97ace.

* fix: import

* feat: browse worlds/servers flow

* fix: worlds tab parity with content tab

* fix: perf bug + shader filter pill copy

* feat: singleplayer filter

* fix: ordering

* fix: breadcrumbs

* fix: lint

* fix: qa

* feat: store server proj id when adding to a non-linked instance

* fix: lint

* fix: i18n + qa

* fix: conflict

* qa: already installed modal + placeholders not server-specific

* fix: qa

* fix: add + edit server modals

* fix: qa

* fix: security

* fix: devin flags

* fix: lint

* chore: change file to break build cache

* fix: admon

* fix: import path stuff

* feat: qa

* fix: fmt fmt idiot

---------

Signed-off-by: Calum H. <calum@modrinth.com>
2026-03-26 18:55:15 +00:00

72 lines
1.8 KiB
TypeScript

/* eslint-disable @typescript-eslint/no-explicit-any */
import ace from 'ace-builds'
ace['define'](
'ace/mode/mclog_highlight_rules',
['require', 'exports', 'ace/lib/oop', 'ace/mode/text_highlight_rules'],
function (require: any, exports: any) {
const oop = require('ace/lib/oop')
const TextHighlightRules = require('ace/mode/text_highlight_rules').TextHighlightRules
const MclogHighlightRules = function (this: any) {
this.$rules = {
start: [
{
token: 'comment.timestamp',
regex: /^\[\d\d:\d\d:\d\d\]/.source,
},
{
token: 'invalid.error',
regex: /\[.+?\/ERROR\]:?/.source,
},
{
token: 'keyword.warn',
regex: /\[.+?\/WARN\]:?/.source,
},
{
token: 'string.info',
regex: /\[.+?\/INFO\]:/.source,
},
{
token: 'support.command',
regex: /: \/.+/.source,
},
{
token: 'comment.stacktrace',
regex: /\tat\s.+/.source,
},
{
token: 'entity.name.function',
regex: /\w+?\[\/\d+?\.\d+?\.\d+?\.\d+?:\d+?\]/.source,
},
{
token: 'storage.chat',
regex: /\[CHAT\]/.source,
},
],
}
this.normalizeRules()
}
oop.inherits(MclogHighlightRules, TextHighlightRules)
exports.MclogHighlightRules = MclogHighlightRules
},
)
ace['define'](
'ace/mode/mclog',
['require', 'exports', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/mclog_highlight_rules'],
function (require: any, exports: any) {
const oop = require('ace/lib/oop')
const TextMode = require('ace/mode/text').Mode
const MclogHighlightRules = require('ace/mode/mclog_highlight_rules').MclogHighlightRules
const Mode = function (this: any) {
this.HighlightRules = MclogHighlightRules
}
oop.inherits(Mode, TextMode)
exports.Mode = Mode
},
)