Ticket #3641: mc-3641-mcedit-syntax-associate-node-executables-with-JavaScript.patch

File mc-3641-mcedit-syntax-associate-node-executables-with-JavaScript.patch, 798 bytes (added by mooffie, 8 years ago)
  • misc/syntax/Syntax.in

    From 2d306130342ed87a470b1319c5d5396d682d56ca Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Thu, 14 Jul 2016 06:35:59 +0300
    Subject: [PATCH] mcedit: syntax: associate node executables with JavaScript
     syntax.
    
    Some distros name the binary 'nodejs', some 'node'.
    ---
     misc/syntax/Syntax.in | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/misc/syntax/Syntax.in b/misc/syntax/Syntax.in
    index e970c3e..35a61e4 100644
    a b include properties.syntax 
    124124file ..\*\\.(cs|CS)$ C\#\sProgram 
    125125include cs.syntax 
    126126 
    127 file ..\*\\.(js|JS)$ JavaScript\sProgram 
     127file ..\*\\.(js|JS)$ JavaScript\sProgram ^#!.\*[\s/](node|nodejs)\\b 
    128128include js.syntax 
    129129 
    130130file ..\*\\.(as|AS)$ ActionScript\sProgram