Skip to content
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

Merged
merged 10 commits into from
Aug 15, 2024

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Aug 2, 2024

  • 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 owners August 2, 2024 09:38
@ralfhandl ralfhandl added Housekeeping javascript Pull requests that update Javascript code labels Aug 2, 2024
@ralfhandl ralfhandl added the editorial Wording and stylistic issues label Aug 2, 2024
scripts/md2html/md2html.js Outdated Show resolved Hide resolved
@ralfhandl ralfhandl requested a review from handrews August 6, 2024 13:21
@lornajane
Copy link
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
Contributor Author

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
Contributor Author

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
Contributor Author

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

Copy link
Contributor

@lornajane lornajane left a comment

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:main Aug 15, 2024
2 checks passed
@ralfhandl ralfhandl deleted the no-local-biblio branch August 15, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Wording and stylistic issues Housekeeping javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants