Added H1 and H2 to md_pango
This commit is contained in:
		
							parent
							
								
									b0b6a553b7
								
							
						
					
					
						commit
						48a8f9b691
					
				| @ -25,6 +25,16 @@ gchar *md_pango_render(gchar *markup, gint length) | ||||
| 	g_regex_unref(regex); | ||||
| 	g_free(str); | ||||
| 
 | ||||
| 	regex = g_regex_new("#{2}(.*)", 0, 0, NULL); | ||||
| 	str = g_regex_replace(regex, str2, -1, 0, "<h1>\\1</h1>", 0, NULL); | ||||
| 	g_regex_unref(regex); | ||||
| 	g_free(str2); | ||||
| 
 | ||||
| 	regex = g_regex_new("#{1}(.*)", 0, 0, NULL); | ||||
| 	str2 = g_regex_replace(regex, str, -1, 0, "<h2>\\1</h2>", 0, NULL); | ||||
| 	g_regex_unref(regex); | ||||
| 	g_free(str); | ||||
| 
 | ||||
| 	regex = g_regex_new("\\!\\[([^\\]]*)\\]\\(([^\\)]*)\\)", 0, 0, NULL); | ||||
| 	str = g_regex_replace(regex, str2, -1, 0, "-- Image \\1 (\\2) --", 0, NULL); | ||||
| 	g_regex_unref(regex); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user