diff --git a/scripts/md2html/md2html.js b/scripts/md2html/md2html.js index 40d4230800..34ca8ae4ef 100644 --- a/scripts/md2html/md2html.js +++ b/scripts/md2html/md2html.js @@ -5,8 +5,8 @@ complete control over formatting and syntax highlighting */ 'use strict'; /** -@author Mike Ralphson -**/ + * @author Mike Ralphson + **/ const fs = require('fs'); const path = require('path'); @@ -34,7 +34,7 @@ const md = require('markdown-it')({ linkify: true, typographer: true, highlight: function (str, lang) { - if (lang && hljs.getLanguage(lang)) { // && !argv.respec) { + if (lang && hljs.getLanguage(lang)) { try { return '
' +
                   hljs.highlight(str, { language: lang }).value +
@@ -86,56 +86,9 @@ function preface(title,options) {
                 ],
             },
         ],
-        localBiblio: {
-            "OpenAPI-Learn": {
-                title: "OpenAPI - Getting started, and the specification explained",
-                href: "https://learn.openapis.org/",
-                publisher: "OpenAPI Initiative"
-            },
-            "OpenAPI-Registry": {
-                title: "OpenAPI Initiative Registry",
-                href: "https://spec.openapis.org/registry/index.html",
-                publisher: "OpenAPI Initiative"
-            },
-            //TODO: remove localBiblio once Specref PRs https://github.com/tobie/specref/pulls/ralfhandl are merged
-            "JSON-Schema-Validation-04": {
-                authors: [ "Kris Zyp", "Francis Galiegue", "Gary Court" ],
-                href: "https://datatracker.ietf.org/doc/html/draft-fge-json-schema-validation-00",
-                publisher: "Internet Engineering Task Force (IETF)",
-                status: "Internet-Draft",
-                title: "JSON Schema: interactive and non interactive validation. Draft 4",
-                date: "1 February 2013"
-            },
-            "JSON-Schema-05": {
-                authors: [ "Austin Wright" ],
-                href: "https://datatracker.ietf.org/doc/html/draft-wright-json-schema-00",
-                publisher: "Internet Engineering Task Force (IETF)",
-                status: "Internet-Draft",
-                title: "JSON Schema: A Media Type for Describing JSON Documents. Draft 5",
-                date: "13 October 2016"
-            },
-            "JSON-Schema-Validation-05": {
-                authors: [ "Austin Wright", "G. Luff" ],
-                href: "https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00",
-                publisher: "Internet Engineering Task Force (IETF)",
-                status: "Internet-Draft",
-                title: "JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 5",
-                date: "13 October 2016"
-            },
-            "JSON-Schema-Validation-2020-12": {
-                authors: [ "Austin Wright", "Henry Andrews", "Ben Hutton" ],
-                href: "https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00",
-                publisher: "Internet Engineering Task Force (IETF)",
-                status: "Internet-Draft",
-                title: "JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 2020-12",
-                date: "8 December 2020"
-            },
-            "SPDX": {
-                href: "https://spdx.org/licenses/",
-                title: "SPDX License List",
-                publisher: "Linux Foundation"
-          }
-        }
+        // localBiblio: {
+        //     // add local bibliography entries here, add them to https://www.specref.org/, and remove them here once published
+        // }
     };
 
     let preface = `${md.utils.escapeHtml(title)}`;
@@ -154,9 +107,10 @@ function preface(title,options) {
         preface += '';
         preface += '';
         preface += `

${title.split('|')[0]}

`; preface += ``; @@ -247,68 +201,31 @@ let indents = [0]; for (let l in lines) { let line = lines[l]; + // remove TOC from older spec versions, respec will generate a new one if (line.startsWith('## Table of Contents')) inTOC = true; if (line.startsWith('