mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-27 02:05:34 +02:00
finally fixed the sub/sup thing
This commit is contained in:
@@ -79,6 +79,9 @@ function processLocation(loc, section, number) {
|
||||
.replace(/'/g, "'")
|
||||
.replace(/"/g, '"')
|
||||
|
||||
// compensate for <sub> and <sup> getting safified:
|
||||
d = d.replace(/<(\/?)su([bp])>/g, "<$1su$2>");
|
||||
|
||||
// ``` conversion does odd things with <code> tags inside <pre> tags.
|
||||
d = d.replace(/<pre>(\r?\n)*<code>/g,'<pre>')
|
||||
.replace(/<\/code>(\r?\n)*<\/pre>/g,'</pre>');
|
||||
@@ -174,7 +177,12 @@ function writeContentBundle(locale, content) {
|
||||
|
||||
// Write the actual locale directory and generate a locale-specific index.html
|
||||
var html = fs.readFileSync('./index.template.html').toString();
|
||||
var preface = content.preface.getContent.replace(/<SectionHeader name="preface" title="([^"]+)"\/>/, "<h2>$1</h2>");
|
||||
|
||||
var preface = "";
|
||||
if (content.preface) {
|
||||
preface = content.preface.getContent.replace(/<SectionHeader name="preface" title="([^"]+)"\/>/, "<h2>$1</h2>");
|
||||
}
|
||||
|
||||
html = html.replace("<!doctype html>", "<!-- AUTOGENERATED CONTENT, PLEASE EDIT 'index.template.html' INSTEAD! -->\n<!doctype html>");
|
||||
html = html.replace("{{ PREFACE }}", preface);
|
||||
html = html.replace("{{ locale }}", locale);
|
||||
|
Reference in New Issue
Block a user