refactor: unparametrized bold style
This commit is contained in:
		
							parent
							
								
									790a139fa1
								
							
						
					
					
						commit
						67877f74fd
					
				
							
								
								
									
										5
									
								
								main.js
								
								
								
								
							
							
						
						
									
										5
									
								
								main.js
								
								
								
								
							| 
						 | 
					@ -1982,7 +1982,7 @@ function applycolorsonline(line, index, options)
 | 
				
			||||||
	if (line.startsWith("#"))
 | 
						if (line.startsWith("#"))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		line = line.replace(/(#* )/, "<span style='color:" + settings.accentcolor + "'>$1</span>"); // to check!
 | 
							line = line.replace(/(#* )/, "<span style='color:" + settings.accentcolor + "'>$1</span>"); // to check!
 | 
				
			||||||
		line = "<span style='" + boldstyle + "'>" + line + "</span>";
 | 
							line = "<span style='font-weight: bold;'>" + line + "</span>";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// bold and italics
 | 
						// bold and italics
 | 
				
			||||||
| 
						 | 
					@ -1991,7 +1991,7 @@ function applycolorsonline(line, index, options)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		temp = line.substring(2);
 | 
							temp = line.substring(2);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='" + boldstyle + "'>**$1**</span>");
 | 
						temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='font-weight: bold;'>**$1**</span>");
 | 
				
			||||||
	temp = temp.replace(/\*([^\*]*)\*/g, "<em>*$1*</em>");
 | 
						temp = temp.replace(/\*([^\*]*)\*/g, "<em>*$1*</em>");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (line.startsWith("* "))
 | 
						if (line.startsWith("* "))
 | 
				
			||||||
| 
						 | 
					@ -2108,7 +2108,6 @@ function applycolorsonline(line, index, options)
 | 
				
			||||||
	return line;
 | 
						return line;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var boldstyle = "font-weight: bold;";
 | 
					 | 
				
			||||||
function applycolors(currentonly)
 | 
					function applycolors(currentonly)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (!settings.colors)
 | 
						if (!settings.colors)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue