forked from len0rd/rockbox
Theme Editor: Fixed code generation with escaped characters
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26462 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9381b49b04
commit
f16adb045a
1 changed files with 15 additions and 5 deletions
|
@ -101,9 +101,9 @@ QString ParseTreeNode::genCode() const
|
||||||
for(int i = 0; i < children.count(); i++)
|
for(int i = 0; i < children.count(); i++)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Adding a % in case of tag, because the tag rendering code
|
Adding a % in case of tag, because the tag rendering code
|
||||||
doesn't insert its own
|
doesn't insert its own
|
||||||
*/
|
*/
|
||||||
if(children[i]->element->type == TAG)
|
if(children[i]->element->type == TAG)
|
||||||
buffer.append(TAGSYM);
|
buffer.append(TAGSYM);
|
||||||
buffer.append(children[i]->genCode());
|
buffer.append(children[i]->genCode());
|
||||||
|
@ -161,7 +161,12 @@ QString ParseTreeNode::genCode() const
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEXT:
|
case TEXT:
|
||||||
buffer.append(element->text);
|
for(char* cursor = element->text; *cursor; cursor++)
|
||||||
|
{
|
||||||
|
if(find_escape_character(*cursor))
|
||||||
|
buffer.append(TAGSYM);
|
||||||
|
buffer.append(*cursor);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
|
@ -176,7 +181,12 @@ QString ParseTreeNode::genCode() const
|
||||||
switch(param->type)
|
switch(param->type)
|
||||||
{
|
{
|
||||||
case skin_tag_parameter::STRING:
|
case skin_tag_parameter::STRING:
|
||||||
buffer.append(param->data.text);
|
for(char* cursor = param->data.text; *cursor; cursor++)
|
||||||
|
{
|
||||||
|
if(find_escape_character(*cursor))
|
||||||
|
buffer.append(TAGSYM);
|
||||||
|
buffer.append(*cursor);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case skin_tag_parameter::NUMERIC:
|
case skin_tag_parameter::NUMERIC:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue