You've already forked lazarus-ccr
fpspreadsheet: Initial implementation of html font reader (so far, uses only "style" attribute of "td" node)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4254 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -40,7 +40,8 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Strings;
|
||||
Strings,
|
||||
fpsUtils;
|
||||
|
||||
const
|
||||
// http://unicode.e-workers.de/entities.php
|
||||
@ -481,7 +482,7 @@ begin
|
||||
inc(i);
|
||||
end;
|
||||
inc(i); // skip the final '"'
|
||||
Add(TsHTMLAttr.Create(lowercase(nam), value));
|
||||
Add(TsHTMLAttr.Create(lowercase(trim(nam)), trim(value)));
|
||||
nam := '';
|
||||
end;
|
||||
' ', '/', '>': ;
|
||||
@ -514,12 +515,16 @@ begin
|
||||
begin
|
||||
case AStyle[i] of
|
||||
':': begin // name-value separator
|
||||
inc(i); // skip ':'
|
||||
while (i <= len) and (AStyle[i] = ' ') do inc(i); // skip white space
|
||||
value := '';
|
||||
while (i <= len) and (AStyle[i] <> ';') do
|
||||
begin
|
||||
value := value + AStyle[i];
|
||||
inc(i); // skip final ';'
|
||||
Add(TsHTMLAttr.Create(lowercase(nam), value));
|
||||
inc(i);
|
||||
end;
|
||||
// inc(i); // skip final ';'
|
||||
Add(TsHTMLAttr.Create(lowercase(trim(nam)), UnquoteStr(trim(value))));
|
||||
nam := '';
|
||||
end;
|
||||
' ': ;
|
||||
|
Reference in New Issue
Block a user