Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Imports file-extension to langauge mapping from both
// prismjs and lang-map and outputs a JSDON document that
// follows the vscode schema for extension mapping.
// PrismJS language definitions trump for my solution.
const fs = require('fs');
var map = require('lang-map');
var components = require('prismjs/components.js');
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{
// Imports file-extension to langauge mapping from both
// prismjs and lang-map and outputs a JSDON document that
// follows the vscode schema for extension mapping.
// PrismJS language definitions trump for my solution.
const fs = require('fs');
var map = require('lang-map');
var components = require('prismjs/components.js');
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{
langTemp.aliases.push(language.alias);
// args: ['value1', 'value2', 'value3']
// };
// PythonShell.run('my_script.py', options, function (err, results) {
// if (err)
// throw err;
// // Results is an array consisting of messages collected during execution
// console.log('results: %j', results);
// });
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{
langTemp.aliases.push(language.alias);
// scriptPath: 'C:\Python38\Lib\site-packages\pygments',
// args: ['value1', 'value2', 'value3']
// };
// PythonShell.run('my_script.py', options, function (err, results) {
// if (err)
// throw err;
// // Results is an array consisting of messages collected during execution
// console.log('results: %j', results);
// });
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{
// Imports file-extension to langauge mapping from both
// prismjs and lang-map and outputs a JSDON document that
// follows the vscode schema for extension mapping.
// PrismJS language definitions trump for my solution.
const fs = require('fs');
var map = require('lang-map');
var components = require('prismjs/components.js');
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{
langTemp.aliases.push(language.alias);
}
// Imports file-extension to langauge mapping from both
// prismjs and lang-map and outputs a JSDON document that
// follows the vscode schema for extension mapping.
// PrismJS language definitions trump for my solution.
const fs = require('fs');
var map = require('lang-map');
var components = require('prismjs/components.js');
// vscode files.associations is not an array. Use a dictionary instead.
var assocDict = {};
var languages = [];
for (var key in components.languages) {
if (components.languages.hasOwnProperty(key) && key != 'meta') {
var language = components.languages[key];
var langTemp = {
id : key
};
langTemp.aliases = [];
// vscode doesn't support title, but I want to use it
if (typeof language.title != 'undefined')
langTemp.title = language.title;
if (typeof language.alias != 'undefined'){
if (Array.isArray(language.alias)){
langTemp.aliases = language.alias;
}
else{