Lift a `:::scope-in` / `:::scope-out` container into a `ScopeItem`. `kind` is "scope-in" or "scope-out" and drives the generated id slug. Prose body is the unconstrained narrative (never graded).
(d: &Directive, human_key: &str, kind: &str, n: usize)
| 185 | /// `kind` is "scope-in" or "scope-out" and drives the generated id slug. |
| 186 | /// Prose body is the unconstrained narrative (never graded). |
| 187 | fn lift_scope(d: &Directive, human_key: &str, kind: &str, n: usize) -> ScopeItem { |
| 188 | let local = |
| 189 | d.id.clone() |
| 190 | .unwrap_or_else(|| format!("{}-{kind}-{n}", slug(human_key))); |
| 191 | ScopeItem { |
| 192 | type_: NodeType::ScopeItem.as_str().to_string(), |
| 193 | id: as_urn("scope", &local), |
| 194 | text: d.body.clone(), |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | /// Lift a `:::constraint` container into a `Constraint`. |
| 199 | fn lift_constraint(d: &Directive, human_key: &str, n: usize) -> Constraint { |
no test coverage detected