Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ module.exports = {
// for now ignore diff between types of quoting
quotes: "off",
// this is the style we are already using
"operator-linebreak": ["error", "before", { overrides: { "=": "after", "?": "after", ":": "after", "+": "after" } }],
"operator-linebreak": ["error", "before", { overrides: {
"=": "after",
"+": "after"
}
}],
// sometimes we declare variables with extra spacing
indent: ["error", 2, { VariableDeclarator: 2 }],
// seems like a good idea not to use explicit undefined
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ New Languages:

Language grammar improvements:

- env(perl) Much improved regex detection (#2960) [Josh Goebel][]
- enh(swift) Improved highlighting for operator and precedencegroup declarations. (#2938) [Steven Van Impe][]
- fix(xml) Support single-character namespaces. (#2957) [Jan Pilzer][]

Expand Down
6 changes: 3 additions & 3 deletions src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ const HLJS = function(hljs) {

// a before plugin can usurp the result completely by providing it's own
// in which case we don't even need to call highlight
const result = context.result ?
context.result :
_highlight(context.language, context.code, ignoreIllegals, continuation);
const result = context.result
? context.result
: _highlight(context.language, context.code, ignoreIllegals, continuation);

result.code = context.code;
// the plugin can change anything in result to suite it
Expand Down
Loading