Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code blocks in doc comments stripped of leading dashes and indentation

LoganDark opened this issue · comments

Environment

Name Version
IDEA version IntelliJ IDEA Ultimate 2021.2.3
Luanalysis version 1.3.0
OS Windows 10 2004 build 19041.928 x86_64

Preferences

image

Lua

Name Setting
Language level Lua 5.3

Type Safety

Name Setting
Strict nil checks
Unknown type (any) is indexable ☑️
Unknown type (any) is callabale ☑️

What are the steps to reproduce this issue?

  1. Make a doc comment like so

    --- ```lua
    --- -- this is a comment!
    --- 
    --- local x = 5
    --- 
    --- do
    --- 	print('Hello, World!')
    --- end
    --- ```
    local x = 5
  2. view the in-IDE documentation

  3. cursed

What happens?

The documentation becomes this:

this is a comment!

local x = 5

do
print('Hello, World!')
end
  • The leading dashes are stripped from the comment
  • All indentation is stripped
  • Also there's no syntax highlighting

image:

image

What were you expecting to happen?

code to be preserved and syntax highlighted as written

Any logs, error output, etc?

Nope

Any other comments?

Nope