@matinfo/vitepress-plugin-quiz 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -83,6 +83,13 @@ explanation: The `color` property sets the foreground text colour.
83
83
  :::
84
84
  ```
85
85
 
86
+ ### Syntax notes
87
+
88
+ - Keys are case-insensitive (`Question:`, `ANSWER-CORRECT:`).
89
+ - Values can span several lines: any line that is not a known key continues the previous `question`, `answer`/`answer-correct` or `explanation`.
90
+ - Fill-in-the-blank answers are lenient: capitals, accents, surrounding and repeated spaces are ignored (`reseau` matches `Réseau`). Repeat `answer-input:` to accept several variants.
91
+ - Invalid blocks (no question, no answers) and choice quizzes without `answer-correct` log a build-time warning with the line number.
92
+
86
93
  ---
87
94
 
88
95
  ## Documentation
@@ -10,3 +10,8 @@ export type RichPart = {
10
10
  * Used for question titles, answer text, and explanations.
11
11
  */
12
12
  export declare function parseRichText(text: string): RichPart[];
13
+ /**
14
+ * Normalise a typed answer for lenient comparison: case-insensitive,
15
+ * accent-insensitive ("Réseau" == "reseau"), trimmed, whitespace collapsed.
16
+ */
17
+ export declare function normalizeInput(text: string): string;