You've already forked AstralRinth
forked from didirus/AstralRinth
@@ -1,21 +1,21 @@
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
// Scripting
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import python from 'highlight.js/lib/languages/python'
|
||||
import lua from 'highlight.js/lib/languages/lua'
|
||||
import python from 'highlight.js/lib/languages/python'
|
||||
// Coding
|
||||
import groovy from 'highlight.js/lib/languages/groovy'
|
||||
import java from 'highlight.js/lib/languages/java'
|
||||
import kotlin from 'highlight.js/lib/languages/kotlin'
|
||||
import scala from 'highlight.js/lib/languages/scala'
|
||||
import groovy from 'highlight.js/lib/languages/groovy'
|
||||
// Configs
|
||||
import gradle from 'highlight.js/lib/languages/gradle'
|
||||
import json from 'highlight.js/lib/languages/json'
|
||||
import ini from 'highlight.js/lib/languages/ini'
|
||||
import yaml from 'highlight.js/lib/languages/yaml'
|
||||
import xml from 'highlight.js/lib/languages/xml'
|
||||
import json from 'highlight.js/lib/languages/json'
|
||||
import properties from 'highlight.js/lib/languages/properties'
|
||||
import { md, configuredXss } from './parse'
|
||||
import xml from 'highlight.js/lib/languages/xml'
|
||||
import yaml from 'highlight.js/lib/languages/yaml'
|
||||
import { configuredXss, md } from './parse'
|
||||
|
||||
/* REGISTRATION */
|
||||
// Scripting
|
||||
@@ -54,7 +54,7 @@ export const renderHighlightedString = (string) =>
|
||||
if (lang && hljs.getLanguage(lang)) {
|
||||
try {
|
||||
return hljs.highlight(str, { language: lang }).value
|
||||
} catch (__) {
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
|
||||
2
packages/utils/index.d.ts
vendored
2
packages/utils/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' as const
|
||||
export const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
type Base62Char = (typeof BASE62_CHARS)[number]
|
||||
|
||||
declare global {
|
||||
|
||||
@@ -116,7 +116,7 @@ export const configuredXss = new FilterXSS({
|
||||
)
|
||||
}
|
||||
return safeAttrValue(tag, name, url.toString(), cssFilter)
|
||||
} catch (err) {
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ export const md = (options = {}) => {
|
||||
if (allowedHostnames.includes(url.hostname)) {
|
||||
return defaultLinkOpenRenderer(tokens, idx, options, env, self)
|
||||
}
|
||||
} catch (err) {
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user