LuaLS / LuaLS/lua-language-server
Irritating Markdown syntax for headings conflicts with traditional comment frames in Lua
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations
Expected Behaviour
"Hello World!" in the following annotation is NOT treated as a heading:
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Actual Behaviour
"Hello World!" shows as a heading in the documentation pop-up window like so.
Reproduction steps
Type the following code and hover your mouse over the function name.
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Additional Notes
As someone who likes to frame documentation comments, I find this issue unbearable. The reason we should except Markdown's dash ---- syntax for headings in LuaCATS is because Lua uses dashes to delimit the comments themselves. And those who frame comments also use the same character (dash) for the rest of the frame. You wouldn't use another character for the frame, it would look ugly and not uniform. For example, in C, Markdown's heading syntax does not conflict with the comment delimiter (//). So you can frame your comments by repeating the comment delimiter itself for a uniform frame.
Log File
Log files have no use in this issue.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduzieren Sie das Problem in der Visual Studio Code-Erweiterung, indem Sie mit dem Mauszeiger über die Funktion in der im Bericht gezeigten eingerahmten Lua-Annotation fahren. Ermitteln Sie zunächst die Verarbeitung von Markdown-Überschriften in LuaCATS, die für die Dokumentation von Annotationen verwendet wird, und überprüfen Sie anschließend, dass der eingerahmte Text „Hello World!“ nicht mehr als Überschrift gerendert wird, während gewöhnliche Markdown-Überschriften weiterhin funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- documentation
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100