Skip to content

Commit cb8f3fc

Browse files
authored
Merge pull request #60 from ralfhandl/1.0.0-abstract
Use Abstract section for Abstract
2 parents 0e3fc04 + fce71f7 commit cb8f3fc

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

scripts/md2html/md2html.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function preface(title,options) {
117117
preface += `<h1 id="title">${title.split('|')[0]}</h1>`;
118118
preface += `<p class="copyright">Copyright © ${options.publishDate.getFullYear()} the Linux Foundation</p>`;
119119
preface += `<section class="notoc" id="abstract"><h2>${abstract}</h2>\n`;
120-
preface += options.intro.join('\n');
120+
preface += options.abstract.join('\n');
121121
preface += '</section>';
122122
preface += '<section class="override" id="sotd" data-max-toc="0">';
123123
preface += '<h2>Status of This Document</h2>';
@@ -180,17 +180,23 @@ let inTOC = false;
180180
let inDefs = false;
181181
let inCodeBlock = false;
182182
let indents = [0];
183-
let inIntro = false;
184-
argv.intro = [];
183+
let inAbstract = false;
184+
argv.abstract = [];
185185

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

190-
// extract Introduction section for abstract
191-
if (line.startsWith('## Introduction')) inIntro = true;
192-
else if (line.startsWith('#')) inIntro = false;
193-
else if (inIntro) argv.intro.push(line);
190+
// extract Abstract
191+
if (line.startsWith('## Abstract')) {
192+
inAbstract = true;
193+
line = '';
194+
}
195+
else if (line.startsWith('#')) inAbstract = false;
196+
else if (inAbstract) {
197+
argv.abstract.push(line);
198+
line = '';
199+
}
194200

195201
// remove TOC from older spec versions, respec will generate a new one
196202
if (line.startsWith('## Table of Contents')) inTOC = true;

versions/1.0.0.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Overlay Specification
22

3+
## Abstract
4+
5+
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.
6+
37
## Version 1.0.0
48

59
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.

0 commit comments

Comments
 (0)