Skip to content

Commit

Permalink
chore(parser) deprecate useBR option and add console warning
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Oct 6, 2020
1 parent 580bb71 commit 980832e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Language Improvements:
- enh(typescript) TypeScript also gains support for numeric separators (#2617) [Antoine du Hamel][]
- enh(php) Add support for PHP 8 `match` keyword and add `php8` as an alias (#2733) [Ayesh Karunaratne][]

Deprecations:

- `useBR` option deprecated and will be removed in v11.0. (#2559) [Josh Goebel][]

[David Pine]: https://github.com/IEvangelist
[Josh Goebel]: https://github.com/joshgoebel
[Ryan Jonasson]: https://github.com/ryanjonasson
Expand Down
4 changes: 4 additions & 0 deletions src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,10 @@ const HLJS = function(hljs) {
* @param {{}} userOptions
*/
function configure(userOptions) {
if (userOptions.useBR) {
console.warn("'useBR' option is deprecated and will be removed entirely in v11.0");
console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2559");
}
options = inherit(options, userOptions);
}

Expand Down

0 comments on commit 980832e

Please sign in to comment.