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

Use Abstract section for Abstract #60

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions scripts/md2html/md2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function preface(title,options) {
preface += `<h1 id="title">${title.split('|')[0]}</h1>`;
preface += `<p class="copyright">Copyright © ${options.publishDate.getFullYear()} the Linux Foundation</p>`;
preface += `<section class="notoc" id="abstract"><h2>${abstract}</h2>\n`;
preface += options.intro.join('\n');
preface += options.abstract.join('\n');
preface += '</section>';
preface += '<section class="override" id="sotd" data-max-toc="0">';
preface += '<h2>Status of This Document</h2>';
Expand Down Expand Up @@ -180,17 +180,23 @@ let inTOC = false;
let inDefs = false;
let inCodeBlock = false;
let indents = [0];
let inIntro = false;
argv.intro = [];
let inAbstract = false;
argv.abstract = [];

// process the markdown
for (let l in lines) {
let line = lines[l];

// extract Introduction section for abstract
if (line.startsWith('## Introduction')) inIntro = true;
else if (line.startsWith('#')) inIntro = false;
else if (inIntro) argv.intro.push(line);
// extract Abstract
if (line.startsWith('## Abstract')) {
inAbstract = true;
line = '';
}
else if (line.startsWith('#')) inAbstract = false;
else if (inAbstract) {
argv.abstract.push(line);
line = '';
}

// remove TOC from older spec versions, respec will generate a new one
if (line.startsWith('## Table of Contents')) inTOC = true;
Expand Down
4 changes: 4 additions & 0 deletions versions/1.0.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Overlay Specification

## Abstract

The Overlay specification defines a way of creating documents that contain information to be merged with an [[OpenAPI]] Description at some later point in time, for the purpose of updating the OpenAPI description with additional information.

## Version 1.0.0

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
Expand Down