fix label escape character issue
This commit is contained in:
parent
735f1e97fa
commit
ca1e7810c7
@ -194,13 +194,24 @@ namespace nana{ namespace widgets{ namespace skeletons
|
|||||||
return token::tag_begin;
|
return token::tag_begin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Escape
|
//Escape
|
||||||
if(ch == '\\')
|
if(this->format_enabled_ && (ch == '\\'))
|
||||||
{
|
{
|
||||||
if(iptr_ + 1 < endptr_)
|
if(iptr_ + 1 < endptr_)
|
||||||
{
|
{
|
||||||
ch = *(iptr_ + 1);
|
ch = *(iptr_ + 1);
|
||||||
iptr_ += 2;
|
|
||||||
|
if ('<' == ch || '>' == ch) //two characters need to be escaped.
|
||||||
|
{
|
||||||
|
iptr_ += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//ignore escape
|
||||||
|
ch = '\\';
|
||||||
|
iptr_++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -208,8 +219,8 @@ namespace nana{ namespace widgets{ namespace skeletons
|
|||||||
return token::eof;
|
return token::eof;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
++iptr_;
|
++iptr_;
|
||||||
|
|
||||||
idstr_.clear();
|
idstr_.clear();
|
||||||
idstr_.append(1, ch);
|
idstr_.append(1, ch);
|
||||||
@ -277,6 +288,8 @@ namespace nana{ namespace widgets{ namespace skeletons
|
|||||||
return token::eof;
|
return token::eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || '_' == ch)
|
if(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || '_' == ch)
|
||||||
{
|
{
|
||||||
--iptr_;
|
--iptr_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user