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.
- Do no use recursive calls during parsing. Could lead to stack overflow on some input.
- Revert Do not expand predefined references in
Stream::consume_reference
. - Tests on Rust 1.61. Thanks to @krtab.
0.13.4 - 2021-06-24
- Do not expand predefined references in
Stream::consume_reference
. Thanks to @Jesse-Bakker.
0.13.3 - 2020-09-02
- Documentation fixes by @kneasle.
DtdEnd
token parsing when]
and>
are separated by a whitespace.
0.13.2 - 2020-06-15
- Allow processing instruction before DTD.
0.13.1 - 2020-03-12
- Allow comments before DTD.
0.13.0 - 2020-01-07
- Moved to Rust 2018.
- Completely new
Error
enum. - New error messages.
- 10-20% faster parsing.
- Use
Tokenizer::from_fragment
instead ofTokenizer::enable_fragment_mode
.
TokenType
.
0.12.0 - 2019-12-21
]]>
is no longer allowed inside a Text node.- Only XML characters are allowed now.
Otherwise,
StreamError::NonXmlChar
will occur. - Disallow
-
at the end of a comment.<!--a--->
is an error now. - A missing space between attributes is an error now.
StreamError::InvalidQuote
andStreamError::InvalidSpace
signature changed.
0.11.0 - 2019-11-18
no_std
support thanks to hugwijst.
StreamError::InvalidString
doesn't store an actual string now.
0.10.0 - 2019-09-14
- 10-15% faster parsing.
- Merge
ByteStream
andStream
. StreamError::InvalidChar
signature changed.StreamError::InvalidChar
was split intoInvalidChar
andInvalidCharMultiple
.
-
Check for NameStartChar during qualified name parsing.
E.g.
<-p>
is an invalid tag name from now. -
Qualified name with multiple
:
is an error now. -
]>
is a valid text/CharData
now. Previously it was parsed asDoctypeEnd
.
StreamError::InvalidAttributeValue
.StreamError::InvalidChar
will be emitted instead.
0.9.0 - 2019-02-27
span
field to allToken
variants, which contains a whole token span in bytes.Stream::try_consume_byte
.
-
All
Token
variants are structs now and not tuples. -
StrSpan
contains an actual string span an not only region now.So we can use a non-panic and zero-cost
StrSpan::as_str
instead ofStrSpan::to_str
, that was performing slicing each time. -
Split
Stream
intoByteStream
andStream
. -
Stream::skip_spaces
will parse only ASCII whitespace now. -
Rename
StrSpan::to_str
intoStrSpan::as_str
. -
Rename
Reference::EntityRef
intoReference::Entity
. -
Rename
Reference::CharRef
intoReference::Char
. -
StrSpan::from_substr
andStrSpan::slice_region
are private now.
Token::Whitespaces
. Will be parsed asToken::Text
.Stream::curr_char
.Stream::is_curr_byte_eq
.Stream::consume_either
.Stream::skip_ascii_spaces
. UseStream::skip_spaces
instead.StrSpan::trim
.StrSpan::len
.StrSpan::full_len
.StrSpan::as_bytes
.
- Declaration attributes with mixed quotes parsing.
0.8.1 - 2019-01-02
- Changed the crate category in the Cargo.toml
0.8.0 - 2018-12-13
Error::pos()
.
- Rename
Stream::gen_error_pos
intoStream::gen_text_pos
. - Rename
Stream::gen_error_pos_from
intoStream::gen_text_pos_from
. Stream::gen_text_pos
speed up.
TextPos
is Unicode aware now.- XML declaration parsing when file has a BOM.
0.7.0 - 2018-10-29
<
inside an attribute value is an error now.Token::Declaration
represents standalone asbool
now.- XML declaration must be defined only once now.
- XML declaration must start at 0 position.
- DTD must be defined only once now.
0.6.1 - 2018-10-08
Stream::curr_byte_unchecked
.
- UTF-8 BOM processing.
0.6.0 - 2018-08-31
Reference::EntityRef
contains&str
and notStrSpan
now.- Rename
Stream::try_consume_char_reference
intotry_consume_reference
. And it will returnReference
and notchar
now. - Rename
Tokenizer::set_fragment_mode
intoenable_fragment_mode
. - Rename
ErrorPos
intoTextPos
.
TextPos
calculation viaStream::gen_error_pos
.
TextUnescape
andXmlSpace
because useless.
0.5.0 - 2018-06-14
StreamError::InvalidChar
.StreamError::InvalidSpace
.StreamError::InvalidString
.
Stream::consume_reference
will return onlyInvalidReference
error from now.Error::InvalidTokenWithCause
merged intoError::InvalidToken
.Stream::gen_error_pos_from
does not requiremut self
from now.StreamError::InvalidChar
requiresVec<u8>
and notString
from now.ErrorPos
usesu32
and notusize
from now.
failure
dependency.log
dependency.
0.4.1 - 2018-05-23
- An ability to parse an XML fragment.
0.4.0 - 2018-04-21
- Relicense from MIT to MIT/Apache-2.0.
FromSpan
trait.from_str
andfrom_span
methods are removed. Use theFrom
trait instead.
0.3.0 - 2018-04-10
- Use
failure
instead oferror-chain
. - Minimum Rust version is 1.18.
- New error messages.
TokenType
is properly public now.
ChainedError
0.2.0 - 2018-03-11
- Qualified name parsing.
- Breaking.
Token::ElementStart
andToken::Attribute
contains prefix and local part of the qualified name now.
0.1.2 - 2018-02-12
Stream::skip_ascii_spaces
.- Small performance optimizations.
0.1.1 - 2018-01-17
log
0.3 -> 0.4