Skip to content

Commit

Permalink
refactor: simplefiy joining class attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamEderzeel committed Aug 15, 2024
1 parent 2231893 commit 8f0b2a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/node/markdown/plugins/preWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export function preWrapperPlugin(md: MarkdownIt, options: Options) {
if (classAttr != null) {
classAttr[1] = `${classes} ${classAttr[1]}`
} else {
const attrs: Array<[string, string]> = [['class', classes]]

token.attrs = token.attrs ? token.attrs.concat(attrs) : attrs
token.attrJoin('class', classes)
}

const rawCode = fence(...args)
Expand Down

0 comments on commit 8f0b2a0

Please sign in to comment.