fix parse_si for Japanese excel files
Hi. using #parse_si 'Phonetic Properties' items for Japanese excel files, the Phonetic items(KATAKANA) represents pronunciation hints of String(KANJI). ``` <si> <t>漢字(japanese KANJI)</t> <rPh> <t>フリガナ(this is KATAKANA for pronounciation:漢字)</t> </rPh> </si> ``` It expected get '漢字' . but got '漢字フリガナ'. so replace these string, because this can be caused by only `<rPh>`.
This commit is contained in:
parent
f9097d403b
commit
cb7503de12
2
xlsx.js
2
xlsx.js
|
@ -2031,7 +2031,7 @@ function parse_si(x, opts) {
|
|||
/* 18.4.4 r CT_RElt (Rich Text Run) */
|
||||
else if((y = x.match(sirregex))) {
|
||||
z.r = x;
|
||||
z.t = utf8read(unescapexml(x.match(sitregex).join("").replace(tagregex,"")));
|
||||
z.t = utf8read(unescapexml(x.replace(/<rPh.*?>(.*?)<\/rPh>/g, '').match(sitregex).join("").replace(tagregex,"")));
|
||||
if(html) z.h = parse_rs(x);
|
||||
}
|
||||
/* 18.4.3 phoneticPr CT_PhoneticPr (TODO: needed for Asian support) */
|
||||
|
|
Loading…
Reference in New Issue