dsh-half-page 0.3.32 → 0.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +3 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -86,7 +86,9 @@ window.__ModuleLoader__.load({
|
|
|
86
86
|
return n + cur
|
|
87
87
|
}
|
|
88
88
|
const chapterNo = (title) => {
|
|
89
|
-
|
|
89
|
+
// 标题可能是「第 3–7 章」(带空格与范围),所以先去空格再取第一个数字
|
|
90
|
+
const t = String(title || '').replace(/\s+/g, '')
|
|
91
|
+
const m = t.match(/第([0-90-9零〇一二三四五六七八九十百千两]+)/)
|
|
90
92
|
return m ? cnNum(m[1]) : NaN
|
|
91
93
|
}
|
|
92
94
|
// 有几章、从第几章到第几章(章名认不出数字就不显示范围)
|