language_md: removed scale adjustment code that was needed because of a bug on scale plugin.
This commit is contained in:
parent
1fa1960b05
commit
c4f7380a95
|
@ -3,7 +3,6 @@ local syntax = require "core.syntax"
|
||||||
local style = require "core.style"
|
local style = require "core.style"
|
||||||
local core = require "core"
|
local core = require "core"
|
||||||
|
|
||||||
local initial_scale = SCALE
|
|
||||||
local initial_color = style.syntax["keyword2"]
|
local initial_color = style.syntax["keyword2"]
|
||||||
|
|
||||||
-- Add 3 type of font styles for use on markdown files
|
-- Add 3 type of font styles for use on markdown files
|
||||||
|
@ -203,20 +202,9 @@ syntax.add {
|
||||||
symbols = { },
|
symbols = { },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Adjust markdown fonts on scale changes.
|
-- Adjust the color on theme changes
|
||||||
-- Note: this should be performed by lite-xl it self to all style.syntax_fonts
|
|
||||||
core.add_thread(function()
|
core.add_thread(function()
|
||||||
while true do
|
while true do
|
||||||
if initial_scale ~= SCALE then
|
|
||||||
for _, attr in pairs({"bold", "italic", "bold_italic"}) do
|
|
||||||
style.syntax_fonts["markdown_"..attr] =
|
|
||||||
style.syntax_fonts["markdown_"..attr]:copy(
|
|
||||||
style.code_font:get_size()
|
|
||||||
)
|
|
||||||
end
|
|
||||||
initial_scale = SCALE
|
|
||||||
end
|
|
||||||
-- we also adjust the color on theme changes
|
|
||||||
if initial_color ~= style.syntax["keyword2"] then
|
if initial_color ~= style.syntax["keyword2"] then
|
||||||
for _, attr in pairs({"bold", "italic", "bold_italic"}) do
|
for _, attr in pairs({"bold", "italic", "bold_italic"}) do
|
||||||
style.syntax["markdown_"..attr] = style.syntax["keyword2"]
|
style.syntax["markdown_"..attr] = style.syntax["keyword2"]
|
||||||
|
|
Loading…
Reference in New Issue