mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
fix highlihgtjs highlight using Hoedown
Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
parent
1a77056f4a
commit
99353c37bd
@ -9,7 +9,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="qrc:/utils/highlightjs/styles/default.css">
|
||||
<script src="qrc:/resources/qwebchannel.js"></script>
|
||||
<script src="qrc:/utils/highlightjs/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="placeholder"></div>
|
||||
@ -24,6 +23,11 @@
|
||||
|
||||
var updateHtml = function(html) {
|
||||
placeholder.innerHTML = html;
|
||||
|
||||
var codes = document.getElementsByTagName('code');
|
||||
for (var i = 0; i < codes.length; ++i) {
|
||||
hljs.highlightBlock(codes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
new QWebChannel(qt.webChannelTransport,
|
||||
|
Loading…
x
Reference in New Issue
Block a user