Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ep_align

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_align - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

41

index.js

@@ -13,35 +13,6 @@ var eejs = require('ep_etherpad-lite/node/eejs/');

function getInlineStyle(header) {
// TODO!
switch (header) {
case "h1":
return "font-size: 2.0em;line-height: 120%;";
break;
case "h2":
return "font-size: 1.5em;line-height: 120%;";
break;
case "h3":
return "font-size: 1.17em;line-height: 120%;";
break;
case "h4":
return "line-height: 120%;";
break;
case "h5":
return "font-size: 0.83em;line-height: 120%;";
break;
case "h6":
return "font-size: 0.75em;line-height: 120%;";
break;
case "code":
return "font-family: monospace";
}
return "";
}
// line, apool,attribLine,text
exports.getLineHTMLForExport = function (hook, context) {
var header = _analyzeLine(context.attribLine, context.apool);
if (header) {
var inlineStyle = getInlineStyle(header);
return "<" + header + " style=\"" + inlineStyle + "\">" + context.text.substring(1) + "</" + header + ">";
var align = _analyzeLine(context.attribLine, context.apool);
if (align) {
return '<div style="width:100%;margin:0 auto;list-style-position:inside;text-align:' + align + '">' + context.lineContent + '</div>';
}

@@ -51,3 +22,3 @@ }

function _analyzeLine(alineAttrs, apool) {
var header = null;
var align = null;
if (alineAttrs) {

@@ -57,6 +28,6 @@ var opIter = Changeset.opIterator(alineAttrs);

var op = opIter.next();
header = Changeset.opAttributeValue(op, 'align', apool);
align = Changeset.opAttributeValue(op, 'align', apool);
}
}
return header;
return align;
}

2

package.json
{
"description": "Add Left/Center/Right/Justify to lines of text in a pad",
"name": "ep_align",
"version": "0.0.10",
"version": "0.0.11",
"author": {

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

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