Browse Source

fcl-css: fixed string to CSS - no quotes needed, as spaces are converted

mattias 1 year ago
parent
commit
d9e7f845c3
2 changed files with 1 additions and 2 deletions
  1. 0 1
      packages/fcl-css/src/fpcsstree.pp
  2. 1 1
      packages/fcl-css/tests/tccsstree.pp

+ 0 - 1
packages/fcl-css/src/fpcsstree.pp

@@ -537,7 +537,6 @@ begin
     Inc(iIn);
     Inc(iIn);
     end;
     end;
   SetLength(Result,iOut);
   SetLength(Result,iOut);
-  Result:='"'+Result+'"';
 end;
 end;
 
 
 function StringToIdentifier(const S: TCSSString): TCSSString;
 function StringToIdentifier(const S: TCSSString): TCSSString;

+ 1 - 1
packages/fcl-css/tests/tccsstree.pp

@@ -402,7 +402,7 @@ end;
 procedure TCSSTreeAsStringTest.TestSTRING;
 procedure TCSSTreeAsStringTest.TestSTRING;
 begin
 begin
   TCSSStringElement(CreateElement(TCSSStringElement)).Value:='abc';
   TCSSStringElement(CreateElement(TCSSStringElement)).Value:='abc';
-  AssertEquals('Value','"abc"',Element.AsString);
+  AssertEquals('Value','abc',Element.AsString);
 end;
 end;
 
 
 procedure TCSSTreeAsStringTest.TestFLOAT;
 procedure TCSSTreeAsStringTest.TestFLOAT;