markor icon indicating copy to clipboard operation
markor copied to clipboard

View-Mode: Fix line numbers layout error in long wrapping words

Open guanglinn opened this issue 1 month ago • 4 comments

Fix line numbers layout error for long wrapping words in view mode.

By the way,

Add Prism.js language highlighting for

  • Visual Basic
  • Visual Basic .NET
  • Visual Basic for Applications

#2697

guanglinn avatar Nov 28 '25 13:11 guanglinn

You can use visual-basic, vb, vba to mark the language for Markdown code blocks. For example,

```vb
' Visual Basic
Module Hello
    Sub Main()
        MsgBox("Hello, World!")
    End Sub
End Module
```

```vba
' Excel VBA (Visual Basic for Applications)
Sub SelectSheet()
    Sheets("Sheet1").Select
    Sheets("Sheet1").Activate
End Sub
```

guanglinn avatar Nov 28 '25 14:11 guanglinn

2025-11-28-prism-line-numbers-layout-error 2025-11-28-prism-line-numbers-layout-fixed

Left: line numbers display errors in long wrapping words. Right: fixed.

guanglinn avatar Nov 28 '25 16:11 guanglinn

Are there many prismjs (official) definitions not in Markor? I initially wanted to keep it slim and most important ones, but at this point seems like we have most of the available ones already.

gsantner avatar Nov 28 '25 16:11 gsantner

Yes, there are too many official supported languages. https://prismjs.com/download

I also think it may be already enough for the languages we have added. app/thirdparty/assets/prism/components

Fortunately, these files are very small, about 1.5KB per file.

guanglinn avatar Nov 28 '25 17:11 guanglinn