| author | |
| committer | |
| log | aaef4127e180916d1466e6598b616818a751a14c |
| tree | 751bf972c35e9562cc34521031a9e373041a1f73 |
| parent | 4f787a692959390d41b948f87426dfdf69d832af |
1 files changed, 13 insertions(+), 0 deletions(-)
src/lib.zig+13| ... | ... | @@ -192,6 +192,19 @@ fn entityLookupBefore(in: []const u8) ?htmlentities.Entity { |
| 192 | 192 | if (!std.mem.endsWith(u8, e.entity, ";")) { |
| 193 | 193 | continue; |
| 194 | 194 | } |
| 195 | if (in.len == 1) { | |
| 196 | switch (in[0]) { | |
| 197 | '\n', | |
| 198 | '.', | |
| 199 | ':', | |
| 200 | '(', | |
| 201 | ')', | |
| 202 | '%', | |
| 203 | '+', | |
| 204 | => return null, | |
| 205 | else => break, | |
| 206 | } | |
| 207 | } | |
| 195 | 208 | if (std.mem.eql(u8, e.characters, in)) { |
| 196 | 209 | return e; |
| 197 | 210 | } |