Skip to content

Commit 5fd0b44

Browse files
committed
Merge pull request #1 from Fabiensk/master
Example and non-entity semi-colon issue
2 parents a7b8e93 + 354132e commit 5fd0b44

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn main() {
7979
let mut depth = 0;
8080
for e in parser.events() {
8181
match e {
82-
StartElement(name, _, _) => {
82+
StartElement { ref name, ref attributes, ref namespace } => {
8383
println!("{}/{}", indent(depth), name);
8484
depth += 1;
8585
}

src/reader/parser.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ impl PullParser {
439439
self.append_str_continue(t.to_string().as_slice())
440440
}
441441

442+
ReferenceEnd => { // Semi-colon in a text outside an entity
443+
self.inside_whitespace = false;
444+
self.append_str_continue(";")
445+
}
446+
442447
CommentStart if self.config.coalesce_characters && self.config.ignore_comments => {
443448
// We need to disable lexing errors inside comments
444449
self.lexer.disable_errors();

0 commit comments

Comments
 (0)