Skip to content

Commit

Permalink
Migrate autocomplete-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Oct 19, 2023
1 parent 06334cb commit c20005b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 6 additions & 10 deletions packages/autocomplete-plus/lib/suggestion-list-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const {CompositeDisposable} = require('atom')
const SnippetParser = require('./snippet-parser')
const {isString} = require('./type-helpers')
const fuzzaldrinPlus = require('fuzzaldrin-plus')
const {marked} = require('marked')
const createDOMPurify = require('dompurify')

const createSuggestionFrag = () => {
const frag = document.createDocumentFragment()
Expand Down Expand Up @@ -137,15 +135,13 @@ module.exports = class SuggestionListElement {

if (item.descriptionMarkdown && item.descriptionMarkdown.length > 0) {
this.descriptionContainer.style.display = 'block'
this.descriptionContent.innerHTML = createDOMPurify().sanitize(
marked(item.descriptionMarkdown, {
gfm: true,
this.descriptionContent.innerHTML = atom.ui.markdown.render(
item.descriptionMarkdown,
{
breaks: true,
sanitize: false,
mangle: false,
headerIds: false
})
)
renderMode: "fragment"
}
);
this.setDescriptionMoreLink(item)
} else if (item.description && item.description.length > 0) {
this.descriptionContainer.style.display = 'block'
Expand Down
2 changes: 0 additions & 2 deletions packages/autocomplete-plus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
},
"dependencies": {
"atom-slick": "^2.0.0",
"dompurify": "^3.0.4",
"fuzzaldrin": "^2.1.0",
"fuzzaldrin-plus": "^0.6.0",
"grim": "^2.0.1",
"marked": "^5.1.1",
"minimatch": "^3.0.3",
"selector-kit": "^0.1.0",
"stable": "^0.1.8",
Expand Down

0 comments on commit c20005b

Please sign in to comment.