Permalink
Browse files

Bug 756604 - Unable to prevent a numbered list

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Nov 1, 2015
1 parent e44780a commit 5487f855ad12d0b7f3ba70aab72fd2debedae16d
Showing with 28 additions and 7 deletions.
  1. +3 −0 src/cmdmapper.cpp
  2. +4 −1 src/cmdmapper.h
  3. +9 −0 src/docparser.cpp
  4. +1 −1 src/docparser.h
  5. +1 −1 src/doctokenizer.l
  6. +3 −1 src/htmlentity.cpp
  7. +7 −3 src/markdown.cpp
@@ -115,6 +115,9 @@ CommandMap cmdMap[] =
{ "#", CMD_HASH },
{ "%", CMD_PERCENT },
{ "|", CMD_PIPE },
{ ".", CMD_PUNT },
{ "+", CMD_PLUS },
{ "-", CMD_MINUS },
{ "::", CMD_DCOLON },
{ "\"", CMD_QUOTE },
{ "_internalref", CMD_INTERNALREF },
@@ -130,7 +130,10 @@ enum CommandType
CMD_MDASH = 100,
CMD_STARTUML = 101,
CMD_ENDUML = 102,
CMD_SETSCOPE = 103
CMD_SETSCOPE = 103,
CMD_PUNT = 104,
CMD_PLUS = 105,
CMD_MINUS = 106
};
enum HtmlTagType
@@ -1367,6 +1367,15 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case CMD_HASH:
children.append(new DocSymbol(parent,DocSymbol::Sym_Hash));
break;
case CMD_PUNT:
children.append(new DocSymbol(parent,DocSymbol::Sym_Dot));
break;
case CMD_PLUS:
children.append(new DocSymbol(parent,DocSymbol::Sym_Plus));
break;
case CMD_MINUS:
children.append(new DocSymbol(parent,DocSymbol::Sym_Minus));
break;
case CMD_DCOLON:
children.append(new DocSymbol(parent,DocSymbol::Sym_DoubleColon));
break;
@@ -395,7 +395,7 @@ class DocSymbol : public DocNode
/* doxygen commands mapped */
Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp,
Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe,
Sym_Quot, Sym_Minus
Sym_Quot, Sym_Minus, Sym_Plus, Sym_Dot
};
enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut,
Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde,
@@ -353,7 +353,7 @@ FILEMASK ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK}
LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)?
VERBATIM "verbatim"{BLANK}*
SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
SPCMD2 {CMD}[\\@<>&$#%~".|]
SPCMD2 {CMD}[\\@<>&$#%~".+|-]
SPCMD3 {CMD}form#[0-9]+
SPCMD4 {CMD}"::"
INOUT "inout"|"in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in")
@@ -312,7 +312,9 @@ static struct htmlEntityInfo
{ SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", DocSymbol::Perl_char }},
{ SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", DocSymbol::Perl_char }},
{ SYM(Quot), "\"", "\"", "\"", "&quot;", "\"", "\"", "\"", { "\"", DocSymbol::Perl_char }},
{ SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }}
{ SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }},
{ SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", DocSymbol::Perl_char }},
{ SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", DocSymbol::Perl_char }}
};
static const int g_numHtmlEntities = (int)(sizeof(g_htmlEntities)/ sizeof(*g_htmlEntities));
@@ -1017,8 +1017,8 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
if (size>1 && data[0]=='\\')
{
char c=data[1];
if (c=='[' || c==']' || c=='*' || c=='+' || c=='-' ||
c=='!' || c=='(' || c==')' || c=='.' || c=='`' || c=='_')
if (c=='[' || c==']' || c=='*' || /* c=='+' || c=='-' || c=='.' || */
c=='!' || c=='(' || c==')' || c=='`' || c=='_')
{
if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \---
{
@@ -1030,7 +1030,11 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
out.addStr(&data[1],2);
return 3;
}
out.addStr(&data[1],1);
else if (c=='-') // \-
{
out.addChar(c);
}
out.addChar(data[1]);
return 2;
}
}

0 comments on commit 5487f85

Please sign in to comment.