(frontmatter_json: &str)
| 277 | } |
| 278 | |
| 279 | fn frontmatter_memory_id(frontmatter_json: &str) -> Option<String> { |
| 280 | let id = frontmatter_string(frontmatter_json, &["@id", "uid", "id"])?; |
| 281 | if id.starts_with("urn:atomic:") { |
| 282 | Some(id) |
| 283 | } else { |
| 284 | Some(format!("urn:atomic:memory:{id}")) |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | /// Extract `labels` (array of strings) from frontmatter JSON. |
| 289 | fn frontmatter_labels(frontmatter_json: &str) -> Vec<String> { |
no test coverage detected