Comments (7)
代码复制在其它主题也没用,但在作者的mynote主题是可以的
from githuber-md.
纠正一下之前汇报的错误,在之前的汇报中我以为在 Console 中出现 404 的 js 错误提示是造成高亮失效的原因,但其实是行号的,关于行号失效主要遇到的问题有:
- 如 asp、objective-c 这样的与实际 js 文件名 (即
wp-githuber-md/assets/vendor/prism/components
下的文件名) 不符合导致调用 404
以 asp 为例,实际存在的文件名为prism-aspnet.min.js
及prism-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
目录下的文件名改成与调用文件名一致后行号功能正常; - 如 delphi 和 rst (reStructuredText) 是压根没有对应的 js 文件,所以调用
prism-delphi.min.js
、prism-rst.min.js
而导致 404; - 如 javascript 这样存在实际文件名,但是没有相关请求;
目前不会 php 所以没办法更进一步,烦请作者有时间修复一下,谢谢
from githuber-md.
謝謝回報,我再查看
from githuber-md.
xml 行号问题我已经解决, 可以参考这个提交本地测试一下
b75e6ee
其他语言我稍后测试一下
from githuber-md.
我本地测试, 关掉 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.
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.
This issue was closed because it has been inactive for 14 days since being marked as stale.
from githuber-md.
Related Issues (20)
- 希望能支持直接粘贴图片 HOT 5
- URL 中含有 () 的轉換問題 HOT 2
- There is a stored XSS vulnerability HOT 2
- Shortcodes with quotes are broken HOT 2
- How to switch post back to markdown mode HOT 1
- Scrolling to the bottom not working as expected HOT 4
- SQL syntax highlighting HOT 5
- Page is not rendered as previewed HOT 5
- MD Disappearing on save HOT 4
- Use mathjax and python blocks in the same article will lead to cross-line mathjax equations not rendered HOT 3
- code inline don't highlight in post page HOT 2
- Sorry, you have been blocked You are unable to access secureservercdn2.net HOT 2
- \assets\vendor\prism\prism.min.js文件导致存在404请求 HOT 5
- Support for ACF custom fields (not posts) HOT 2
- Failed to install via Wordpress official store HOT 2
- WP Githuber MD breaks "Disable Gutenberg" and "Classic Editor" HOT 1
- 希望粘贴图片进行上传时能够支持OSS云存储 HOT 2
- 无法启用插件 HOT 4
- Two bugs HOT 2
- WP Githuber MD and bbpress tinymce bug HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from githuber-md.