Skip to content

Commit 621ba9d

Browse files
committed
chore(parser) deprecate fixMarkup and add console warning
1 parent be8348c commit 621ba9d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ New themes:
88

99
- *Gradient Light* by [Samia Ali]()
1010

11+
Deprecations:
12+
13+
- `fixMarkup` is now deprecated and will be removed in v11.0. (#2534) [Josh Goebel][]
14+
1115
Big picture:
1216

1317
- Add simple Vue plugin for basic use cases (#2544) [Josh Goebel][]

src/highlight.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,12 +848,19 @@ const HLJS = function(hljs) {
848848
});
849849
}
850850

851-
/* Interface definition */
851+
/* fixMarkup is deprecated and will be removed entirely in v11 */
852+
function deprecate_fixMarkup(arg) {
853+
console.warn("fixMarkup is deprecated and will be removed entirely in v11.0")
854+
console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534")
855+
856+
return fixMarkup(arg)
857+
}
852858

859+
/* Interface definition */
853860
Object.assign(hljs, {
854861
highlight,
855862
highlightAuto,
856-
fixMarkup,
863+
fixMarkup: deprecate_fixMarkup,
857864
highlightBlock,
858865
configure,
859866
initHighlighting,

0 commit comments

Comments
 (0)