Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
4c1fff6c
Commit
4c1fff6c
authored
Feb 06, 2018
by
Vadim Zaslavsky
Committed by
mrbean-bremen
Dec 22, 2018
Browse files
Font shorthand parsing fixed
See ExCSS pull request #62:
https://github.com/TylerBrinks/ExCSS/pull/62
parent
38d6c5e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/External/ExCSS/Model/Values/TermList.cs
View file @
4c1fff6c
...
@@ -119,5 +119,13 @@ namespace ExCSS
...
@@ -119,5 +119,13 @@ namespace ExCSS
Comma
,
Comma
,
Space
Space
}
}
internal
void
SetLastTerm
(
Term
term
)
{
if
(
Length
==
0
)
AddTerm
(
term
);
else
_items
[
Length
-
1
]
=
term
;
}
}
}
}
}
Source/External/ExCSS/Parser.cs
View file @
4c1fff6c
...
@@ -131,18 +131,18 @@ namespace ExCSS
...
@@ -131,18 +131,18 @@ namespace ExCSS
private
bool
AddTerm
(
Term
value
)
private
bool
AddTerm
(
Term
value
)
{
{
var
added
=
true
;
if
(
_isFraction
)
if
(
_isFraction
)
{
{
if
(
_terms
.
Length
>
0
)
if
(
_terms
.
Length
>
0
)
{
{
value
=
new
PrimitiveTerm
(
UnitType
.
Unknown
,
_terms
[
0
]
+
"/"
+
value
);
value
=
new
PrimitiveTerm
(
UnitType
.
Unknown
,
_terms
[
_terms
.
Length
-
1
]
+
"/"
+
value
);
_terms
=
new
TermList
();
}
}
_terms
.
SetLastTerm
(
value
);
_isFraction
=
false
;
_isFraction
=
false
;
}
}
else
if
(
_functionBuffers
.
Count
>
0
)
if
(
_functionBuffers
.
Count
>
0
)
{
{
_functionBuffers
.
Peek
().
TermList
.
Add
(
value
);
_functionBuffers
.
Peek
().
TermList
.
Add
(
value
);
}
}
...
@@ -156,10 +156,10 @@ namespace ExCSS
...
@@ -156,10 +156,10 @@ namespace ExCSS
}
}
else
else
{
{
return
false
;
added
=
false
;
}
}
return
true
;
return
added
;
}
}
private
void
FinalizeProperty
()
private
void
FinalizeProperty
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment