(text: &str)
| 2271 | } |
| 2272 | |
| 2273 | fn extract_fenced_json_blocks(text: &str) -> Vec<String> { |
| 2274 | let mut out = Vec::new(); |
| 2275 | let mut rest = text; |
| 2276 | |
| 2277 | while let Some(start) = rest.find("```json") { |
| 2278 | let after_start = &rest[start + "```json".len()..]; |
| 2279 | if let Some(end) = after_start.find("```") { |
| 2280 | out.push(after_start[..end].trim().to_string()); |
| 2281 | rest = &after_start[end + "```".len()..]; |
| 2282 | } else { |
| 2283 | break; |
| 2284 | } |
| 2285 | } |
| 2286 | |
| 2287 | out |
| 2288 | } |
| 2289 | |
| 2290 | fn extract_braced_json_candidates(text: &str) -> Vec<String> { |
| 2291 | let chars: Vec<char> = text.chars().collect(); |
no outgoing calls
no test coverage detected