mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 15:36:07 +00:00 
			
		
		
		
	Gestion des AltName dans les LinkItem
This commit is contained in:
		
							parent
							
								
									48e1d57560
								
							
						
					
					
						commit
						ffe3f98c55
					
				
					 2 changed files with 26 additions and 0 deletions
				
			
		|  | @ -60,6 +60,31 @@ namespace AideDeJeuLib | |||
|                         return; | ||||
|                     } | ||||
|                 } | ||||
|                 else if (block is ListBlock) | ||||
|                 { | ||||
|                     var listBlock = block as ListBlock; | ||||
|                     if (listBlock.BulletType == '-') | ||||
|                     { | ||||
|                         var regex = new Regex("(?<key>.*?): (?<value>.*)"); | ||||
|                         var str = block.ToMarkdownString(); | ||||
|                         var properties = new List<Tuple<string, Action<LinkItem, string>>>() | ||||
|                         { | ||||
|                             new Tuple<string, Action<LinkItem, string>>("- AltName: ", (m, s) => | ||||
|                             { | ||||
|                                 m.AltName = s; | ||||
|                             }) | ||||
|                         }; | ||||
| 
 | ||||
|                         foreach (var property in properties) | ||||
|                         { | ||||
|                             if (str.StartsWith(property.Item1)) | ||||
|                             { | ||||
|                                 property.Item2.Invoke(this, str.Substring(property.Item1.Length)); | ||||
|                                 break; | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 enumerator.MoveNext(); | ||||
|             } | ||||
|         } | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
| [][LinkItem] | ||||
| 
 | ||||
| ## [Barbare] | ||||
| - AltName: [Barbarian](#) | ||||
| 
 | ||||
| [][LinkItem] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez