Don't create text node for self closing tags when `alwaysCreateTextNode: true`
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- javascript
- 領域
- tooling
調査の方向性
ソースファイルもテストも指定されていません。まず、alwaysCreateTextNode を有効にして両方の parser.parse の例を再現し、次に parser.parse のエントリポイントから自己終了タグの処理を追跡してください。自己終了タグについて、属性がある場合とない場合、および意図されたテキストノードの動作をカバーするテストによって、完了を確認できるようにしてください。
索引モデルが issue の本文から書いたものです。
説明
Currently I can have the parser create a text node on tags without attributes by setting alwaysCreateTextNode: true. However, for self closing tags, I would like the parser to not create a text node. Right now it creates a text node set to an empty string.
I also noticed that if a self closing tags have any attributes, a text node is not created. It only seems like it's created when a self closing tags have no attributes.
// Given these settings:
const parser = new XMLParser({
ignoreAttributes: false,
allowBooleanAttributes: true,
parseTagValue: false,
alwaysCreateTextNode: true,
});
parser.parse("<workbookPr defaultThemeVersion="153222" />")
// "workbookPr": {
// "@_defaultThemeVersion": "153222"
// }
parser.parse("<workbookPr />")
// "workbookPr": {
// "#text": ""
// }
I expect that "#text" is always present, no matter if the self closing tag have attributes or not. But my primary expectation is to be able to have no text nodes at all for self closing tags while still allowing the parser to make text nodes for tags without any attributes.
- 主要言語
- JavaScript
- スター
- 3.1k
- フォーク
- 398
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NaturalIntelligence/fast-xml-parser のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NaturalIntelligence/fast-xml-parser#890 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NaturalIntelligence/fast-xml-parser#888 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
ignoreDeclaration does not ignore lower case doctype declaration再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NaturalIntelligence/fast-xml-parser#870 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
CLI crashes with an uncaught exception when the input file is missing対応中かも @troclaux が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
NaturalIntelligence/fast-xml-parser#894 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
Numeric character references (A, A) are not decoded unless htmlEntities is enabled対応中かも @guocn が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
NaturalIntelligence/fast-xml-parser#892 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
NaturalIntelligence/fast-xml-parser の issue をすべて見る
似ている issue
-
Clinic sharing: fast sync refusal message suggests Delete Data, which only developer builds haveオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
avniproject/avni-client#2228 ·
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
open-webui/open-webui#33196 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fable-compiler/Fable#5157 ·
メンテナーはふだん 1 日以内に返信
-
New tool: PaperBanana対応中かも @github-actions が今日担当しました。 オープンsubmission triage
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
kausalflow/tools#243 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: apple-music area: build-release bug effort: small priority: high
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ChristianTabor/Argon#32 ·
メンテナーはふだん 1 日以内に返信