瀏覽代碼

【修复】更新 markdown-html-generator 版本并修复相关功能

- 将 markdown-html 包更名为 markdown-html-generator
- 更新版本号至 1.8.0
- 修改 index.html 中的版本号为 1.17.9
- 移除未使用的 reqwest::blocking::get 导入
- 调整 getMarkdown 函数调用,增加 pValue 参数
PJ568 1 年之前
父節點
當前提交
8f33f7255f
共有 3 個文件被更改,包括 3 次插入 和 4 次删除
  1. 1 1
      Cargo.lock
  2. 2 2
      index.html
  3. 0 1
      src/main.rs

+ 1 - 1
Cargo.lock

@@ -964,7 +964,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
 
 [[package]]
-name = "markdown-html"
+name = "markdown-html-generator"
 version = "1.8.0"
 dependencies = [
  "minify-html",

+ 2 - 2
index.html

@@ -1,7 +1,7 @@
 <!doctype html>
 
 <html>
-<markdown-html version="1.17.8" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
+<markdown-html version="1.17.9" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
   license="CC BY-SA 4.0 International"></markdown-html>
 
 <head>
@@ -409,7 +409,7 @@
         }
         try {
           pValue = mdPath ? mdPath : path;
-          updateContent(await getMarkdown((mdPath ? mdPath : path), response))
+          updateContent(await getMarkdown((mdPath ? mdPath : path), response), pValue)
           document.querySelector('html').classList.add('loaded');	//// 防止缓存的页面被自定义 PJAX 中覆写的处理响应的函数捕获
           waitForAnimationsEnd(document.querySelector('.markdown-body'), '.content, .old-content', ['Animation-slideInRight', 'Animation-slideInLeft']).then(async () => {
             await showMarkdownEnded();

+ 0 - 1
src/main.rs

@@ -1,5 +1,4 @@
 use minify_html::{minify, Cfg};
-use reqwest::blocking::get;
 use scraper::{Html, Selector};
 use std::fs::{read, write};
 use std::path::{Path, PathBuf};