1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-27 18:20:24 +02:00

print CSS

This commit is contained in:
Pomax
2017-04-15 13:32:44 -07:00
parent 9b91c9fc2b
commit 30ca488d4a
16 changed files with 173 additions and 88 deletions

View File

@@ -105,7 +105,7 @@ function processLocation(loc, section, number) {
*/
function formContentBundle(locale, content) {
var bcode = JSON.stringify(content, false, 2);
bcode = bcode.replace(/"<section>/g, "function(handler) { return <section>")
bcode = bcode.replace(/"<section([^>]*)>/g, "function(handler) { return <section$1>")
.replace(/this\.(\w)/g, "handler.$1")
.replace(/<\/section>"(,?)/g, "</section>; }$1\n")
.replace(/\\"/g,'"')
@@ -197,7 +197,7 @@ function processLocale(locale) {
content[key] = {
locale: localeCode,
title: processed.title,
getContent: "<section>" + processed.data + "</section>"
getContent: `<section className="${key}">` + processed.data + "</section>"
};
};