Skip to content

Commit

Permalink
Tolerant keep (#371)
Browse files Browse the repository at this point in the history
* Fix tolerant gobbling

* Update release date
  • Loading branch information
ohler55 authored Feb 11, 2025
1 parent 49e6832 commit f378920
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All changes to the Ox gem are documented here. Releases follow semantic versioning.

## [2.14.22] - 2025-02-11

### Fixed

- Fix issue with first text character lost after unquoted attribute value.

## [2.14.21] - 2025-01-15

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion ext/ox/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,12 @@ static char *read_element(PInfo pi) {
break;
}
} else { /* read as TEXT */
char prev = *(start - 1);

pi->s = start;
/*pi->s--; */
if ('>' != prev && (' ' <= prev || is_white(prev))) {
pi->s--;
}
read_text(pi);
/*read_reduced_text(pi); */

Expand Down
2 changes: 1 addition & 1 deletion lib/ox/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Ox
# Current version of the module.
VERSION = '2.14.21'
VERSION = '2.14.22'
end

0 comments on commit f378920

Please sign in to comment.