♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent 01e572a5ee
commit f8ad3f73a6
29 files changed
+173 -173

No files matched your search

+3 -3
View File
@@ -118,7 +118,7 @@ end
-- 拉不到时去掉坏相对 link,注入 .content 兜底缩进(否则段首顶格)。
do
local Paths = require("utils.paths")
local work_dir = Paths.bookWorkDir("book-3", "ext.weread")
local work_dir = Paths.bookWorkDir("book-3", "weread")
os.remove(work_dir .. "/stylesheets.css")
local head = '<?xml version="1.0"?><html><head><title></title>'
local link = '<link href="../Styles/stylesheets.css" rel="stylesheet" type="text/css" />'
@@ -178,7 +178,7 @@ end
-- 章首页:body.bgimg-1 的开头出血图丢掉,连续 h1 包进整页容器;样式表里 ../Images/ 改指工作目录 images/
do
local Paths = require("utils.paths")
local work_dir = Paths.bookWorkDir("book-4", "ext.weread")
local work_dir = Paths.bookWorkDir("book-4", "weread")
Paths.ensureDir(work_dir)
os.remove(work_dir .. "/stylesheets.css")
local src = '<html><head><link href="../Styles/stylesheets.css" rel="stylesheet" /></head>'
@@ -224,7 +224,7 @@ do
local icon = out:match('src="(images/[0-9a-f]+%.png)"')
Assert.is_true(icon ~= nil, "脚注图标落地: " .. case.src)
Assert.is_nil(out:find(case.src, 1, true), "原路径被改写: " .. case.src)
local work_dir = Paths.bookWorkDir(case.book, "ext.weread")
local work_dir = Paths.bookWorkDir(case.book, "weread")
local f = assert(io.open(work_dir .. "/" .. icon, "rb"))
Assert.eq(f:read(4), "\137PNG")
f:close()