Giter VIP home page Giter VIP logo

Comments (1)

hirooih avatar hirooih commented on July 30, 2024

I git-cloned mune and made the following changes.

npm install --save @shd101wyy/mume

I think this works but I can not test yet. Because I have no idea how can I use this from Markdown Preview Enhanced (MPE) on vscode. I hope upgraded version will be released.


upgrade dependencies/wavedrom/*

cd dependencies/wavedrom
curl https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.9.1/skins/default.js -O
curl https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.9.1/wavedrom.min.js -O

fix dependencies/README.md and src/markdown-engine.ts.
Note: window.WaveSkin = WaveSkin is not needed even for 2.3.0.

diff --git a/dependencies/README.md b/dependencies/README.md
index ce89299..381853d 100644
--- a/dependencies/README.md
+++ b/dependencies/README.md
@@ -6,7 +6,7 @@ I managed many libraries by myself instead of through npm to reduce overall file
 {
   "mermaid": "8.14.0",
   "plantuml": "1.2021.12",
-  "wavedrom": "2.3.0",
+  "wavedrom": "2.9.1",
   "reveal": "4.10.0",
   "viz": "v2.0.0",
   "MathJax": "v2.7.5",
@@ -32,8 +32,6 @@ I managed many libraries by myself instead of through npm to reduce overall file
 }
 ```
 
-_Attention_: Need to add `window.WaveSkin = WaveSkin` at the end of **wavedrom/default.js**
-
 _Attention_: Need to remove `font: inherit;` from `reveal.css`. Otherwise `KaTeX` and `MathJax` will have trouble rendering. Also don't forget to add the empty file `none.css`.
 
 **cheerio 0.20.0** has bug rendering subgraph html(). `div` inside `svg` will be self-closed automatically, which is wrong. Therefore I downgrade it to 0.15.0
diff --git a/src/markdown-engine.ts b/src/markdown-engine.ts
index 9f1664b..73fbc3c 100644
--- a/src/markdown-engine.ts
+++ b/src/markdown-engine.ts
@@ -1203,8 +1203,8 @@ if (typeof(window['Reveal']) !== 'undefined') {
           "./dependencies/wavedrom/wavedrom.min.js",
         )}" charset="UTF-8"></script>`;
       } else {
-        wavedromScript += `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/skins/default.js"></script>`;
-        wavedromScript += `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/wavedrom.min.js"></script>`;
+        wavedromScript += `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.9.1/skins/default.js"></script>`;
+        wavedromScript += `<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.9.1/wavedrom.min.js"></script>`;
       }
       wavedromInitScript = `<script>WaveDrom.ProcessAll()</script>`;
     }

from crossnote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.