Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Jun 27, 2020
1 parent 890244a commit 91e08b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Changed: `java`, `scala`, `cpp` annotation token changed to `k11`
* Changed: added token `k11` to themes
* Changed: moved generic highlighting rules to `lang/rulesets/generic`
* Changed: `ampersandCleanup` is performed after html escape sequences to eliminate issues related to double unquoting #109
* Bugfix: vhdl single bit highlighting collided with attribute syntax - thanks to [tyriun on GitHub](https://github.com/EnlighterJS/EnlighterJS/issues/106)
* Bugfix: css classnames/ids with hyphens were not recognized
* Bugfix: XML mixins of single/double quotes in attributes failed #108
Expand Down
2 changes: 1 addition & 1 deletion dist/enlighterjs.min.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/engine/sourcecode-extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ export function getRawCodeFromElement(element, options){
// apply input filter
//code = this.textFilter.filterInput(code);

// cleanup ampersand ?
if (options.ampersandCleanup === true) {
code = code.replace(/&/gim, '&');
}

// replace html escaped chars
code = code .replace(/&lt;/gim, '<')
.replace(/&gt;/gim, '>')
.replace(/&nbsp;/gim, ' ');

// cleanup ampersand ?
// run cleanup after regular html escape sequences
if (options.ampersandCleanup === true) {
code = code.replace(/&amp;/gim, '&');
}

// get indent option value
const newIndent = options.indent;

Expand Down

0 comments on commit 91e08b6

Please sign in to comment.