Skip to content

Commit

Permalink
Make <- less of a signal boost for R
Browse files Browse the repository at this point in the history
  • Loading branch information
klmr committed May 19, 2021
1 parent c4d7b81 commit bf1dc80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/languages/r.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,21 @@ export default function(hljs) {

// Operators/punctuation when they're not directly followed by numbers
{
// Avoid false detections of other languages.
scope: 'operator',
relevance: 0,
match: /<-/
},
{
// Relevance boost for the most common assignment form.
scope: { 3: 'operator' },
match: [
IDENT_RE,
/\s+/,
/<-/,
/\s+/
]
},
{
scope: 'operator',
variants: [
Expand Down

0 comments on commit bf1dc80

Please sign in to comment.