mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 15:36:07 +00:00 
			
		
		
		
	Pas mal ;)
This commit is contained in:
		
							parent
							
								
									f42080a4af
								
							
						
					
					
						commit
						ed614e94ac
					
				
					 3 changed files with 15467 additions and 9 deletions
				
			
		|  | @ -61,6 +61,16 @@ namespace AideDeJeuCmd | ||||||
|             } |             } | ||||||
|             return str; |             return str; | ||||||
|         } |         } | ||||||
|  |         public static string ToParagraphString(this Markdig.Syntax.ParagraphBlock paragraphBlock) | ||||||
|  |         { | ||||||
|  |             var str = string.Empty; | ||||||
|  |             str += paragraphBlock.Inline.ToContainerString(); | ||||||
|  |             if (paragraphBlock.IsBreakable) | ||||||
|  |             { | ||||||
|  |                 str += "\n"; | ||||||
|  |             } | ||||||
|  |             return str; | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         public static string ToMarkdownString(this IEnumerable<Spell> spells) |         public static string ToMarkdownString(this IEnumerable<Spell> spells) | ||||||
|         { |         { | ||||||
|  | @ -134,13 +144,14 @@ namespace AideDeJeuCmd | ||||||
|                     if (block is Markdig.Syntax.ParagraphBlock) |                     if (block is Markdig.Syntax.ParagraphBlock) | ||||||
|                     { |                     { | ||||||
|                         var paragraphBlock = block as Markdig.Syntax.ParagraphBlock; |                         var paragraphBlock = block as Markdig.Syntax.ParagraphBlock; | ||||||
|                         //DumpParagraphBlock(paragraphBlock); |                         spell.DescriptionHtml += paragraphBlock.ToParagraphString(); | ||||||
|                         Console.WriteLine(paragraphBlock.IsBreakable); |                         ////DumpParagraphBlock(paragraphBlock); | ||||||
|                         spell.DescriptionHtml += paragraphBlock.Inline.ToContainerString(); |                         //Console.WriteLine(paragraphBlock.IsBreakable); | ||||||
|                         if(paragraphBlock.IsBreakable) |                         //spell.DescriptionHtml += paragraphBlock.Inline.ToContainerString(); | ||||||
|                         { |                         //if(paragraphBlock.IsBreakable) | ||||||
|                             spell.DescriptionHtml += "\n"; |                         //{ | ||||||
|                         } |                         //    spell.DescriptionHtml += "\n"; | ||||||
|  |                         //} | ||||||
|                     } |                     } | ||||||
|                     if (block is Markdig.Syntax.ListBlock) |                     if (block is Markdig.Syntax.ListBlock) | ||||||
|                     { |                     { | ||||||
|  | @ -159,7 +170,7 @@ namespace AideDeJeuCmd | ||||||
|                                     foreach (var ininblock in listItemBlock) |                                     foreach (var ininblock in listItemBlock) | ||||||
|                                     { |                                     { | ||||||
|                                         //DumpBlock(ininblock); |                                         //DumpBlock(ininblock); | ||||||
|                                         if(ininblock is Markdig.Syntax.ParagraphBlock) |                                         if (ininblock is Markdig.Syntax.ParagraphBlock) | ||||||
|                                         { |                                         { | ||||||
|                                             var paragraphBlock = ininblock as Markdig.Syntax.ParagraphBlock; |                                             var paragraphBlock = ininblock as Markdig.Syntax.ParagraphBlock; | ||||||
|                                             //DumpParagraphBlock(paragraphBlock); |                                             //DumpParagraphBlock(paragraphBlock); | ||||||
|  | @ -167,7 +178,7 @@ namespace AideDeJeuCmd | ||||||
|                                             var match = regex.Match(str); |                                             var match = regex.Match(str); | ||||||
|                                             var key = match.Groups["key"].Value; |                                             var key = match.Groups["key"].Value; | ||||||
|                                             var value = match.Groups["value"].Value; |                                             var value = match.Groups["value"].Value; | ||||||
|                                             switch(key) |                                             switch (key) | ||||||
|                                             { |                                             { | ||||||
|                                                 case "NameVO": |                                                 case "NameVO": | ||||||
|                                                     spell.NameVO = value; |                                                     spell.NameVO = value; | ||||||
|  | @ -201,6 +212,25 @@ namespace AideDeJeuCmd | ||||||
|                                 } |                                 } | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|  |                         else | ||||||
|  |                         { | ||||||
|  |                             foreach (var inblock in listBlock) | ||||||
|  |                             { | ||||||
|  |                                 if (inblock is Markdig.Syntax.ListItemBlock) | ||||||
|  |                                 { | ||||||
|  |                                     var listItemBlock = inblock as Markdig.Syntax.ListItemBlock; | ||||||
|  |                                     foreach (var ininblock in listItemBlock) | ||||||
|  |                                     { | ||||||
|  |                                         //DumpBlock(ininblock); | ||||||
|  |                                         if (ininblock is Markdig.Syntax.ParagraphBlock) | ||||||
|  |                                         { | ||||||
|  |                                             var paragraphBlock = ininblock as Markdig.Syntax.ParagraphBlock; | ||||||
|  |                                             spell.DescriptionHtml += listBlock.BulletType + " " + paragraphBlock.ToParagraphString(); | ||||||
|  |                                         } | ||||||
|  |                                     } | ||||||
|  |                                 } | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
							
								
								
									
										7712
									
								
								Data/new 1.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7712
									
								
								Data/new 1.txt
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										7716
									
								
								Data/new 2.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7716
									
								
								Data/new 2.txt
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez