{"record":{"id":"bcea9acde565544e","repo":"zed-industries/zed","slug":"placeholder-choice-doesn-t-contain-closing-pipe-ch","errorCode":null,"errorMessage":"Placeholder choice doesn't contain closing pipe-character '|'","messagePattern":"Placeholder choice doesn't contain closing pipe-character '\\|'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/snippet/src/snippet.rs","lineNumber":181,"sourceCode":"                    }\n                    source = &source[c.len_utf8()..];\n                }\n            }\n            Some(',') => {\n                found_default_choice = true;\n                source = &source[1..];\n                choices.push(current_choice);\n                current_choice = String::new();\n            }\n            Some('|') => {\n                source = &source[1..];\n                choices.push(current_choice);\n                return Ok((source, Some(choices)));\n            }\n            Some(_) => {\n                let chunk_end = source.find([',', '|', '\\\\']);\n\n                anyhow::ensure!(\n                    chunk_end.is_some(),\n                    \"Placeholder choice doesn't contain closing pipe-character '|'\"\n                );\n\n                let (chunk, rest) = source.split_at(chunk_end.unwrap());\n\n                if !found_default_choice {\n                    text.push_str(chunk);\n                }\n\n                current_choice.push_str(chunk);\n                source = rest;\n            }\n        }\n    }\n}\n\n#[cfg(test)]","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/snippet/src/snippet.rs#L163-L199","documentation":"Snippet parser guard in parse_choices(): while scanning a placeholder's choice list, the terminating '|' was never found before the input ran out, so the choice syntax (${n|a,b|}) is unterminated/malformed.","triggerScenarios":"Thrown at crates/snippet/src/snippet.rs:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Close the choice list with '|' inside the placeholder"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}