Skip to content

Commit

Permalink
chore: Removed unused property from __latex.inlines
Browse files Browse the repository at this point in the history
Ref: #177
  • Loading branch information
OXY2DEV committed Jan 10, 2025
1 parent 554fafc commit ee7c33e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/markview/parsers/latex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,18 @@ latex.block = function (buffer, _, text, range)
---+${lua}

local from, to = vim.api.nvim_buf_get_lines(buffer, range.row_start, range.row_start + 1, false)[1]:sub(0, range.col_start), vim.api.nvim_buf_get_lines(buffer, range.row_end, range.row_end + 1, true)[1]:sub(0, range.col_end);
local inline, closed = false, true;
local inline = false;

if from:match("^(%s*)$") == nil or to:match("^(%s*)%$%$$") == nil then
inline = true;
elseif text[1]:match("%$%$$") == nil then
inline = true;
end

if text[#text]:match("%$%$$") == nil then
closed = false;
end

---@class __latex.blocks
latex.insert({
class = inline == true and "latex_inline" or "latex_block",
marker = inline == true and "$$" or nil,
closed = closed,

text = text,
range = range
Expand Down

0 comments on commit ee7c33e

Please sign in to comment.