Skip to content

Commit 3d86787

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents fc0c847 + 83118ee commit 3d86787

File tree

5 files changed

+35
-21
lines changed

5 files changed

+35
-21
lines changed

addon/doxywizard/config_doxyw.l

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%{
2020

2121
/*
22-
* includes
22+
* includes
2323
*/
2424
#include "config.h"
2525
#include "input.h"
@@ -46,7 +46,7 @@
4646

4747
/* -----------------------------------------------------------------
4848
*
49-
* static variables
49+
* static variables
5050
*/
5151

5252
struct ConfigFileState
@@ -77,8 +77,8 @@ static const char *stateToString(int state);
7777

7878
/* -----------------------------------------------------------------
7979
*/
80-
#undef YY_INPUT
81-
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
80+
#undef YY_INPUT
81+
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
8282

8383
static int yyread(char *buf,int maxSize)
8484
{
@@ -334,7 +334,7 @@ static void readIncludeFile(const QString &incName)
334334
if (g_includeDepth==MAX_INCLUDE_DEPTH)
335335
{
336336
config_err("maximum include depth (%d) reached, %s is not included.",
337-
MAX_INCLUDE_DEPTH,qPrintable(incName));
337+
MAX_INCLUDE_DEPTH,qPrintable(incName));
338338
}
339339

340340
QString inc = incName;
@@ -722,7 +722,7 @@ static void upgradeConfig(const QHash<QString,Input*> &options)
722722
bool classGraph = InputBool::convertToBool(v3,isValid3);
723723
if (isValid1 && isValid2 && isValid3 && !classDiagrams && !haveDot && classGraph)
724724
{
725-
config_warn("Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
725+
config_warn("Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
726726
optClassGraph->setValue(QString::fromLatin1("TEXT"));
727727
}
728728
}
@@ -800,10 +800,10 @@ void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s)
800800
while (!(c=*p++).isNull() && !needsEscaping)
801801
{
802802
needsEscaping = (c==QChar::fromLatin1(' ') ||
803-
c==QChar::fromLatin1(',') ||
804-
c==QChar::fromLatin1('\n') ||
805-
c==QChar::fromLatin1('\t') ||
806-
c==QChar::fromLatin1('"'));
803+
c==QChar::fromLatin1(',') ||
804+
c==QChar::fromLatin1('\n') ||
805+
c==QChar::fromLatin1('\t') ||
806+
c==QChar::fromLatin1('"'));
807807
}
808808
p=s.data();
809809
while (!(c=*p++).isNull() && !needsHashEscaping)
@@ -820,15 +820,27 @@ void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s)
820820
p=s.data();
821821
while (!p->isNull())
822822
{
823-
if (*p ==QChar::fromLatin1(' ') &&
824-
*(p+1)==QChar::fromLatin1('\0')) break; // skip inserted space at the end
825-
if (*p ==QChar::fromLatin1('"')) t << "\\"; // escape quotes
826-
t << *p++;
823+
if (*p ==QChar::fromLatin1(' ') &&
824+
*(p+1)==QChar::fromLatin1('\0')) break; // skip inserted space at the end
825+
if (*p ==QChar::fromLatin1('"')) t << "\\"; // escape quotes
826+
if (*p ==QChar::fromLatin1('<')) t << "&lt;";
827+
else if (*p ==QChar::fromLatin1('>')) t << "&gt;";
828+
else if (*p ==QChar::fromLatin1('&')) t << "&amp;";
829+
else t << *p;
830+
p++;
827831
}
828832
}
829833
else
830834
{
831-
t << s;
835+
p=s.data();
836+
while (!p->isNull())
837+
{
838+
if (*p ==QChar::fromLatin1('<')) t << "&lt;";
839+
else if (*p ==QChar::fromLatin1('>')) t << "&gt;";
840+
else if (*p ==QChar::fromLatin1('&')) t << "&amp;";
841+
else t << *p;
842+
p++;
843+
}
832844
}
833845
if (needsHashEscaping || needsEscaping)
834846
{

doc/changelog.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
will insert defaults for elements that are missing in the user defined layout file. This allows for the introduction of new elements, without having
1313
to update the user defined layout files to make them appear. For older Doxygen
1414
or layout versions, missing elements are still treated as being invisible as before.
15+
</li>
1516
</ul>
1617

1718
<h3>Features</h3>

doc/markdown.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ which will produce:
453453
int func(int a,int b) { return a*b; }
454454
~~~~~~~~~~~~~~~
455455

456-
The dot is optional, the curly braces are optional when the that language name begins with a
457-
alphabetical character and further characters are alphanumerical characters.
456+
The dot is optional, the curly braces are optional when the that language name begins with an
457+
alphabetical character and further characters are alphanumerical characters or a plus sign.
458458

459459
Another way to denote fenced code blocks is to use 3 or more backticks (```):
460460

src/doctokenizer.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ BLANK [ \t\r]
180180
BLANKopt {BLANK}*
181181
ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
182182
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
183+
CODEID [a-zA-Z][a-zA-Z0-9+]*
183184
PHPTYPE [?]?[\\:a-z_A-Z0-9\x80-\xFF\-]+
184185
CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
185186
CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
@@ -745,13 +746,13 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
745746
return Token::make_TK_NEWPARA();
746747
}
747748
}
748-
<St_CodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
749+
<St_CodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
749750
yyextra->token.name = yytext;
750751
int i=yyextra->token.name.find('{'); /* } to keep vi happy */
751752
yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
752753
BEGIN(St_Code);
753754
}
754-
<St_iCodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
755+
<St_iCodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
755756
yyextra->token.name = yytext;
756757
int i=yyextra->token.name.find('{'); /* } to keep vi happy */
757758
yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);

src/markdown.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static QCString escapeSpecialChars(const QCString &s)
284284
}
285285

286286
/** helper function to convert presence of left and/or right alignment markers
287-
* to a alignment value
287+
* to an alignment value
288288
*/
289289
static Alignment markersToAlignment(bool leftMarker,bool rightMarker)
290290
{
@@ -2231,7 +2231,7 @@ static bool isFencedCodeBlock(std::string_view data,size_t refIndent,
22312231
AUTO_TRACE("data='{}' refIndent={}",Trace::trunc(data),refIndent);
22322232
const char dot = '.';
22332233
auto isAlphaChar = [ ](char c) { return (c>='A' && c<='Z') || (c>='a' && c<='z'); };
2234-
auto isAlphaNChar = [ ](char c) { return (c>='A' && c<='Z') || (c>='a' && c<='z') || (c>='0' && c<='9'); };
2234+
auto isAlphaNChar = [ ](char c) { return (c>='A' && c<='Z') || (c>='a' && c<='z') || (c>='0' && c<='9') || (c=='+'); };
22352235
auto isLangChar = [&](char c) { return c==dot || isAlphaChar(c); };
22362236
// rules: at least 3 ~~~, end of the block same amount of ~~~'s, otherwise
22372237
// return FALSE

0 commit comments

Comments
 (0)