Make how-heavy-is-bold configurable

This commit is contained in:
Roberto Alsina 2024-08-12 10:55:58 -03:00
parent 78ddc69937
commit 46d6d3f467

View File

@ -15,6 +15,7 @@ module Tartrazine
property? standalone : Bool = false
property? surrounding_pre : Bool = true
property? wrap_long_lines : Bool = false
property? weight_of_bold : Int32 = 600
def format(text : String, lexer : Lexer, theme : Theme) : String
text = format_text(text, lexer, theme)
@ -72,7 +73,7 @@ module Tartrazine
# These are true/false/nil
outp << "border: none;" if style.border == false
outp << "font-weight: bold;" if style.bold
outp << "font-weight: 400;" if style.bold == false
outp << "font-weight: #{weight_of_bold};" if style.bold == false
outp << "font-style: italic;" if style.italic
outp << "font-style: normal;" if style.italic == false
outp << "text-decoration: underline;" if style.underline