Repository: sublimelsp/LSP

Issue:
Shows plain HTML in code action annotation
**Describe the bug**

I saw code action annotations showing plain HTML.




**Screenshots**

![Screenshot 2023-05-04 at 08 06 04](https://user-images.githubusercontent.com/153197/236124424-bf412bf9-2fa5-4f25-a971-d0d58503baeb.png)

**Environment (please complete the following information):**
- OS: macOS
- Sublime Text version: 4149
- LSP version: 0d149265408824b73184709619af4497d9044650
- Language servers used: LSP-ruff

Code action response:

```
[
  {
    "diagnostics": [],
    "data": "file:///usr/local/workspace/sublime-packages/LSP-ruff/plugin.py",
    "kind": "source.organizeImports",
    "title": "Ruff: Organize Imports"
  },
  {
    "diagnostics": [],
    "data": "file:///usr/local/workspace/sublime-packages/LSP-ruff/plugin.py",
    "kind": "source.fixAll",
    "title": "Ruff: Fix All"
  },
  {
    "edit": {
      "documentChanges": [
        {
          "textDocument": {
            "uri": "file:///usr/local/workspace/sublime-packages/LSP-ruff/plugin.py",
            "version": 0
          },
          "edits": [
            {
              "newText": "    requirements_txt_path =                                                                                    \"requirements.txt\"  # noqa: E501",
              "range": {
                "end": {
                  "character": 129,
                  "line": 5
                },
                "start": {
                  "character": 0,
                  "line": 5
                }
              }
            }
          ]
        }
      ]
    },
    "diagnostics": [
      {
        "severity": 2,
        "message": "Line too long (129 > 120 characters)",
        "data": {
          "fix": null,
          "noqa_row": 6
        },
        "source": "Ruff",
        "range": {
          "end": {
            "character": 129,
            "line": 5
          },
          "start": {
            "character": 120,
            "line": 5
          }
        },
        "code": "E501"
      }
    ],
    "data": "file:///usr/local/workspace/sublime-packages/LSP-ruff/plugin.py",
    "kind": "quickfix",
    "title": "Ruff: Disable E501 for this line"
  }
]
```


Discussion:

Resolving patch:
diff --git a/plugin/documents.py b/plugin/documents.py
--- a/plugin/documents.py
+++ b/plugin/documents.py
@@ -53,7 +53,6 @@
 import itertools
 import sublime
 import sublime_plugin
-import textwrap
 import weakref
 import webbrowser
 
@@ -653,10 +652,7 @@ def _on_code_actions(self, responses: List[CodeActionsByConfigName]) -> None:
             icon = 'Packages/LSP/icons/lightbulb.png'
             self._lightbulb_line = self.view.rowcol(regions[0].begin())[0]
         else:  # 'annotation'
-            if action_count > 1:
-                title = '{} code actions'.format(action_count)
-            else:
-                title = "<br>".join(textwrap.wrap(first_action_title, width=30))
+            title = '{} code actions'.format(action_count) if action_count > 1 else first_action_title
             code_actions_link = make_link('code-actions:', title)
             annotations = ["<div class=\"actions\" style=\"font-family:system\">{}</div>".format(code_actions_link)]
             annotation_color = self.view.style_for_scope("region.bluish markup.accent.codeaction.lsp")["foreground"]


Test patch: