Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin
Apache License 2.0
155 stars 22 forks source link

Code blocks in doc comments stripped of leading dashes and indentation #121

Open LoganDark opened 2 years ago

LoganDark commented 2 years ago

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

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