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, id_base: &str, kind: &str, n: usize)
| 202 | /// `kind` is "scope-in" or "scope-out" and drives the generated id slug. |
| 203 | /// Prose body is the unconstrained narrative (never graded). |
| 204 | fn lift_scope(d: &Directive, id_base: &str, kind: &str, n: usize) -> ScopeItem { |
| 205 | let local = |
| 206 | d.id.clone() |
| 207 | .unwrap_or_else(|| format!("{}-{kind}-{n}", slug(id_base))); |
| 208 | ScopeItem { |
| 209 | type_: NodeType::ScopeItem.as_str().to_string(), |
| 210 | id: as_urn("scope", &local), |
| 211 | text: d.body.clone(), |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | /// Lift a `:::constraint` container into a `Constraint`. |
| 216 | fn lift_constraint(d: &Directive, id_base: &str, n: usize) -> Constraint { |
no test coverage detected