/** * Reading the exercises of a document (#1225): each `:::exercise` fence's * blocks read into an {@link ExerciseModel} — its kind (written or told by * its content), instruction, items, answers, solutions and hints. Pure: the * blocks are not changed. */ import type { ContentBlock } from '../parse/index.js'; import { type ExerciseIssue, type ExerciseKind, type ExerciseModel, type ExerciseOperation } from './types.js'; /** Whether the blocks hold an exercise. */ export declare function hasExercises(blocks: readonly ContentBlock[]): boolean; /** The index of the marker closing the container opened at `start`. */ export declare function containerEndOf(blocks: readonly ContentBlock[], start: number): number; /** The pair separator of a `match` item: ` -> `, `→`, `⟶`. */ export declare const PAIR_RE: RegExp; export declare function exerciseKindOf(type: string | undefined): ExerciseKind | undefined; /** An operation item (`345 + 278`, `12,5 + 3,75`), its result worked out: * whole numbers and decimals (#1244), the result in the decimal mark * written. A division by a decimal is not read; a decimal dividend's * quotient goes on up to two more decimals while there is a remainder. */ export declare function readOperation(text: string, block: number): ExerciseOperation | undefined; /** Read every exercise of `blocks`, in order. A `:::solution` or `:::hint` * outside an exercise, and an exercise inside another, are reported. */ export declare function readExercises(blocks: readonly ContentBlock[]): { exercises: ExerciseModel[]; issues: ExerciseIssue[]; }; //# sourceMappingURL=model.d.ts.map