Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#929 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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!

Lingua principale
C++
Stelle
5.8k
Fork
2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leethomason/tinyxml2

Tutte le issue di leethomason/tinyxml2

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.