Add better logic for markdown files
This commit is contained in:
@@ -22,7 +22,7 @@ import { createLanguageClient, createWebSocket } from "../utils/languageClient";
|
|||||||
import { listen } from "@codingame/monaco-jsonrpc";
|
import { listen } from "@codingame/monaco-jsonrpc";
|
||||||
import ReconnectingWebSocket from "reconnecting-websocket";
|
import ReconnectingWebSocket from "reconnecting-websocket";
|
||||||
|
|
||||||
import hooksDocsFiles from "../xrpl-hooks-docs/xrpl-hooks-docs-files.json";
|
import docs from "../xrpl-hooks-docs/docs";
|
||||||
|
|
||||||
loader.config({
|
loader.config({
|
||||||
paths: {
|
paths: {
|
||||||
@@ -200,9 +200,9 @@ const HooksEditor = () => {
|
|||||||
// /xrpl-hooks-docs/xrpl-hooks-docs-files.json file
|
// /xrpl-hooks-docs/xrpl-hooks-docs-files.json file
|
||||||
// which was generated from rst files
|
// which was generated from rst files
|
||||||
|
|
||||||
hooksDocsFiles.find(
|
(typeof marker.code === "string" &&
|
||||||
(messages) => messages.code === marker.code
|
docs[marker?.code]?.toString()) ||
|
||||||
)?.markdown || "",
|
"",
|
||||||
supportHtml: true,
|
supportHtml: true,
|
||||||
isTrusted: true,
|
isTrusted: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user