-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build script: no local biblio, use only Specref ids #3992
Conversation
We agreed that we need a bit more context in the code comment about why this section is special. |
* better green for headlines * consistent headline styles * JSON Reference as normative reference
preface += '#title { color: #578000; } #subtitle { color: #578000; }'; | ||
preface += '.dt-published { color: #578000; } .dt-published::before { content: "Published "; }'; | ||
preface += 'h1,h2,h3,h4,h5,h6 { color: #578000; font-weight: normal; font-style: normal; }'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the new green: all headlines now use the same color, font-weight, and font-style and differ only in font-size.
if (!inCodeBlock && line.startsWith('#')) { | ||
let indent = 0; | ||
while (line[indent] === '#') indent++; | ||
let originalIndent = indent; | ||
|
||
let prevIndent = indents[indents.length-1]; // peek | ||
let delta = indent-prevIndent; | ||
|
||
if (!argv.respec) { | ||
if (delta===0) indent = lastIndent | ||
else if (delta<0) indent = lastIndent-1 | ||
else if (delta>0) indent = lastIndent+1; | ||
} | ||
|
||
if (indent < 0) { | ||
indent = 1; | ||
} | ||
if (argv.respec && (indent > 1)) { | ||
indent--; | ||
} | ||
let newIndent = indent; | ||
if (!argv.respec && (indent <= 2) && bsFix) { | ||
newIndent++; | ||
} | ||
|
||
let title = line.split('# ')[1]; | ||
if (inDefs) title = '<dfn>'+title+'</dfn>'; | ||
line = ('#'.repeat(newIndent)+' '+title); | ||
|
||
if (delta>0) indents.push(originalIndent); | ||
if (delta<0) { | ||
let d = Math.abs(delta); | ||
while (d>0) { | ||
indents.pop(); | ||
d--; | ||
} | ||
} | ||
lastIndent = indent; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved unchanged down next to the other code block for headline processing
@handrews Please tell me if I need to add comments or explain more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
localBiblio
## Version x.y.z
- no longer expect#### Version x.y.z
Note: this needs to be merged before we can publish the cleaned-up 3.0.4.md and 3.1.1.md
Example output: