Generating pad HTML with tags like <span data-TAG="VALUE"> instead of <TAG:VALUE>

This commit is contained in:
Luiza Pagliari 2015-09-07 03:55:56 -07:00
parent 1a5985dc75
commit ed5262650a
2 changed files with 3 additions and 3 deletions

View file

@ -81,10 +81,10 @@ function getHTMLFromAtext(pad, atext, authorColors)
hooks.aCallAll("exportHtmlAdditionalTags", pad, function(err, newProps){
// newProps can be simply a string (which means it is stored as attribute in the form of ['tag', 'true'])
// or it can be a pair of values in an Array (for the case when it is stored as ['tag', 'value']).
// The later scenario will generate HTML with tags like <tag:value>
// The later scenario will generate HTML with tags like <span data-tag="value">
newProps.forEach(function (propName, i){
if (_.isArray(propName)) {
tags.push(propName[0] + ":" + propName[1]);
tags.push('span data-' + propName[0] + '="' + propName[1] + '"');
} else {
tags.push(propName);
}