[MFM] Better syntax parsing
Allow nesting by same tag
This commit is contained in:
		
							parent
							
								
									bb92158dff
								
							
						
					
					
						commit
						b515cc90e9
					
				
					 2 changed files with 18 additions and 3 deletions
				
			
		
							
								
								
									
										15
									
								
								test/mfm.ts
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								test/mfm.ts
									
										
									
									
									
								
							|  | @ -276,6 +276,21 @@ describe('MFM', () => { | |||
| 					}), | ||||
| 				]); | ||||
| 			}); | ||||
| 
 | ||||
| 			it('nested', () => { | ||||
| 				const tokens = parse('<spin><spin>:foo:</spin></spin>'); | ||||
| 				assert.deepStrictEqual(tokens, [ | ||||
| 					tree('spin', [ | ||||
| 						tree('spin', [ | ||||
| 							leaf('emoji', { name: 'foo' }) | ||||
| 						], { | ||||
| 							attr: null | ||||
| 						}), | ||||
| 					], { | ||||
| 						attr: null | ||||
| 					}), | ||||
| 				]); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
| 		it('jump', () => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue