New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ep_font_color

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_font_color - npm Package Compare versions

Comparing version 0.0.7 to 0.0.9

locales/fr.json

2

package.json
{
"description": "Apply colors to fonts",
"name": "ep_font_color",
"version": "0.0.7",
"version": "0.0.9",
"author": {

@@ -6,0 +6,0 @@ "name": "John McLear",

@@ -33,13 +33,17 @@ var _, $, jQuery;

function aceAttribsToClasses(hook, context){
if(context.key == 'colors'){
return ['colors:' + context.value ];
if(context.key.indexOf("color:") !== -1){
var color = /(?:^| )color:([A-Za-z0-9]*)/.exec(context.key);
return ['color:' + color[1] ];
}
if(context.key == 'color'){
return ['color:' + context.value ];
}
}
// Here we convert the class colors:h1 into a tag
// Here we convert the class color:red into a tag
exports.aceCreateDomLine = function(name, context){
var cls = context.cls;
var domline = context.domline;
var colorsType = /(?:^| )colors:([A-Za-z0-9]*)/.exec(cls);
var colorsType = /(?:^| )color:([A-Za-z0-9]*)/.exec(cls);

@@ -76,7 +80,7 @@ var tagIndex;

documentAttributeManager.setAttributesOnRange(rep.selStart, rep.selEnd, [
['colors', colors[level]]
['color', colors[level]]
]);
}else{
documentAttributeManager.setAttributesOnRange(rep.selStart, rep.selEnd, [
['colors', '']
['color', '']
]);

@@ -83,0 +87,0 @@ }

@@ -6,9 +6,5 @@ var _ = require('ep_etherpad-lite/static/js/underscore');

var collectContentPre = function(hook, context){
var tname = context.tname;
var state = context.state;
var lineAttributes = state.lineAttributes
var tagIndex = _.indexOf(colors, tname);
if(tagIndex >= 0){
lineAttributes['color'] = colors[tagIndex];
var color = /(?:^| )color:([A-Za-z0-9]*)/.exec(context.cls);
if(color && color[1]){
context.cc.doAttrib(context.state, color[0]);
}

@@ -18,2 +14,3 @@ };

var collectContentPost = function(hook, context){
/*
var tname = context.tname;

@@ -27,2 +24,3 @@ var state = context.state;

}
*/
};

@@ -29,0 +27,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc