suite: add footnotes unit tests
complementary to ones borrowed from djot.js suite
This commit is contained in:
		
					parent
					
						
							
								00d653e12d
							
						
					
				
			
			
				commit
				
					
						ebe7a913bf
					
				
			
		
					 1 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										58
									
								
								tests/suite/footnotes.test
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								tests/suite/footnotes.test
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | |||
| Footnote references may appear within a footnote. | ||||
| 
 | ||||
| ``` | ||||
| [^a] | ||||
| 
 | ||||
| [^a]: a[^b][^c] | ||||
| [^b]: b | ||||
| . | ||||
| <p><a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p> | ||||
| <section role="doc-endnotes"> | ||||
| <hr> | ||||
| <ol> | ||||
| <li id="fn1"> | ||||
| <p>a<a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a><a id="fnref3" href="#fn3" role="doc-noteref"><sup>3</sup></a><a href="#fnref1" role="doc-backlink">↩︎︎</a></p> | ||||
| </li> | ||||
| <li id="fn2"> | ||||
| <p>b<a href="#fnref2" role="doc-backlink">↩︎︎</a></p> | ||||
| </li> | ||||
| <li id="fn3"> | ||||
| <p><a href="#fnref3" role="doc-backlink">↩︎︎</a></p> | ||||
| </li> | ||||
| </ol> | ||||
| </section> | ||||
| ``` | ||||
| 
 | ||||
| Footnote references in unreferenced footnotes are ignored. | ||||
| 
 | ||||
| ``` | ||||
| para | ||||
| 
 | ||||
| [^a]: a[^b][^c] | ||||
| [^b]: b | ||||
| . | ||||
| <p>para</p> | ||||
| ``` | ||||
| 
 | ||||
| Footnotes may appear within footnotes. | ||||
| 
 | ||||
| ``` | ||||
| [^b] | ||||
| [^a] | ||||
| 
 | ||||
| [^a]: [^b]: inner | ||||
| . | ||||
| <p><a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> | ||||
| <a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a></p> | ||||
| <section role="doc-endnotes"> | ||||
| <hr> | ||||
| <ol> | ||||
| <li id="fn1"> | ||||
| <p>inner<a href="#fnref1" role="doc-backlink">↩︎︎</a></p> | ||||
| </li> | ||||
| <li id="fn2"> | ||||
| <p><a href="#fnref2" role="doc-backlink">↩︎︎</a></p> | ||||
| </li> | ||||
| </ol> | ||||
| </section> | ||||
| ``` | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue