max / makenotwork
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
- Claude-Session
- https://claude.ai/code/session_01MptwXZ8k65v19rFmdGAyki
1 file changed,
+8 insertions,
-2 deletions
| @@ -31,8 +31,14 @@ | |||
| 31 | 31 | ||
| 32 | 32 | let mut codes = Vec::new(); | |
| 33 | 33 | let mut search = grid_content; | |
| 34 | - | while let Some(code_start) = search.find("<code>") { | |
| 35 | - | let content_start = code_start + "<code>".len(); | |
| 34 | + | // `<code` and not `<code>`: the codes go through `crate::quasi::literal` | |
| 35 | + | // now, so the element is the renderer's and it carries a class. Matching | |
| 36 | + | // the bare tag silently found nothing and the codes read as absent. | |
| 37 | + | while let Some(tag_start) = search.find("<code") { | |
| 38 | + | let open_end = search[tag_start..] | |
| 39 | + | .find('>') | |
| 40 | + | .expect("Unterminated <code tag in backup codes"); | |
| 41 | + | let content_start = tag_start + open_end + 1; | |
| 36 | 42 | let content_end = search[content_start..] | |
| 37 | 43 | .find("</code>") | |
| 38 | 44 | .expect("Unclosed <code> in backup codes"); |