Skip to content

Commit

Permalink
Change the code to the previous one
Browse files Browse the repository at this point in the history
 #28 [U] The loading part of the markdown.bundle.js in the markdown.htm has been changed to module as before.
  • Loading branch information
daizu39 committed Nov 23, 2022
1 parent c2ba479 commit 46e1ff5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"tasks": {
"prepare": "deno task cache && deno task bundle",
// "cwd": "cd denops/bufpreview/lib/filetype/markdown/client/",
"cache": "deno cache --import-map=denops/bufpreview/lib/filetype/markdown/client/import_map.json --node-modules-dir denops/bufpreview/lib/filetype/markdown/client/markdown.js",
"bundle": "deno run --allow-run --allow-read --allow-env --node-modules-dir denops/bufpreview/lib/filetype/markdown/client/esbuild.js"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<title>Loading...</title>

<script src='markdown.bundle.js'></script>
<script type="module" src="markdown.bundle.js"></script>
<style>
html {
scroll-behavior: smooth;
Expand Down
12 changes: 0 additions & 12 deletions denops/bufpreview/lib/filetype/markdown/client/markdown.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
// import MarkdownIt from "npm:markdown-it";
// import HighlightJs from "npm:highlight.js";
// import KaTeX from "npm:katex";
// import TexMath from "npm:markdown-it-texmath";
// import TaskList from "npm:markdown-it-task-lists";
// import * as IncrementalDOM from "npm:incremental-dom";
// import MarkdownItIncrementalDOM from "npm:markdown-it-incremental-dom";
// import MarkdownItMeta from "npm:markdown-it-meta";
// import MarkdownItPlantuml from "npm:markdown-it-plantuml";
// import MarkdownItPlantuml from "npm:punycode";
// import MarkdownItPlantuml from "npm:events";

import PunyCode from "punycode";
import Events from "events";

Expand Down
2 changes: 1 addition & 1 deletion denops/bufpreview/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class Server {
new Response(this._bundled_markdown_js, {
status: 200,
headers: new Headers({
"content-type": "text/html",
"content-type": "application/javascript",
}),
}),
);
Expand Down

0 comments on commit 46e1ff5

Please sign in to comment.