All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.8.1 - 2018-04-21
- DEPRECATED.
0.8.0 - 2018-04-10
- Breaking. Use
failure
instead oferror-chain
. - Breaking. A completely new error types.
- Minimum Rust version is 1.18.
0.7.0 - 2018-03-11
- Breaking. Added
AttributeValue::Path
. - Breaking. Added
AttributeValue::Points
. - Breaking. Added
AttributeValue::Style
. - Breaking. Added
AttributeValue::Transform
. - Breaking. Added
AttributeValue::ViewBox
. - Breaking. Added
AttributeValue::AspectRatio
. points
attribute tokenizer:Points
.- All tokenizers derive
Clone
,Copy
,PartialEq
andDebug
now. Debug
forNumberList
andLengthList
.- Case-insensitive parsing for
rgb(...)
colors. preserveAspectRatio
attribute parsing.
-
Breaking.
AttributeValue
parser no longer return thepoints
attribute as aNumberList
, but asPoints
. -
Breaking.
viewBox
attribute will be parsed asAttributeValue::ViewBox
and not asAttributeValue::NumberList
. -
Breaking.
NumberList
andLengthList
implementsFromSpan
trait instead of customfrom_span
methods. -
Breaking.
TagName
andAttrName
aliasQName
and notName
now. So tag and attribute names contain namespace prefix now. But not the namespace URI itself. -
Breaking. Prefixed attributes ID's removed. So:
AttributeId::XlinkHref
->xlink
prefix +AttributeId::Href
. -
Breaking. The
cursor
attribute will be parsed as a string now. -
Relicense from MPL-2.0 to MIT/Apache-2.0.
style
attribute parsing when value contains comments.
0.6.4 - 2018-02-03
- Invalid files in the crate package.
0.6.3 - 2018-01-17
log
0.3 -> 0.4
0.6.2 - 2017-12-16
- Discard 0.6.1 changes.
0.6.1 - 2017-12-16
- Path parsing when subpath starts not with MoveTo.
0.6.0 - 2017-12-15
Note: this update contains a lot of breaking changes.
- Case-insensitive parsing for color names.
error-chain
crate for errors.log
crate for warnings.
- XML parsing moved to a separate crate: xmlparser.
- All tokenizer's return
Option<Result<T>>
now and notResult<T>
. path::Tokenizer
doesn't return errors anymore, because any error should stop parsing anyway.- Rename
TextFrame
toStrSpan
. - Almost all fields in
svg::Token
enum are changed.
- Panic during style attribute parsing.
Tokenize
trait. The defaultIterator
is used now.Tokens
iterator. The defaultIterator
is used now.EndOfStream
error. Iterator will returnNone
instead.Stream
struct.warnln!
macro.log::warn!
is used instead.
0.5.0 - 2017-09-26
Note: this update contains breaking changes.
- Text unescaping support via
TextUnescape
. Tokens
iterator.
-
100..900 values of the
font-weight
will be parsed asValueId
and not asNumber
now. -
All *_raw methods in
Stream
module are renamed to *_unchecked. -
Stream::parse_number
returns onlyInvalidNumber
error now. -
Breaking change. All
EndOfStream
tokens are removed. End of stream is indicated viaError::EndOfStream
now.Prefer using a
Tokens
iterator.
- Panic during a
Color
parsing.
0.4.3 - 2017-09-03
- Character entity references for whitespaces parsing. So #x20, #x9, #xD, #xA will be parsed correctly now.
- Prefixed items parsing inside a style attribute.
0.4.2 - 2017-07-08
font-size='small'
parsing.
0.4.1 - 2017-06-15
- Parsing of transform list separated by a comma.
0.4.0 - 2017-05-14
AttributeValue::from_str
.path::Tokenizer::from_str
.style::Tokenizer::from_str
.transform::Tokenizer::from_str
.svg::Tokenizer::from_frame
.Stream::from_str
,Stream::to_text_frame
.Tokenize
trait which defines general parsing methods.- Implement
FromStr
trait forColor
. path::Tokenizer
,svg::Tokenizer
,style:Tokenizer
,transform::Tokenizer
are implementTokenize
now.- Implement
Display
trait forAttributeId
,ElementId
andValueId
.
- All warnings will be printed to stderr now.
- All
&[u8]
changed to&str
. - Rename
RgbColor
toColor
. - Rename
TransformToken
toToken
. - Rename
SegmentToken
toToken
. NumberList
andLengthList
should be created usingfrom_frame
method now.- Split
svg::Token::ElementStart
intoXmlElementStart
andSvgElementStart
. - Split
svg::Token::Attribute
intoXmlAttribute
andSvgAttribute
. - Split
svg::ElementEnd::Close
intoCloseXml
andCloseSvg
.
Color::from_stream
. UseColor::from_frame
instead.AttributeValue::from_stream
. UseAttributeValue::from_frame
instead.path::Tokenizer::new
. Usepath::Tokenizer::from_frame
instead.style::Tokenizer::new
. Usestyle::Tokenizer::from_frame
instead.transform::Tokenizer::new
. Usetransform::Tokenizer::from_frame
instead.svg::Tokenizer::new
. Usesvg::Tokenizer::from_str
instead.Stream::new
. UseStream::from_str
instead.Stream::global_pos
,Stream::parent_text
.path::SegmentData
andpath::Segment
. They are part ofpath::Token
now.
0.3.1 - 2017-03-15
- Color attribute value parsing.
- Style attribute parsing.
0.3.0 - 2017-03-06
Error::Utf8Error
instead of panic duringstr::from_utf8
unwrap.Stream::is_letter_raw
.
- Use default
f64
parser instead of a custom one.
- The
u8_to_str
macro. Error::ElementWithoutTagName
.Error::InvalidSvgToken
will be emitted instead.Stream::read_to_trimmed
.
- Few panics that can be triggered by an invalid input.
.
was parsed as0
byStream::parse_number
. Now it's an error.- Endless loop when a ClosePath segment was followed by a number.
Stream::parse_integer
error when a number is at the end of the stream.Stream::parse_integer
will return an error on an integer overflow now.- Numbers parsing with a decimal part and an exponent.
0.2.1 - 2017-02-01
- Building against new
phf
crate.
0.2.0 - 2017-01-14
Stream::global_pos
.Stream::parent_text
.
Error::EndOfStream
removed. Now all tokens enum contains it's own EndOfStream. It's allowed to simplify tokenization loops.- All tokenizers does not implement
Iterator
trait now. - Rename
Transform
intoTransformToken
.
- Non-SVG elements:
flowPara
,flowRegion
,flowRoot
andflowSpan
from the list of known elements.
0.1.0 - 2016-10-09
trim_trailing_spaces
,read_to_trimmed
methods to theStream
.- Support spaces around
=
while attribute parsing. - Trim spaces from both sides of the attribute value.
- Hash impl for enums.
- All *Units attribute values are parsed now.
- The
InvalidLength
error.
- Rename
AdvanceError
intoInvalidAdvance
. - Rename
len_to_char_or_end
intolen_to_or_end
. - Rename
jump_to_char_or_end
intojump_to_or_end
.
0.0.3 - 2016-09-20
- A fallback value parsing from the <paint> type.
- Parse the
inherit
value from thefont-family
attribute.
path::Segment
now returns only command char and segment data. All segment manipulation methods are removed.
path::Command
struct.
- In SVG path there can be any command after
ClosePath
, not onlyMoveTo
. - Fix
'
parsing inside the style attribute.
0.0.2 - 2016-09-09
- Remove
BlockProgression
andTextAlign
fromAttributeId
enum since they are not a SVG attributes.
- Initial release.