Comment blocks with open and close angle brackets fail to parse with mis-aligned tabs using Parse(const char*, size_t)

オープン
#929 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
devtools

調査の方向性

Start by reproducing the failure: feed the attached blocksdef.txt, with the comment block indented by mixed tabs, into tinyxml2::Parse using the (const char*, size_t) overload, and confirm it returns XML_ERROR_PARSING_TEXT. The issue does not name the parser source file or function, so find where comment blocks are scanned. Done means the original file parses without re-indenting, and the existing tests still pass.

索引モデルが issue の本文から書いたものです。

説明

Take a comment block like

			<!--
	<Argument>
	<Name>Amount</Name>
	<Type>Integer</Type>
	<DefaultValue>1</DefaultValue>
	<Minimum>1</Minimum>
	<Maximum>1</Maximum>
	</Argument>
-->

that is in the following file (with all context included)
blocksdef.txt

Passing this into tinyxml2::Parse(const char, size_t) will result in the following error XML_ERROR_PARSING_TEXT and removing the comment block successfully parses the file.

I have deduced the error to be that the angle brackets that may have open and close values <> in the line below the comment block instantiation <!-- must be tab aligned with the comment block to resolve the issue, so you can fix the issue by just tabbing the comment block in like so

			<!--
			<Argument>
			<Name>Amount</Name>
			<Type>Integer</Type>
			<DefaultValue>1</DefaultValue>
			<Minimum>1</Minimum>
			<Maximum>1</Maximum>
			</Argument>
-->

Due to the fact that a user may not be able to edit the source file, a way to ignore the tab difference in comment blocks would be great. Thank you!

主要言語
C++
スター
5.8k
フォーク
2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

leethomason/tinyxml2 のほかの issue

leethomason/tinyxml2 の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。