Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EmosewaMC opened this issue Jan 2, 2023 · 1 comment

Comments

@EmosewaMC
Copy link

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!

@EmosewaMC
Copy link
Author

bumping this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant