Skip to content

Commit

Permalink
(chore) remove HTML auto-merging
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Mar 17, 2021
1 parent aa5a3e7 commit 76164aa
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 205 deletions.
5 changes: 4 additions & 1 deletion VERSION_11_UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- remove apache, http, nginx, properties, coffeescript from :common #2848

### Feature Removal

- HTML merging is now no longer included in core. You'll want to use a plugin instead. https://github.com/highlightjs/highlight.js/issues/2889
- fixMarkup is gone now, provide your own replacement #2534

### Behavior changes

Expand All @@ -26,7 +30,6 @@
## API's changed

- rename second_best to secondBest (highlightAuto)
- fixMarkup is gone now, provide your own replacement #2534
- highlightElement/highlightBlock result now no longer returns `re` key, use `relevance` instead
- `CSS_NUMBER_MODE` has now been moved into the internal `css-shared` library

Expand Down
3 changes: 0 additions & 3 deletions src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import * as MODES from './lib/modes.js';
import { compileLanguage } from './lib/mode_compiler.js';
import * as packageJSON from '../package.json';
import { BuildVuePlugin } from "./plugins/vue.js";
import { mergeHTMLPlugin } from "./plugins/merge_html.js";
import * as logger from "./lib/logger.js";

const escape = utils.escapeHTML;
Expand Down Expand Up @@ -918,8 +917,6 @@ const HLJS = function(hljs) {
// merge all the modes/regexs into our main object
Object.assign(hljs, MODES);

// built-in plugins, likely to be moved out of core in the future
hljs.addPlugin(mergeHTMLPlugin);
return hljs;
};

Expand Down
156 changes: 0 additions & 156 deletions src/plugins/merge_html.js

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/expect/brInPre.txt

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/expect/custommarkup.txt

This file was deleted.

14 changes: 0 additions & 14 deletions test/fixtures/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@

</div>

<div id="custom-markup">

<!-- custom markup -->
<pre><code class="html">&lt;<a href="http://dev.w3.org/html5/spec/Overview.html#the-div-element">div</a> id="contents"&gt;
<del>&lt;p&gt;Hello, World!</del><!-- A comment should not break merging --><ins>Goodbye, cruel world!</ins>
&lt;/div&gt;
</code></pre>

<!-- <br> inside of <pre>s -->
<pre><code class="language-javascript">&gt;&gt; '\x41\x42\x43'<br>'ABC'<br><hr><br>&gt;&gt; '\x61\x62\x63'<br>'abc'
</code></pre>

</div>

<div id="language-alias">

<!-- language alias -->
Expand Down
26 changes: 0 additions & 26 deletions test/special/customMarkup.js

This file was deleted.

1 change: 0 additions & 1 deletion test/special/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describe('special cases tests', () => {
});

require('./explicitLanguage');
require('./customMarkup');
require('./languageAlias');
require('./noHighlight');
require('./subLanguages');
Expand Down

0 comments on commit 76164aa

Please sign in to comment.