| ... | ... | @@ -135,6 +135,12 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d |
| 135 | 135 | if (!opts.escaped) try writer.writeAll(s); |
| 136 | 136 | return; |
| 137 | 137 | } |
| 138 | if (TI == .Enum) { |
| 139 | const s = @tagName(x); |
| 140 | if (opts.escaped) try writeEscaped(s, writer); |
| 141 | if (!opts.escaped) try writer.writeAll(s); |
| 142 | return; |
| 143 | } |
| 138 | 144 | @compileError(std.fmt.comptimePrint("pek: print {s}: unsupported type: {s}", .{ v, @typeName(TO) })); |
| 139 | 145 | }, |
| 140 | 146 | .block => |v| { |
| ... | ... | @@ -400,6 +406,8 @@ fn isCodepointAnEntity(cp: u21) ?htmlentities.Entity { |
| 400 | 406 | ')', |
| 401 | 407 | '%', |
| 402 | 408 | '+', |
| 409 | '/', |
| 410 | '@', |
| 403 | 411 | => return null, |
| 404 | 412 | else => {}, |
| 405 | 413 | } |