notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Yaml syntax highlighting does not respect empty lines in blocks of text
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description of the Issue
Yaml syntax highlighting does not respect empty lines in blocks of text. An empty line is not considered to have lower indentation than the previous line, text blocks will continue across them.
Steps to Reproduce the Issue
Write yaml like this:
my_yaml_block: |
This block is text
even if the line above is empty
these two lines below should also be highlighted as text.
with row 2 empty
Expected Behavior
All lines above are highlighted as text
Actual Behavior
Rows 3 and 4 will be default-highlighted
Debug Information
Notepad++ v7.8.9 (64-bit)
Build time : Jul 15 2020 - 20:31:49
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1457
Current ANSI codepage : 1252
Plugins : GitSCM.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppXmlTreeviewPlugin.dll XMLTools.dll
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the YAML example in Notepad++ and trace the YAML syntax-highlighting implementation to how empty lines inside literal blocks are handled. Done means the blank line and following indented lines are highlighted as text, matching the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100