Skip to content

Commit 6bddcee

Browse files
committed
fix: 代码没有高亮
1 parent d415797 commit 6bddcee

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

CHANGELOG.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.01.2510250-2 / 2025-12-
2+
- fix: 代码没有高亮
3+
14
# 2.01.2510250-1 / 2025-11-28
25
- feat: skyline support
36
- update: devtools to v2.01.2510250

res/scripts/document_start.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
(() => {
2+
(() => {
3+
if (window.require) {
4+
// fix: 代码高亮失效
5+
const fs = window.require('fs')
6+
const readFile = fs.readFile
7+
fs.readFile = function(...args) {
8+
args[0] = args[0].replace('code/package.nw', 'package.nw')
9+
return readFile.apply(this, args)
10+
}
11+
}
12+
})();
213
if (!window.skylineRequireReplace) {
314
window.skylineRequireReplace = true;
415
const originalRequire = window.require;

test/wxvpkg-test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ root_dir=$(cd `dirname $0`/.. && pwd -P)
44
tmp_dir="$root_dir/tmp"
55

66
# unpack 文件 到 路径
7-
node "$root_dir/tools/wxvpkg_unpack.js" "/home/msojocs/.config/wechat-devtools/WeappVendor/3.8.5.wxvpkg" "/home/msojocs/.config/wechat-devtools/WeappVendor/3.8.5.wxvpkg.ext"
7+
node "$root_dir/tools/wxvpkg_unpack.js" "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.ext"

0 commit comments

Comments
 (0)