Git Product home page Git Product logo

Comments (7)

yzhpxd avatar yzhpxd commented on July 29, 2024

代码复制在其它主题也没用,但在作者的mynote主题是可以的

from githuber-md.

ConnersHua avatar ConnersHua commented on July 29, 2024

纠正一下之前汇报的错误,在之前的汇报中我以为在 Console 中出现 404 的 js 错误提示是造成高亮失效的原因,但其实是行号的,关于行号失效主要遇到的问题有:

  1. 如 asp、objective-c 这样的与实际 js 文件名 (即 wp-githuber-md/assets/vendor/prism/components 下的文件名) 不符合导致调用 404
    以 asp 为例,实际存在的文件名为 prism-aspnet.min.jsprism-aspnet.min.js,而调用的是 prism-asp.min.js 所以失效,同样的 objective-c 调用的是 prism-objective-c.min.js 而实际存在的文件名为 prism-objectivec.min.js
    在将 wp-githuber-md/assets/vendor/prism/components 目录下的文件名改成与调用文件名一致后行号功能正常
  2. 如 delphi 和 rst (reStructuredText) 是压根没有对应的 js 文件,所以调用 prism-delphi.min.jsprism-rst.min.js 而导致 404;
  3. 如 javascript 这样存在实际文件名,但是没有相关请求;

目前不会 php 所以没办法更进一步,烦请作者有时间修复一下,谢谢

from githuber-md.

terrylinooo avatar terrylinooo commented on July 29, 2024

謝謝回報,我再查看

from githuber-md.

Nyx1197 avatar Nyx1197 commented on July 29, 2024

xml 行号问题我已经解决, 可以参考这个提交本地测试一下
b75e6ee

其他语言我稍后测试一下

from githuber-md.

Nyx1197 avatar Nyx1197 commented on July 29, 2024

我本地测试, 关掉 prism-autoloader 加载优化之后测试结果如下:

asp: 高亮及行号 不行, 改为html后html部分有着色, 行号正常
css: 行号 正常
delphi: 高亮及行号 报错, 找不到js, 搜索Prismjs源代码没有找到 language-delphi 相关的内容, 疑似不支持delphi
html: 行号 正常
javascript: 行号 正常
objective-c: 高亮及行号 正常
rst (reStructuredText): 高亮及行号 没使用过该语言 搜索Prismjs源代码没有找到 language-rst 相关的内容, 疑似不支持rst
xml: 行号 正常

from githuber-md.

github-actions avatar github-actions commented on July 29, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.

from githuber-md.

github-actions avatar github-actions commented on July 29, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from githuber-md.

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.