Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
f46e3b656b
1 changed files with 7 additions and 8 deletions
|
@ -366,7 +366,8 @@ var parsesvg = func(group, path, options = nil)
|
||||||
{
|
{
|
||||||
text = {
|
text = {
|
||||||
"attr": attr,
|
"attr": attr,
|
||||||
"style": style
|
"style": style,
|
||||||
|
"text": ""
|
||||||
};
|
};
|
||||||
tspans = [];
|
tspans = [];
|
||||||
return;
|
return;
|
||||||
|
@ -375,7 +376,8 @@ var parsesvg = func(group, path, options = nil)
|
||||||
{
|
{
|
||||||
append(tspans, {
|
append(tspans, {
|
||||||
"attr": attr,
|
"attr": attr,
|
||||||
"style": style
|
"style": style,
|
||||||
|
"text": ""
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -562,15 +564,12 @@ var parsesvg = func(group, path, options = nil)
|
||||||
if( size(data) and tspans != nil )
|
if( size(data) and tspans != nil )
|
||||||
{
|
{
|
||||||
if( size(tspans) == 0 )
|
if( size(tspans) == 0 )
|
||||||
# If no tspan is found add a dummy one
|
# If no tspan is found use text element itself
|
||||||
append(tspans, {});
|
append(tspans, text);
|
||||||
|
|
||||||
# If text contains xml entities it gets split at each entity. So let's
|
# If text contains xml entities it gets split at each entity. So let's
|
||||||
# glue it back into a single text...
|
# glue it back into a single text...
|
||||||
if( tspans[-1]["text"] == nil )
|
tspans[-1]["text"] ~= data;
|
||||||
tspans[-1]["text"] = data;
|
|
||||||
else
|
|
||||||
tspans[-1]["text"] ~= data;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue