We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<-
1 parent c4d7b81 commit bf1dc80Copy full SHA for bf1dc80
src/languages/r.js
@@ -202,9 +202,21 @@ export default function(hljs) {
202
203
// Operators/punctuation when they're not directly followed by numbers
204
{
205
+ // Avoid false detections of other languages.
206
scope: 'operator',
207
+ relevance: 0,
208
match: /<-/
209
},
210
+ {
211
+ // Relevance boost for the most common assignment form.
212
+ scope: { 3: 'operator' },
213
+ match: [
214
+ IDENT_RE,
215
+ /\s+/,
216
+ /<-/,
217
+ /\s+/
218
+ ]
219
+ },
220
221
222
variants: [
0 commit comments