I certainly cannot wait for cit to merge that pr

so I'll do it myself meanwhile
This commit is contained in:
BongaTheProto
2022-01-27 14:18:27 -05:00
parent 6caca63f85
commit 307288a490
4 changed files with 13 additions and 13 deletions

View File

@@ -46,7 +46,7 @@ export const ClockworkSlab = (props, context) => {
const testSearch = createSearch(searchText, script => {
return script.name + script.descname;
});
let bucketOfScriptures = [];
// merge it, no need to throw a var.
@@ -54,10 +54,10 @@ export const ClockworkSlab = (props, context) => {
// Flatten all categories and apply search to it
// truthy because WE DO NOT WANT TO RETURN THIS!
&& !!map((v, k) => {
bucketOfScriptures = bucketOfScriptures.concat(v);
})(scripture)
bucketOfScriptures = bucketOfScriptures.concat(v);
})(scripture)
&& bucketOfScriptures.filter(testSearch)
.filter((item, i) => i < MAX_SEARCH_RESULTS)
.filter((item, i) => i < MAX_SEARCH_RESULTS)
// Return the default one
|| scripture[tab]
|| null; // this is nullable, it's recommended that you null it.

View File

@@ -10,7 +10,7 @@
import { classes } from 'common/react';
import { Component } from 'inferno';
import marked from 'marked';
import { marked } from 'marked';
import { useBackend } from '../backend';
import { Box, Flex, Tabs, TextArea } from '../components';
import { Window } from '../layouts';
@@ -127,7 +127,7 @@ const run_marked_default = value => {
break;
}
};
return marked(value, {
return marked.parse(value, {
breaks: true,
smartypants: true,
smartLists: true,

View File

@@ -11,7 +11,7 @@
"inferno-vnode-flags": "^7.4.8",
"js-yaml": "^4.1.0",
"katex": "^0.15.1",
"marked": "^2.0.3",
"marked": "^4.0.10",
"tgui-dev-server": "workspace:*",
"tgui-polyfill": "workspace:*"
}

View File

@@ -5729,12 +5729,12 @@ __metadata:
languageName: node
linkType: hard
"marked@npm:^2.0.3":
version: 2.1.3
resolution: "marked@npm:2.1.3"
"marked@npm:^4.0.10":
version: 4.0.12
resolution: "marked@npm:4.0.12"
bin:
marked: bin/marked
checksum: 21a5ecd4941bc760aba21dfd97185853ec3b464cf707ad971e3ddb3aeb2f44d0deeb36b0889932afdb6f734975a994d92f18815dd0fabadbd902bdaff997cc5b
marked: bin/marked.js
checksum: 7575117f85a8986652f3ac8b8a7b95056c4c5fce01a1fc76dc4c7960412cb4c9bd9da8133487159b6b3ff84f52b543dfe9a36f826a5f358892b5ec4b6824f192
languageName: node
linkType: hard
@@ -7720,7 +7720,7 @@ resolve@^2.0.0-next.3:
inferno-vnode-flags: ^7.4.8
js-yaml: ^4.1.0
katex: ^0.15.1
marked: ^2.0.3
marked: ^4.0.10
tgui-dev-server: "workspace:*"
tgui-polyfill: "workspace:*"
languageName: unknown