@@ -203,3 +203,287 @@ Footnote in table nested in admonition (issue #22)
203203
204204[ ^ 6 ] : Yellow
205205.
206+
207+
208+ Multiple references to same footnote with subIds
209+ .
210+ First [ ^ 1 ] and second [ ^ 1 ] and third [ ^ 1 ]
211+
212+ [ ^ 1 ] : Shared footnote
213+ .
214+ First [ ^ 1 ] and second [ ^ 1 ] and third [ ^ 1 ]
215+
216+ [ ^ 1 ] : Shared footnote
217+ .
218+
219+
220+ Orphan footnotes (defined but never referenced)
221+ .
222+ Referenced [ ^ used ]
223+
224+ [ ^ orphan ] : This is never referenced
225+
226+ [ ^ used ] : This is used
227+
228+ [ ^ another-orphan ] : Also unused
229+ .
230+ Referenced [ ^ used ]
231+
232+ [ ^ orphan ] : This is never referenced
233+
234+ [ ^ used ] : This is used
235+
236+ [ ^ another-orphan ] : Also unused
237+ .
238+
239+
240+ Chained nested footnote references (A references B, B references C)
241+ .
242+ [ ^ a ] : References B [ ^ b ]
243+
244+ [ ^ b ] : References C [ ^ c ]
245+
246+ [ ^ c ] : Final one
247+
248+ Start [ ^ a ]
249+ .
250+ Start [ ^ a ]
251+
252+ [ ^ a ] : References B [ ^ b ]
253+
254+ [ ^ b ] : References C [ ^ c ]
255+
256+ [ ^ c ] : Final one
257+ .
258+
259+
260+ Complex mixed ordering with multiple references
261+ .
262+ [ ^ z ] : Defined first
263+
264+ [ ^ a ] : Defined second
265+
266+ Text [ ^ a ] then [ ^ z ] then [ ^ a ] again
267+ .
268+ Text [ ^ a ] then [ ^ z ] then [ ^ a ] again
269+
270+ [ ^ z ] : Defined first
271+
272+ [ ^ a ] : Defined second
273+ .
274+
275+
276+ Footnote referenced in body and within another footnote
277+ .
278+ [ ^ x ] : Simple
279+
280+ [ ^ y ] : Contains [ ^ x ] reference
281+
282+ Body [ ^ x ] and [ ^ y ]
283+ .
284+ Body [ ^ x ] and [ ^ y ]
285+
286+ [ ^ x ] : Simple
287+
288+ [ ^ y ] : Contains [ ^ x ] reference
289+ .
290+
291+
292+ Deeply nested: footnote in list in footnote
293+ .
294+ [ ^ outer ] : List item:
295+ - Item with [ ^ inner ] reference
296+ - Another item
297+
298+ [ ^ inner ] : Inner content
299+
300+ Text [ ^ outer ]
301+ .
302+ Text [ ^ outer ]
303+
304+ [ ^ outer ] : List item:
305+
306+ - Item with [ ^ inner ] reference
307+ - Another item
308+
309+ [ ^ inner ] : Inner content
310+ .
311+
312+
313+ Multiple footnotes in nested structures
314+ .
315+ [ ^ 1 ] : First
316+
317+ [ ^ 2 ] : Second with [ ^ 1 ]
318+
319+ [ ^ 3 ] : Third with [ ^ 2 ] and [ ^ 1 ]
320+
321+ Body: [ ^ 3 ] [ ^ 2 ] [ ^ 1 ]
322+ .
323+ Body: [ ^ 3 ] [ ^ 2 ] [ ^ 1 ]
324+
325+ [ ^ 1 ] : First
326+
327+ [ ^ 2 ] : Second with [ ^ 1 ]
328+
329+ [ ^ 3 ] : Third with [ ^ 2 ] and [ ^ 1 ]
330+ .
331+
332+
333+ Reordering with mixed body and nested references
334+ .
335+ [ ^ c ] : Defined first
336+
337+ [ ^ b ] : Defined second [ ^ c ]
338+
339+ [ ^ a ] : Defined third [ ^ b ]
340+
341+ Body [ ^ a ] [ ^ b ] [ ^ c ]
342+ .
343+ Body [ ^ a ] [ ^ b ] [ ^ c ]
344+
345+ [ ^ c ] : Defined first
346+
347+ [ ^ b ] : Defined second [ ^ c ]
348+
349+ [ ^ a ] : Defined third [ ^ b ]
350+ .
351+
352+
353+ Footnotes with same reference appearing in body and definitions
354+ .
355+ [ ^ shared ] : Base note
356+
357+ [ ^ wrapper ] : Contains [ ^ shared ]
358+
359+ First [ ^ shared ] in body, then [ ^ wrapper ]
360+ .
361+ First [ ^ shared ] in body, then [ ^ wrapper ]
362+
363+ [ ^ shared ] : Base note
364+
365+ [ ^ wrapper ] : Contains [ ^ shared ]
366+ .
367+
368+
369+ Complex scenario: multiple refs, nesting, and reordering
370+ .
371+ [ ^ z ] : Last defined [ ^ a ]
372+
373+ [ ^ m ] : Middle defined
374+
375+ [ ^ a ] : First defined [ ^ m ]
376+
377+ Body [ ^ m ] [ ^ a ] [ ^ z ] [ ^ m ]
378+ .
379+ Body [ ^ m ] [ ^ a ] [ ^ z ] [ ^ m ]
380+
381+ [ ^ z ] : Last defined [ ^ a ]
382+
383+ [ ^ m ] : Middle defined
384+
385+ [ ^ a ] : First defined [ ^ m ]
386+ .
387+
388+
389+ Footnote in blockquote with nested reference
390+ .
391+ [ ^ inner ] : Inner note
392+
393+ [ ^ outer ] : Quote:
394+ > Blockquote with [ ^ inner ]
395+
396+ Text [ ^ outer ]
397+ .
398+ Text [ ^ outer ]
399+
400+ [ ^ inner ] : Inner note
401+
402+ [ ^ outer ] : Quote:
403+
404+ > Blockquote with [ ^ inner ]
405+ .
406+
407+
408+ Three-level deep nesting
409+ .
410+ [ ^ 1 ] : Level 1
411+
412+ [ ^ 2 ] : Level 2 [ ^ 1 ]
413+
414+ [ ^ 3 ] : Level 3 [ ^ 2 ]
415+
416+ Start [ ^ 3 ]
417+ .
418+ Start [ ^ 3 ]
419+
420+ [ ^ 1 ] : Level 1
421+
422+ [ ^ 2 ] : Level 2 [ ^ 1 ]
423+
424+ [ ^ 3 ] : Level 3 [ ^ 2 ]
425+ .
426+
427+
428+ Mixed orphans and referenced with complex ordering
429+ .
430+ [ ^ used-first ] : Used
431+
432+ [ ^ orphan-1 ] : Never used
433+
434+ [ ^ used-second ] : Also used [ ^ used-first ]
435+
436+ [ ^ orphan-2 ] : Also never used
437+
438+ Body [ ^ used-second ] [ ^ used-first ]
439+ .
440+ Body [ ^ used-second ] [ ^ used-first ]
441+
442+ [ ^ used-first ] : Used
443+
444+ [ ^ orphan-1 ] : Never used
445+
446+ [ ^ used-second ] : Also used [ ^ used-first ]
447+
448+ [ ^ orphan-2 ] : Also never used
449+ .
450+
451+
452+ Footnotes in table cells with cross-references
453+ .
454+ [ ^ 1 ] : First
455+
456+ [ ^ 2 ] : Second [ ^ 1 ]
457+
458+ | Col A | Col B |
459+ | ----- | ----- |
460+ | A [ ^ 1 ] | B [ ^ 2 ] |
461+ .
462+ | Col A | Col B |
463+ | ----- | ----- |
464+ | A [ ^ 1 ] | B [ ^ 2 ] |
465+
466+ [ ^ 1 ] : First
467+
468+ [ ^ 2 ] : Second [ ^ 1 ]
469+ .
470+
471+
472+ Same footnote multiple times in same and different contexts
473+ .
474+ [ ^ repeat ] : Repeated note
475+
476+ Para 1: [ ^ repeat ] [ ^ repeat ]
477+
478+ [ ^ nested ] : Has [ ^ repeat ] inside
479+
480+ Para 2: [ ^ nested ] [ ^ repeat ]
481+ .
482+ Para 1: [ ^ repeat ] [ ^ repeat ]
483+
484+ Para 2: [ ^ nested ] [ ^ repeat ]
485+
486+ [ ^ repeat ] : Repeated note
487+
488+ [ ^ nested ] : Has [ ^ repeat ] inside
489+ .
0 commit comments