Comments (5)
Well, I was testing different inputs and it was failing like that on latest released version on empty string (string.Empty).
On current code base it doesn't fail due to some other changes since last release, so I have no inputs to reproduce it now using parser. But you still can reproduce it using isolated test for this extension method (and TrimLastLine):
new StringBuilder("\r\n").TrimLastLine();
new StringBuilder("\r\n").TrimFirstLine();
from excss.
Can you provide any detail on what was being parsed? There's not enough detail here to understand what happened.
from excss.
Looks like #64 tried to fix the same issue, but introduced this error.
from excss.
I can confirm that this exception is being thrown when the input string is empty, resulting in every collection in ExCSS.StyleSheet having a count of zero.
var parser = new ExCSS.Parser();
var stylesheet = parser.Parse(string.Empty);
var css = stylesheet.ToString(true); // throws IndexOutOfRangeException
from excss.
Looking into it.
from excss.
Related Issues (20)
- Janky at-rule catches FillDeclaration in an infinite loop HOT 3
- Can't parse this code, waiting for a long, long time HOT 5
- Font size rule doesn't allow functions HOT 3
- Changelog for Releases HOT 7
- ClipPath property is empty
- ListSelector should be a public class HOT 2
- Certain comments is breaking the parser and hex colours are converted to rgb colours HOT 3
- NullReferenceException in ToCss() in v0.4.2
- Parsing z-index values outside of int range throws an OverflowException HOT 5
- Selector with attribute matching throws exception on WebGL build HOT 1
- JustifyContent always parses to empty string
- Everything's that's useful is internal HOT 1
- Flex: auto should be parsed to "flex: 1 1 auto" instead of "flex: 0 1 auto"
- animation-name is being converted to lower case which affects the resulting css
- Discarding of "invalid" property values - way to keep in parsed object? HOT 1
- justify-content update breaks the following css (Starting with 4.2.3) HOT 1
- Copyright placeholder in your license.txt file HOT 1
- Support for *-block and *-inline properties
- opacity can not parse when is 84%
- How to use selectors? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excss.