Skip to content

Commit dbf74b6

Browse files
authored
[Fix] Fix rendering for non-braced LaTeX subscripts and superscipts (#499)
1 parent 8b82823 commit dbf74b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/markview/renderers/latex.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ latex.subscript = function (buffer, item)
449449
end_col = range.col_end,
450450
conceal = "",
451451
});
452-
elseif symbols.subscripts[item.text[1]:sub(3)] then
452+
elseif symbols.subscripts[item.text[1]:sub(2)] then
453453
if item.preview then
454454
table.insert(latex.cache.style_regions.subscripts, item);
455455
end
@@ -566,7 +566,7 @@ latex.superscript = function (buffer, item)
566566
end_col = range.col_end,
567567
conceal = "",
568568
});
569-
elseif symbols.superscripts[item.text[1]:sub(3)] then
569+
elseif symbols.superscripts[item.text[1]:sub(2)] then
570570
if item.preview then
571571
table.insert(latex.cache.style_regions.superscripts, item);
572572
end

0 commit comments

Comments
 (0)