Skip to content

Build script: no local biblio, use only Specref ids - #3992

Merged
lornajane merged 10 commits into
OAI:mainfrom
ralfhandl:no-local-biblio
Aug 15, 2024
Merged

Build script: no local biblio, use only Specref ids#3992
lornajane merged 10 commits into
OAI:mainfrom
ralfhandl:no-local-biblio

Conversation

@ralfhandl

@ralfhandlralfhandl commented Aug 2, 2024

Copy link
Copy Markdown
Contributor
  • no localBiblio
  • all external references use Specref IDs
  • JSON Reference added to normative references
  • Fix for "normally" indented ## Version x.y.z - no longer expect #### Version x.y.z
  • more and consistent comments
  • moved code blocks for headline processing next to each other
  • new green for headlines, and consistent headline formatting
  • initial set of unit tests

Note: this needs to be merged before we can publish the cleaned-up 3.0.4.md and 3.1.1.md

Example output:

@ralfhandl
ralfhandl requested review from a team as code ownersAugust 2, 2024 09:38
@ralfhandlralfhandl added Housekeeping javascript Pull requests that update Javascript code labels Aug 2, 2024
@ralfhandlralfhandl added the editorial Wording and stylistic issues label Aug 2, 2024
Comment threadscripts/md2html/md2html.js Outdated
@ralfhandl
ralfhandl requested a review from handrewsAugust 6, 2024 13:21
@lornajane

Copy link
Copy Markdown
Contributor

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
Comment on lines +110 to +112
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; }';

Copy link
Copy Markdown
ContributorAuthor

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.

Comment on lines -265 to -304
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;
}

Copy link
Copy Markdown
ContributorAuthor

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

@ralfhandl

Copy link
Copy Markdown
ContributorAuthor

@handrews Please tell me if I need to add comments or explain more

@lornajanelornajane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@lornajane
lornajane merged commit 0f0f3ee into OAI:mainAug 15, 2024
@ralfhandl
ralfhandl deleted the no-local-biblio branch August 15, 2024 17:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorialWording and stylistic issuesHousekeepingjavascriptPull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ralfhandl@lornajane@handrews@miqui