changed: use shadow instead of bold to allow bold with non-monospace fonts
This commit is contained in:
		
							parent
							
								
									ff96f87b68
								
							
						
					
					
						commit
						4f248185ee
					
				
							
								
								
									
										10
									
								
								main.js
								
								
								
								
							
							
						
						
									
										10
									
								
								main.js
								
								
								
								
							| 
						 | 
					@ -1955,7 +1955,7 @@ function rawline2html(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='font-weight: bold;'>" + line + "</span>";
 | 
							line = "<span style='text-shadow: 1px 0 0;'>" + line + "</span>";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// bold and italics
 | 
						// bold and italics
 | 
				
			||||||
| 
						 | 
					@ -1964,7 +1964,7 @@ function rawline2html(line, index, options)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		temp = line.substring(2);
 | 
							temp = line.substring(2);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='font-weight: bold;'>**$1**</span>");
 | 
						temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='text-shadow: 1px 0 0;'>**$1**</span>");
 | 
				
			||||||
	temp = temp.replace(/\*([^\*]*)\*/g, "<em>*$1*</em>");
 | 
						temp = temp.replace(/\*([^\*]*)\*/g, "<em>*$1*</em>");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (line.startsWith("* "))
 | 
						if (line.startsWith("* "))
 | 
				
			||||||
| 
						 | 
					@ -1996,7 +1996,7 @@ function rawline2html(line, index, options)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			options.header = false;
 | 
								options.header = false;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		line = line || "<br>";
 | 
							line = line || emptyline;
 | 
				
			||||||
		line = "<span style='color:lightgrey'>" + line + "</span>";
 | 
							line = "<span style='color:lightgrey'>" + line + "</span>";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2090,8 +2090,8 @@ function rawline2html(line, index, options)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			line = line.replace(/(\(\w\))/g, "<span style='font-weight:bold; color:" + settings.accentcolor + "'>$1</span>");
 | 
								line = line.replace(/(\(\w\))/g, "<span style='text-shadow: 1px 0 0; color:" + settings.accentcolor + "'>$1</span>");
 | 
				
			||||||
			line = line.replace(/(@\w*)/g, "<b style='color:grey'>$1</b>");
 | 
								line = line.replace(/(@\w*)/g, "<span style='text-shadow: 1px 0 0; color:grey'>$1</span>");
 | 
				
			||||||
			line = line.replace(/(\s\+\w*)/g, "<span style='color:grey'>$1</span>");
 | 
								line = line.replace(/(\s\+\w*)/g, "<span style='color:grey'>$1</span>");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue