You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
513 B
JavaScript
23 lines
513 B
JavaScript
var all = require('./helpers').all;
|
|
|
|
function store(token, context) {
|
|
context.output.push(typeof token == 'string' ? token : token[0]);
|
|
}
|
|
|
|
function stringify(tokens, options, restoreCallback) {
|
|
var context = {
|
|
keepBreaks: options.keepBreaks,
|
|
output: [],
|
|
spaceAfterClosingBrace: options.compatibility.properties.spaceAfterClosingBrace,
|
|
store: store
|
|
};
|
|
|
|
all(tokens, context, false);
|
|
|
|
return {
|
|
styles: restoreCallback(context.output.join('')).trim()
|
|
};
|
|
}
|
|
|
|
module.exports = stringify;
|