折腾:
【未解决】WordPress的WP SyntaxHighlighter高亮代码时自动检测编程语言
期间,希望php中能实现,检测这段代码(的文本),能判断出是什么类型的编程语言
比如:
$(".single_storybook_item").click(function(event) { console.log("event=", event) console.log("single_storybook_item: thisValue=", $(this)) // window.location = $(this).data("href") }) var eachBookHtml = ` <li class="list-group-item single_storybook_item">
判断出是JavaScript
以便于设置到:
<pre class="brush: javascript; gutter: true">
中的javascript
这样插件即可显示对的高亮效果了
php detect string programming language type
都只是哪个国家的语言
php detect string programming language
php hightlight detect programming language
去试试能否用上
但是看了半天没找到
include (“vendor/autoload.php”);
中的
autoload.php
算了,放弃。即使可以用上,好像也很麻烦的样子。
转载请注明:在路上 » 【未解决】php中能否检测代码字符串的编程语言的种类