Skip to content

Commit

Permalink
util: python documentation sometimes starts with ". "
Browse files Browse the repository at this point in the history
In this case the pretty printing does not work as intended. To fix this
if this sequence is detected in the beginning of the line, just remove
it.

Signed-off-by: Filip Lobpreis <[email protected]>
  • Loading branch information
Filip Lobpreis committed Aug 30, 2024
1 parent f327f17 commit c2198bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/pretty_hover/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ function M.split(toSplit, separator)
end

for substring in toSplit:gmatch(separator) do
if substring:sub(1, 2) == ". " then
substring = substring:sub(5)
end
table.insert(chunks, substring)
end
return chunks
Expand Down

0 comments on commit c2198bd

Please sign in to comment.