_Also_ output the raw option description in the -xml-options-strings service.

Improve documentation.
This commit is contained in:
Jim Derry 2016-02-17 11:20:28 +08:00
parent 720d5c25d2
commit b4d2bdf3bf

View file

@ -1391,15 +1391,17 @@ static void version( void )
static void printXMLOptionString( TidyDoc tdoc, TidyOption topt, OptionDesc *d ) static void printXMLOptionString( TidyDoc tdoc, TidyOption topt, OptionDesc *d )
{ {
tmbstr description; tmbstr description;
ctmbstr rawDescription = tidyOptGetDoc( tdoc, topt );
if ( tidyOptIsReadOnly(topt) ) if ( tidyOptIsReadOnly(topt) )
return; return;
description = cleanup_description( tidyOptGetDoc( tdoc, topt ) ); description = cleanup_description( rawDescription );
printf( " <option>\n" ); printf( " <option>\n" );
printf( " <name>%s</name>\n",d->name); printf( " <name>%s</name>\n",d->name);
printf( " <description class=\"%s\">%s</description>\n", tidyGetLanguage(), description ); printf( " <description class=\"%s\">%s</description>\n", tidyGetLanguage(), description );
printf( " <raw class=\"%s\"><![CDATA[%s]]></description>\n", tidyGetLanguage(), rawDescription );
printf( " </option>\n" ); printf( " </option>\n" );
free( description ); free( description );
} }
@ -1421,8 +1423,12 @@ static void xml_options_strings( TidyDoc tdoc )
/** /**
** Handles the -xml-strings service. ** Handles the -xml-strings service.
** This service is primarily helpful to developers and localizers to ** This service was primarily helpful to developers and localizers to
** compare localized strings to the built in `en` strings. ** compare localized strings to the built in `en` strings. It's probably
** better to use our POT/PO workflow with your favorite tools, or simply
** diff the language header files directly.
** **Important:** The attribute `id` is not a specification, promise, or
** part of an API. You must not depend on this value.
*/ */
static void xml_strings( void ) static void xml_strings( void )
{ {