File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ export async function processGuifan(
104104 const readingNode = definitionSection . find (
105105 ( d ) => d . type === ElementType . Tag && d . tagName === "x-pr"
106106 ) ;
107- const reading = readingNode ? $ ( readingNode ) . text ( ) : "" ;
107+ let reading = readingNode ? $ ( readingNode ) . text ( ) : "" ;
108+ reading = reading . replace ( / - | \/ \/ / g, " " ) ;
108109 const tradNode = filterUntil (
109110 definitionSection ,
110111 ( node ) => node . type === ElementType . Tag && node . tagName === "dt"
@@ -144,15 +145,13 @@ export async function processGuifan(
144145 lang : "zh-CN" ,
145146 } satisfies StructuredContentNode ;
146147 const pinyinTermEntry = new TermEntry ( term . headword )
147- . setReading ( reading ?? "" )
148+ . setReading ( reading )
148149 . addDetailedDefinition ( {
149150 type : "structured-content" ,
150151 content : definitionContentsForReading ,
151152 } ) ;
152153 const zhuyinTermEntry = new TermEntry ( term . headword )
153- . setReading (
154- p2z ( ( reading ?? "" ) . replace ( / - | \/ \/ / g, " " ) ) . replaceAll ( " " , "" )
155- )
154+ . setReading ( p2z ( reading . replaceAll ( " " , "" ) ) )
156155 . addDetailedDefinition ( {
157156 type : "structured-content" ,
158157 content : definitionContentsForReading ,
Original file line number Diff line number Diff line change @@ -181,14 +181,15 @@ export async function processHanyu7(
181181 data : { hanyu7 : "definitions-parent" } ,
182182 lang : "zh-CN" ,
183183 } satisfies StructuredContentNode ;
184+ reading = reading . replace ( / - | \/ \/ / g, " " ) ;
184185 const pinyinTermEntry = new TermEntry ( term . headword )
185186 . setReading ( reading )
186187 . addDetailedDefinition ( {
187188 type : "structured-content" ,
188189 content : definitionContentsForReading ,
189190 } ) ;
190191 const zhuyinTermEntry = new TermEntry ( term . headword )
191- . setReading ( p2z ( reading . replace ( / - | \/ \/ / g , " " ) ) . replaceAll ( " " , "" ) )
192+ . setReading ( p2z ( reading ) . replaceAll ( " " , "" ) )
192193 . addDetailedDefinition ( {
193194 type : "structured-content" ,
194195 content : definitionContentsForReading ,
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { processGuifan } from "./dics/guifan/guifan.ts";
44import { processHanyu7 } from "./dics/hanyu7/hanyu7.ts" ;
55
66const versions = {
7- guifan : "2025/12/29.2 " ,
8- hanyu7 : "2025/12/29.2 " ,
7+ guifan : "2025/12/29.3 " ,
8+ hanyu7 : "2025/12/29.3 " ,
99} ;
1010
1111const guifanPinyinDic = new Dictionary ( { fileName : "guifan-pinyin.zip" } ) ;
You can’t perform that action at this time.
0 commit comments