mobiledoc-dom-renderer
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -1048,9 +1048,11 @@ define('mobiledoc-dom-renderer/cards/image', ['exports', 'mobiledoc-dom-renderer/utils/render-type'], function (exports, _mobiledocDomRendererUtilsRenderType) { | ||
exports.normalizeTagName = normalizeTagName; | ||
function addHTMLSpaces(text) { | ||
var nbsp = ' '; | ||
return text.replace(/ /g, ' ' + nbsp); | ||
var NBSP = ' '; | ||
var EMSP = ' '; | ||
function prepareText(text) { | ||
return text.replace(/ /g, ' ' + NBSP).replace(/\t/g, EMSP); | ||
} | ||
function createTextNode(dom, text) { | ||
return dom.createTextNode(addHTMLSpaces(text)); | ||
return dom.createTextNode(prepareText(text)); | ||
} | ||
@@ -1057,0 +1059,0 @@ |
@@ -5,9 +5,11 @@ 'use strict'; | ||
exports.normalizeTagName = normalizeTagName; | ||
function addHTMLSpaces(text) { | ||
var nbsp = ' '; | ||
return text.replace(/ /g, ' ' + nbsp); | ||
var NBSP = ' '; | ||
var EMSP = ' '; | ||
function prepareText(text) { | ||
return text.replace(/ /g, ' ' + NBSP).replace(/\t/g, EMSP); | ||
} | ||
function createTextNode(dom, text) { | ||
return dom.createTextNode(addHTMLSpaces(text)); | ||
return dom.createTextNode(prepareText(text)); | ||
} | ||
@@ -14,0 +16,0 @@ |
@@ -1268,9 +1268,11 @@ ;(function() { | ||
exports.normalizeTagName = normalizeTagName; | ||
function addHTMLSpaces(text) { | ||
var nbsp = ' '; | ||
return text.replace(/ /g, ' ' + nbsp); | ||
var NBSP = ' '; | ||
var EMSP = ' '; | ||
function prepareText(text) { | ||
return text.replace(/ /g, ' ' + NBSP).replace(/\t/g, EMSP); | ||
} | ||
function createTextNode(dom, text) { | ||
return dom.createTextNode(addHTMLSpaces(text)); | ||
return dom.createTextNode(prepareText(text)); | ||
} | ||
@@ -1277,0 +1279,0 @@ |
@@ -1,8 +0,10 @@ | ||
function addHTMLSpaces(text) { | ||
let nbsp = '\u00A0'; | ||
return text.replace(/ /g, ' ' + nbsp); | ||
const NBSP = '\u00A0'; | ||
const EMSP = '\u2003'; | ||
function prepareText(text) { | ||
return text.replace(/ /g, ' ' + NBSP).replace(/\t/g, EMSP); | ||
} | ||
export function createTextNode(dom, text) { | ||
return dom.createTextNode(addHTMLSpaces(text)); | ||
return dom.createTextNode(prepareText(text)); | ||
} | ||
@@ -9,0 +11,0 @@ |
{ | ||
"name": "mobiledoc-dom-renderer", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Renders Mobiledoc input to DOM output", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
## Mobiledoc DOM Renderer [![Build Status](https://travis-ci.org/bustlelabs/mobiledoc-dom-renderer.svg?branch=master)](https://travis-ci.org/bustlelabs/mobiledoc-dom-renderer) | ||
## Mobiledoc DOM Renderer | ||
@@ -3,0 +3,0 @@ This is a DOM renderer for the [Mobiledoc format](https://github.com/bustlelabs/mobiledoc-kit/blob/master/MOBILEDOC.md) used |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10187
489400
39