zeux / pugixml

Light-weight, simple and fast XML parser for C++ with XPath support
http://pugixml.org/
MIT License
4.01k stars 728 forks source link

Update VERSION in Makefile and add documentation for string_view_t #641

Closed dantargz closed 1 week ago

dantargz commented 1 week ago

Add information to the docs about PUGIXML_STRING_VIEW, PUGIXML_HAS_STRING_VIEW, string_view_t and the overloads that use it. Attempted to have the documentation be future-leaning by primarily documenting the (permanent) PUGIXML_HAS_STRING_VIEW define and only mentioning PUGIXML_STRING_VIEW as a note in the documentation for PUGIXML_HAS_STRING_VIEW.

Docs generated with newer version of asciidoctor 2.0.23 which seems to have also moved some of the css around, though I have not noticed a visual difference.

The VERSION variable in the Makefile was accidentally broken in a previous commit by adding the word "version" to pugixmlconfig.hpp. This is the output of the sed command used to define VERSION

The result of the old sed command:

% sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp 
1.14
of pugixml this macro will become obsolete.

which caused this behavior when trying to build docs

% make docs/manual.html   
asciidoctor -b html5 -a version=1.14 of pugixml this macro will become obsolete. docs/manual.adoc -o docs/manual.html
asciidoctor: FAILED: input file of is missing
make: *** [docs/manual.html] Error 1

Tweaked the sed command to /q quit after the first occurance of the word "version" to handle this case.

Related: #626

zeux commented 1 week ago

Fixed c++ capitalization in .adoc, HTML will be regenerated at some point later.