mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-28 11:17:45 +00:00
chore(developer): update fast-xml-parser type references
Test-bot: skip
This commit is contained in:
parent
c60c775895
commit
f224c3c8fc
1 changed files with 5 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
|||
* Abstraction for XML reading and writing
|
||||
*/
|
||||
|
||||
import { XMLParser, XMLBuilder, XmlBuilderOptions, X2jOptions } from 'fast-xml-parser';
|
||||
import { XMLParser, XMLBuilder, XmlBuilderOptions, X2jOptions, JPathOrMatcher } from 'fast-xml-parser';
|
||||
|
||||
export type KeymanXMLType =
|
||||
'keyboard3' // LDML <keyboard3>
|
||||
|
|
@ -27,9 +27,9 @@ const PARSER_COMMON_OPTIONS: X2jOptions = {
|
|||
ignoreAttributes: false,
|
||||
ignorePiTags: true,
|
||||
numberParseOptions: { // TODO: query is this option really necessary?
|
||||
eNotation: null,
|
||||
hex: null,
|
||||
leadingZeros: null,
|
||||
eNotation: false,
|
||||
hex: false,
|
||||
leadingZeros: false,
|
||||
skipLike: /(?:)/, // parse numbers as strings
|
||||
},
|
||||
textNodeName: '_',
|
||||
|
|
@ -66,7 +66,7 @@ const PARSER_OPTIONS: KeymanXMLParserOptionsBag = {
|
|||
},
|
||||
'kvks': {
|
||||
...PARSER_COMMON_OPTIONS,
|
||||
tagValueProcessor: (_tagName: string, tagValue: string, _jPath: string, _hasAttributes: boolean, isLeafNode: boolean) : string | undefined => {
|
||||
tagValueProcessor: (_tagName: string, tagValue: string, _jPathOrMatcher: JPathOrMatcher, _hasAttributes: boolean, isLeafNode: boolean) : unknown => {
|
||||
if (!isLeafNode) {
|
||||
return tagValue?.trim(); // trimmed value
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue