spec-up-t 1.0.75 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/compiled/head.css +1 -1
- package/assets/css/index.css +10 -7
- package/index.js +93 -59
- package/package.json +1 -1
- package/src/fix-markdown-files.js +2 -2
- package/src/insert-term-index.js +8 -3
package/assets/compiled/head.css
CHANGED
|
@@ -11,4 +11,4 @@ code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-fami
|
|
|
11
11
|
.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:1000}.modal{background-color:#fff;padding:2rem 20px 20px;border-radius:8px;max-width:80%;max-height:80%;overflow-y:auto;position:relative;box-shadow:0 2px 10px rgba(0,0,0,.1)}.modal-close{position:absolute;top:0;right:5px;background-color:transparent;border:none;font-size:2rem;line-height:1;cursor:pointer}
|
|
12
12
|
.alphabet-index{display:flex;flex-wrap:wrap;justify-content:center;margin:1em auto;padding:0;width:100%}.alphabet-index a{background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:50%;color:#333;display:block;font-size:1rem;height:33.33px;line-height:33.33px;margin:3.33px;text-align:center;text-decoration:none;width:33.33px}.number-of-terms{text-align:center}
|
|
13
13
|
.button-pdf-download{padding-left:.1em;padding-right:.1em;border:none;background:red;color:#fff;box-shadow:2.8px 2.8px 2.2px rgba(0,0,0,.02),6.7px 6.7px 5.3px rgba(0,0,0,.028),12.5px 12.5px 10px rgba(0,0,0,.035),22.3px 22.3px 17.9px rgba(0,0,0,.042),41.8px 41.8px 33.4px rgba(0,0,0,.05),100px 100px 80px rgba(0,0,0,.07)}
|
|
14
|
-
:root{--base-theme-color:207,71%;--themed-element-bk:hsl(var(--base-theme-color), 40%);--themed-element-text:#fff;--themed-element-border:1px solid hsl(var(--base-theme-color), 26%);--themed-heading-text:hsl(var(--base-theme-color), 30%);--no-color:255,255,255;--faint-color:245,245,245;--dim-color:225,225,225;--low-color:200,200,200;--mid-color:100,100,100;--high-color:50,50,50;--full-color:0,0,0;--active-color:#3aaaff;--visited-color:rgb(188, 129, 255);--green-status:rgb(0, 123, 9);--light-green-status:rgb(0, 194, 13);--page-bk:rgb(var(--no-color));--page-text:rgb(var(--full-color));--page-text-hover:rgb(var(--full-color));--element-bk:rgb(var(--no-color));--element-bk-hover:rgba(var(--low-color), 0.5);--element-bk-transparent:rgba(var(--dim-color), 0.92);--element-border:rgba(var(--high-color), 0.4);--element-border-focus:rgb(var(--full-color), 0.75);--element-border-radius:3px;--element-shadow-low:0 1px 3px 0px rgba(0,0,0, 0.25);--element-shadow-mid:0 1px 3px 0px rgba(0,0,0, 0.35);--element-shadow-high:0 1px 5px 0px rgba(0,0,0, 0.45);--code-bk:#1a1e23;--input-bk:rgba(var(--dim-color), 0.6);--input-border:rgba(var(--high-color), 0.4);--header-height:48px;--header-bk:rgba(var(--low-color), 0.985);--header-text:rgb(var(--full-color));--header-border:rgba(var(--full-color), 0.1);--header-border-inverse:rgba(var(--no-color), 0.3);--text-shadow:0 1px 2px rgba(0,0,0,0.8);--svg-size:2vw;--font-size:14px}:target{scroll-margin:calc(var(--header-height)/ .75) 0 0}body:not([hashscroll]) :target{animation:highlight 1.5s .25s ease}body{margin:0;padding:0;font-family:Heebo,san-serif;line-height:1.5em;widows:2;orphans:2;word-wrap:break-word;overflow-wrap:break-word;color:#000;word-spacing:1px;counter-reset:h2 toc1}h1{font-size:2em;font-weight:700;line-height:1.2em}h2{margin:1.5em 0 1em}blockquote{position:relative;padding:0;margin:1.75em .75em;color:rgb(var(--mid-color));background:rgb(var(--faint-color))}blockquote:after,blockquote:before{content:"“";position:absolute;top:.065em;left:.065em;font-size:3em;height:.34em;line-height:100%;color:rgb(var(--low-color))}blockquote:after{content:"”";top:auto;left:auto;bottom:.065em;right:.065em;text-align:center}blockquote>p{padding:.6em 1.8em .5em 1.8em}strong strong{font-size:.9em;color:#b30032;font-weight:400;text-transform:uppercase}main article>ol,main article>ul{padding:0 0 0 2em}main article h1,main article h2,main article h3,main article h4,main article h5,main article h6{color:var(--themed-heading-text)}main article h2,main article h3,main article h4{display:flex;font-weight:500}main article h2{counter-reset:h3 h4}main article h3{counter-reset:h4}main article h2:after{counter-increment:h2;content:counter(h2) ".";padding:0 .4em 0 .2em;order:-1}main article h3:after{counter-increment:h3;content:counter(h2) "." counter(h3);padding:0 .45em 0 .2em;order:-1}main article h4:after{counter-increment:h4;content:counter(h2) "." counter(h3) "." counter(h4);padding:0 .5em 0 .2em;order:-1}h1 .toc-anchor{display:none}.toc-anchor{margin:-.1em 0 0;font-size:.875em;color:inherit;text-decoration:none;opacity:.35;order:-1;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}pre{overflow:auto}code{padding:.085em .3em .1em;font-size:1.075em;color:#c7001c;vertical-align:middle;background:#f0f0f0;border-radius:4px}pre code{background:unset;padding:unset;border-radius:unset}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:1.25em;margin:-.11em .3em 0 0;border-radius:3px}ol,ul{margin:0;padding:0 0 0 1.2em}dl{margin:0;padding:0}dt{font-weight:700;margin:0;background-color:#f0f0f0;border:1px solid #ccc;padding:10px;border-radius:5px 5px 0 0}dd{margin:0;background-color:#f9f9f9;border:1px solid #ccc;border-top:none;padding:.5em 2em;border-bottom:none}dd p{margin:0}dd+dd{border-bottom:none}dd+dt{margin-top:2em}dd.last-dd{border-radius:0 0 5px 5px;border-bottom:1px solid #ccc}main{box-sizing:border-box;float:right;width:75%;min-width:calc(100% - 325px);max-width:calc(100% - 275px);padding:.5em 2em 1.5em 2em;background:#fff;box-shadow:0 0 5px -1px rgba(0,0,0,.3)}table{display:block;width:-webkit-fill-available;width:fit-content;max-width:100%;margin:1.5em 0 1.75em;border-spacing:0;border-collapse:collapse;overflow-x:auto;word-wrap:normal;overflow-wrap:normal;hyphens:manual}thead tr th{color:var(--themed-element-text);background:var(--themed-element-bk);border:var(--themed-element-border);text-shadow:0 1px 1px rgba(0,0,0,.5)}tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}tr:nth-child(2n){background-color:#f0f0f0}tr th{font-weight:400;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}td,th{padding:9px 13px;border:1px solid #d8d8d8}tr td{border:1px solid #ccc;text-align:left;margin:0;padding:.55em .75em .55em}tr td :first-child,tr th :first-child{margin-top:0}tr td :last-child,tr th :last-child{margin-bottom:0}table pre[class*=language-]{border:none;border-radius:0}table pre[class*=language-]:before{display:none}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top;pointer-events:none}article p>img{max-width:100%;margin:0 auto}article li{margin-top:.4em}slide-panel>:not(header):not(footer){flex:1}:not(pre)>code[class*=language-],pre[class*=language-]{padding:.65em .8em .8em;background:var(--code-bk)}.tippy-box{box-shadow:var(--element-shadow-mid)}.tippy-box a{color:var(--active-color)}.tippy-box a:visited{color:var(--visited-color)}.tippy-content{padding:.55em .55em .5em}.tippy-content header{margin:0 0 .4em;padding:.15em .3em .1em;border-radius:2px;background:rgba(255,255,255,.1);text-shadow:0 1px rgba(0,0,0,.9)}.tippy-content table,.tippy-content tbody,.tippy-content td,.tippy-content tr{margin:0;padding:0;border:none;border-spacing:0;border-collapse:collapse;background:0 0!important;background-color:transparent!important}.tippy-content table{margin:0 .3em}.tippy-content td{font-size:.9em;padding:.2em 0 0}.tippy-content td:first-child{padding-right:.5em}a[path-0$="github.com"]:before{content:"\f09b";color:var(--page-text);margin:0 .25em 0 0;font-family:FontAwesome;text-decoration:none;display:inline-block;vertical-align:bottom}a[path-0$="github.com"][path-3=issues][path-4],a[path-0$="github.com"][path-3=projects],a[path-0$="github.com"][path-3=pull],a[path-0$="github.com"][path-3=releases]{text-decoration:none}a[path-0$="github.com"][path-3=issues][path-4] span,a[path-0$="github.com"][path-3=projects] span,a[path-0$="github.com"][path-3=pull] span,a[path-0$="github.com"][path-3=releases] span{display:none}a[path-0$="github.com"][path-3=issues][path-4]:after{content:"Issue #" attr(path-4)}a[path-0$="github.com"][path-3=pull]:after{content:"Pull Request #" attr(path-4)}a[path-0$="github.com"][path-3=releases][path-5]:after{content:"Release " attr(path-5)}a[path-0$="github.com"][path-3=projects]:after{content:"Project #" attr(path-4)}[issue-count]:after{content:"Issues (" attr(issue-count) ")";margin:0 0 0 .3em;padding:.1em 0 0}[issue-count=""][animate]{display:none;opacity:0}[issue-count][animate]:not([issue-count=""]){animation:display-show 1s}[panel-toggle]{cursor:pointer}.panel-header{display:flex;align-items:center;height:var(--header-height)}.panel-header>*{display:flex;height:100%;padding:.1em .8em 0;align-items:center}.slide-panel{width:calc(100% - 1em);max-width:475px;transition:transform .35s ease}.slide-panel[panel-open]{transform:translateX(0)}.notice{margin:1em 0;padding:.5em .9em .55em .65em;border-left:.5em solid}.notice p{margin:.4em 0 0}.note{background:#e9fbe9;border-color:#52e052}.note .notice-link{display:block;color:#178217}.issue{background:#e9f0fb;border-color:#527fe0}.issue .notice-link:before{display:block;color:#1e4cae}.warning{background:#fbe9e9;border-color:#e05252}.warning .notice-link{display:block;color:#ae1e1e}.example{color:#cebe00;background:#1a1e23;border-left:.5em solid}.example .notice-link{display:block;color:inherit;font-size:1.1em;font-family:Heebo,san-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.mermaid{display:flex;align-items:center;justify-content:center;margin:1.5em 0 1.75em}.reference-list{margin:0;padding:0;list-style:none}.reference-list dd a,.reference-status{font-style:italic}.reference-status{color:var(--green-status)}.tippy-box .reference-status{color:var(--light-green-status)}code[class*=language-],pre,pre[class*=language-]{font-size:.9em;margin:1em 0 1.5em;border-radius:3px}.example code[class*=language-],.example pre,.example pre[class*=language-]{margin:0}#svg{display:none}#header{position:sticky;position:-webkit-sticky;padding:0;top:0;margin:-.5em -2em 0 -2em;background:rgba(255,255,255,.9);border-bottom:1px solid rgba(0,0,0,.175);box-shadow:0 1px 3px 1px rgba(0,0,0,.1);z-index:2}#logo{box-sizing:border-box;display:flex;align-items:center;height:100%;padding:.5em}#logo img{height:100%}#logo+span{margin-left:auto}#header #toc_toggle{display:none;padding:0 1em;border-right:1px solid rgba(0,0,0,.15)}#content{max-width:800px}#content h1:first-of-type{margin:1em 0 .5em}#content h1:first-of-type .markdownIt-Anchor{display:none}#repo_issues{width:calc(100% - 1.5em);max-width:450px;border-left:1px solid rgba(0,0,0,.15)}#repo_issues>header{background:#eee;border-bottom:1px solid #ddd}#repo_issues>header span:first-of-type{font-weight:700;padding-top:.1em}#repo_issues>header .repo-issue-toggle{margin-left:auto;color:inherit;font-weight:700;text-decoration:none}#repo_issue_list{list-style:none;margin:0;padding:0 1.25em 1.25em;font-size:.85em;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}#repo_issue_list::-webkit-scrollbar{display:none}#repo_issue_list:empty:before{content:"No issues found";display:block;text-align:center;font-size:1.1em;color:#aaa;margin:1em 0 0}.repo-issue detail-box{display:flex;flex-direction:column;padding:1em 0;border-bottom:1px solid #ddd}.repo-issue detail-box>section{order:1}.repo-issue detail-box>section:empty+.repo-issue-title [detail-box-toggle]{display:none}.repo-issue-title{display:flex;align-items:center}.repo-issue-link{flex:1;margin:0 0 0 .5em}.repo-issue-number{height:1em;margin:0 .4em 0 0;padding:.3em .25em 0;border-radius:3px;font-weight:700;background:#eee;border:1px solid #ddd;text-align:center;line-height:1em}.repo-issue-number:before{content:"#";font-weight:400;margin:0 .1em 0 0}.repo-issue [detail-box-toggle]{margin:0 0 0 1em;opacity:.35;transition:opacity .4s}.repo-issue [detail-box-toggle]:hover,.repo-issue detail-box[open] [detail-box-toggle]{opacity:1}#toc{display:flex;flex-direction:column;width:25%;max-width:325px;min-width:275px;background:#eceff1}#toc header{color:var(--themed-element-text);background:var(--themed-element-bk);box-shadow:0 1px 3px 0 rgba(0,0,0,.3);border:var(--themed-element-border);border-top:none;border-left:none}#toc header [panel-toggle]{display:none;height:var(--header-height);line-height:var(--header-height);margin-left:auto;padding:0 1em;color:inherit;font-weight:700;text-decoration:none}#toc_list{flex:1;padding:1em .8em;overflow:auto}.toc{padding:0 0 1.75em;font-size:.85em}.toc,.toc ul{margin:0;list-style:none}.toc ul{padding:0 0 0 1em}.toc a{display:block;padding:.4em .3em .225em;text-decoration:none;border-radius:3px;color:#333}.toc a:before{color:#000;font-weight:700}.toc a:hover{text-shadow:0 1px 1px #fff;background:rgba(0,0,0,.1)}.toc>li a:before{counter-increment:toc1;content:counter(toc1) ".";padding:0 .4em 0 .2em}.toc>li>ul{counter-reset:toc2}.toc>li>ul>li a:before{counter-increment:toc2;content:counter(toc1) "." counter(toc2);padding:0 .45em 0 .2em}.toc>li>ul ul{counter-reset:toc3}.toc>li>ul ul li a:before{counter-increment:toc3;content:counter(toc1) "." counter(toc2) "." counter(toc3);padding:0 .5em 0 .2em}@media (min-width:900px){slide-panel{z-index:2}#slidepanels[open=sidebar]:before{opacity:0;transition:none;pointer-events:none}#slidepanels:before{z-index:1}#toc{transition:none;transform:translate3d(0,0,0);box-shadow:0 0 5px 1px rgba(0,0,0,.15) inset;z-index:0}}@media (max-width:900px){main{width:100%;min-width:auto;max-width:none;padding:.5em 1.25em 1.5em 1.25em}#header{margin:-.5em -1.25em 0 -1.25em}#toc header [panel-toggle]{display:block}#header #toc_toggle{display:flex}}@media (max-width:550px){td{font-size:.8em}}@keyframes display-show{0%{display:none;opacity:0}1%{display:block}100%{opacity:1}}@keyframes highlight{50%{background-color:#ff0}}article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::after{content:'';width:12px;height:12px;margin-left:4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:contain;display:inline-block}.btn,.no-xref-found-message{font-variant:small-caps;text-transform:uppercase}.no-xref-found-message{background:#f8c481!important;color:#03365f!important;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem}.powered-by,.snapshots{margin:0;padding:0;flex:none}.powered-by{text-align:center;font-size:.7em}.snapshots a{display:block;margin:.5em;padding:.5em .8em;border-radius:.25rem;background:#a9dde0;color:#03365f;text-decoration:none;font-size:1rem}
|
|
14
|
+
:root{--base-theme-color:207,71%;--themed-element-bk:hsl(var(--base-theme-color), 40%);--themed-element-text:#fff;--themed-element-border:1px solid hsl(var(--base-theme-color), 26%);--themed-heading-text:hsl(var(--base-theme-color), 30%);--no-color:255,255,255;--faint-color:245,245,245;--dim-color:225,225,225;--low-color:200,200,200;--mid-color:100,100,100;--high-color:50,50,50;--full-color:0,0,0;--active-color:#3aaaff;--visited-color:rgb(188, 129, 255);--green-status:rgb(0, 123, 9);--light-green-status:rgb(0, 194, 13);--page-bk:rgb(var(--no-color));--page-text:rgb(var(--full-color));--page-text-hover:rgb(var(--full-color));--element-bk:rgb(var(--no-color));--element-bk-hover:rgba(var(--low-color), 0.5);--element-bk-transparent:rgba(var(--dim-color), 0.92);--element-border:rgba(var(--high-color), 0.4);--element-border-focus:rgb(var(--full-color), 0.75);--element-border-radius:3px;--element-shadow-low:0 1px 3px 0px rgba(0,0,0, 0.25);--element-shadow-mid:0 1px 3px 0px rgba(0,0,0, 0.35);--element-shadow-high:0 1px 5px 0px rgba(0,0,0, 0.45);--code-bk:#1a1e23;--input-bk:rgba(var(--dim-color), 0.6);--input-border:rgba(var(--high-color), 0.4);--header-height:48px;--header-bk:rgba(var(--low-color), 0.985);--header-text:rgb(var(--full-color));--header-border:rgba(var(--full-color), 0.1);--header-border-inverse:rgba(var(--no-color), 0.3);--text-shadow:0 1px 2px rgba(0,0,0,0.8);--svg-size:2vw;--font-size:14px}:target{scroll-margin:calc(var(--header-height)/ .75) 0 0}body:not([hashscroll]) :target{animation:highlight 1.5s .25s ease}body{margin:0;padding:0;font-family:Heebo,san-serif;line-height:1.5em;widows:2;orphans:2;word-wrap:break-word;overflow-wrap:break-word;color:#000;word-spacing:1px;counter-reset:h2 toc1}h1{font-size:2em;font-weight:700;line-height:1.2em}h2{margin:1.5em 0 1em}blockquote{position:relative;padding:0;margin:1.75em .75em;color:rgb(var(--mid-color));background:rgb(var(--faint-color))}blockquote:after,blockquote:before{content:"“";position:absolute;top:.065em;left:.065em;font-size:3em;height:.34em;line-height:100%;color:rgb(var(--low-color))}blockquote:after{content:"”";top:auto;left:auto;bottom:.065em;right:.065em;text-align:center}blockquote>p{padding:.6em 1.8em .5em 1.8em}strong strong{font-size:.9em;color:#b30032;font-weight:400;text-transform:uppercase}main article>ol,main article>ul{padding:0 0 0 2em}main article h1,main article h2,main article h3,main article h4,main article h5,main article h6{color:var(--themed-heading-text)}main article h2,main article h3,main article h4{display:flex;font-weight:500}main article h2{counter-reset:h3 h4}main article h3{counter-reset:h4}main article h2:after{counter-increment:h2;content:counter(h2) ".";padding:0 .4em 0 .2em;order:-1}main article h3:after{counter-increment:h3;content:counter(h2) "." counter(h3);padding:0 .45em 0 .2em;order:-1}main article h4:after{counter-increment:h4;content:counter(h2) "." counter(h3) "." counter(h4);padding:0 .5em 0 .2em;order:-1}h1 .toc-anchor{display:none}.toc-anchor{margin:-.1em 0 0;font-size:.875em;color:inherit;text-decoration:none;opacity:.35;order:-1;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}pre{overflow:auto}code{padding:.085em .3em .1em;font-size:1.075em;color:#c7001c;vertical-align:middle;background:#f0f0f0;border-radius:4px}pre code{background:unset;padding:unset;border-radius:unset}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:1.25em;margin:-.11em .3em 0 0;border-radius:3px}ol,ul{margin:0;padding:0 0 0 1.2em}dl.terms-and-definitions-list{margin:0;padding:0}dl.terms-and-definitions-list dt{font-weight:700;margin:0;background-color:#f0f0f0;border:1px solid #ccc;padding:10px;border-radius:5px 5px 0 0}dl.terms-and-definitions-list dd{margin:0;background-color:#f9f9f9;border:1px solid #ccc;border-top:none;padding:.5em 2em;border-bottom:none}dl.terms-and-definitions-list dd p{margin:0}dl.terms-and-definitions-list dd+dd{border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:2em}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 5px 5px;border-bottom:1px solid #ccc}main{box-sizing:border-box;float:right;width:75%;min-width:calc(100% - 325px);max-width:calc(100% - 275px);padding:.5em 2em 1.5em 2em;background:#fff;box-shadow:0 0 5px -1px rgba(0,0,0,.3)}table{display:block;width:-webkit-fill-available;width:fit-content;max-width:100%;margin:1.5em 0 1.75em;border-spacing:0;border-collapse:collapse;overflow-x:auto;word-wrap:normal;overflow-wrap:normal;hyphens:manual}thead tr th{color:var(--themed-element-text);background:var(--themed-element-bk);border:var(--themed-element-border);text-shadow:0 1px 1px rgba(0,0,0,.5)}tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}tr:nth-child(2n){background-color:#f0f0f0}tr th{font-weight:400;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}td,th{padding:9px 13px;border:1px solid #d8d8d8}tr td{border:1px solid #ccc;text-align:left;margin:0;padding:.55em .75em .55em}tr td :first-child,tr th :first-child{margin-top:0}tr td :last-child,tr th :last-child{margin-bottom:0}table pre[class*=language-]{border:none;border-radius:0}table pre[class*=language-]:before{display:none}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top;pointer-events:none}article p>img{max-width:100%;margin:0 auto}article li{margin-top:.4em}slide-panel>:not(header):not(footer){flex:1}:not(pre)>code[class*=language-],pre[class*=language-]{padding:.65em .8em .8em;background:var(--code-bk)}.tippy-box{box-shadow:var(--element-shadow-mid)}.tippy-box a{color:var(--active-color)}.tippy-box a:visited{color:var(--visited-color)}.tippy-content{padding:.55em .55em .5em}.tippy-content header{margin:0 0 .4em;padding:.15em .3em .1em;border-radius:2px;background:rgba(255,255,255,.1);text-shadow:0 1px rgba(0,0,0,.9)}.tippy-content table,.tippy-content tbody,.tippy-content td,.tippy-content tr{margin:0;padding:0;border:none;border-spacing:0;border-collapse:collapse;background:0 0!important;background-color:transparent!important}.tippy-content table{margin:0 .3em}.tippy-content td{font-size:.9em;padding:.2em 0 0}.tippy-content td:first-child{padding-right:.5em}a[path-0$="github.com"]:before{content:"\f09b";color:var(--page-text);margin:0 .25em 0 0;font-family:FontAwesome;text-decoration:none;display:inline-block;vertical-align:bottom}a[path-0$="github.com"][path-3=issues][path-4],a[path-0$="github.com"][path-3=projects],a[path-0$="github.com"][path-3=pull],a[path-0$="github.com"][path-3=releases]{text-decoration:none}a[path-0$="github.com"][path-3=issues][path-4] span,a[path-0$="github.com"][path-3=projects] span,a[path-0$="github.com"][path-3=pull] span,a[path-0$="github.com"][path-3=releases] span{display:none}a[path-0$="github.com"][path-3=issues][path-4]:after{content:"Issue #" attr(path-4)}a[path-0$="github.com"][path-3=pull]:after{content:"Pull Request #" attr(path-4)}a[path-0$="github.com"][path-3=releases][path-5]:after{content:"Release " attr(path-5)}a[path-0$="github.com"][path-3=projects]:after{content:"Project #" attr(path-4)}[issue-count]:after{content:"Issues (" attr(issue-count) ")";margin:0 0 0 .3em;padding:.1em 0 0}[issue-count=""][animate]{display:none;opacity:0}[issue-count][animate]:not([issue-count=""]){animation:display-show 1s}[panel-toggle]{cursor:pointer}.panel-header{display:flex;align-items:center;height:var(--header-height)}.panel-header>*{display:flex;height:100%;padding:.1em .8em 0;align-items:center}.slide-panel{width:calc(100% - 1em);max-width:475px;transition:transform .35s ease}.slide-panel[panel-open]{transform:translateX(0)}.notice{margin:1em 0;padding:.5em .9em .55em .65em;border-left:.5em solid}.notice p{margin:.4em 0 0}.note{background:#e9fbe9;border-color:#52e052}.note .notice-link{display:block;color:#178217}.issue{background:#e9f0fb;border-color:#527fe0}.issue .notice-link:before{display:block;color:#1e4cae}.warning{background:#fbe9e9;border-color:#e05252}.warning .notice-link{display:block;color:#ae1e1e}.example{color:#cebe00;background:#1a1e23;border-left:.5em solid}.example .notice-link{display:block;color:inherit;font-size:1.1em;font-family:Heebo,san-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.mermaid{display:flex;align-items:center;justify-content:center;margin:1.5em 0 1.75em}.reference-list{margin:0;padding:0;list-style:none}.reference-list dd a,.reference-status{font-style:italic}.reference-status{color:var(--green-status)}.tippy-box .reference-status{color:var(--light-green-status)}code[class*=language-],pre,pre[class*=language-]{font-size:.9em;margin:1em 0 1.5em;border-radius:3px}.example code[class*=language-],.example pre,.example pre[class*=language-]{margin:0}#svg{display:none}#header{position:sticky;position:-webkit-sticky;padding:0;top:0;margin:-.5em -2em 0 -2em;background:rgba(255,255,255,.9);border-bottom:1px solid rgba(0,0,0,.175);box-shadow:0 1px 3px 1px rgba(0,0,0,.1);z-index:2}#logo{box-sizing:border-box;display:flex;align-items:center;height:100%;padding:.5em}#logo img{height:100%}#logo+span{margin-left:auto}#header #toc_toggle{display:none;padding:0 1em;border-right:1px solid rgba(0,0,0,.15)}#content{max-width:800px}#content h1:first-of-type{margin:1em 0 .5em}#content h1:first-of-type .markdownIt-Anchor{display:none}#repo_issues{width:calc(100% - 1.5em);max-width:450px;border-left:1px solid rgba(0,0,0,.15)}#repo_issues>header{background:#eee;border-bottom:1px solid #ddd}#repo_issues>header span:first-of-type{font-weight:700;padding-top:.1em}#repo_issues>header .repo-issue-toggle{margin-left:auto;color:inherit;font-weight:700;text-decoration:none}#repo_issue_list{list-style:none;margin:0;padding:0 1.25em 1.25em;font-size:.85em;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}#repo_issue_list::-webkit-scrollbar{display:none}#repo_issue_list:empty:before{content:"No issues found";display:block;text-align:center;font-size:1.1em;color:#aaa;margin:1em 0 0}.repo-issue detail-box{display:flex;flex-direction:column;padding:1em 0;border-bottom:1px solid #ddd}.repo-issue detail-box>section{order:1}.repo-issue detail-box>section:empty+.repo-issue-title [detail-box-toggle]{display:none}.repo-issue-title{display:flex;align-items:center}.repo-issue-link{flex:1;margin:0 0 0 .5em}.repo-issue-number{height:1em;margin:0 .4em 0 0;padding:.3em .25em 0;border-radius:3px;font-weight:700;background:#eee;border:1px solid #ddd;text-align:center;line-height:1em}.repo-issue-number:before{content:"#";font-weight:400;margin:0 .1em 0 0}.repo-issue [detail-box-toggle]{margin:0 0 0 1em;opacity:.35;transition:opacity .4s}.repo-issue [detail-box-toggle]:hover,.repo-issue detail-box[open] [detail-box-toggle]{opacity:1}#toc{display:flex;flex-direction:column;width:25%;max-width:325px;min-width:275px;background:#eceff1}#toc header{color:var(--themed-element-text);background:var(--themed-element-bk);box-shadow:0 1px 3px 0 rgba(0,0,0,.3);border:var(--themed-element-border);border-top:none;border-left:none}#toc header [panel-toggle]{display:none;height:var(--header-height);line-height:var(--header-height);margin-left:auto;padding:0 1em;color:inherit;font-weight:700;text-decoration:none}#toc_list{flex:1;padding:1em .8em;overflow:auto}.toc{padding:0 0 1.75em;font-size:.85em}.toc,.toc ul{margin:0;list-style:none}.toc ul{padding:0 0 0 1em}.toc a{display:block;padding:.4em .3em .225em;text-decoration:none;border-radius:3px;color:#333}.toc a:before{color:#000;font-weight:700}.toc a:hover{text-shadow:0 1px 1px #fff;background:rgba(0,0,0,.1)}.toc>li a:before{counter-increment:toc1;content:counter(toc1) ".";padding:0 .4em 0 .2em}.toc>li>ul{counter-reset:toc2}.toc>li>ul>li a:before{counter-increment:toc2;content:counter(toc1) "." counter(toc2);padding:0 .45em 0 .2em}.toc>li>ul ul{counter-reset:toc3}.toc>li>ul ul li a:before{counter-increment:toc3;content:counter(toc1) "." counter(toc2) "." counter(toc3);padding:0 .5em 0 .2em}@media (min-width:900px){slide-panel{z-index:2}#slidepanels[open=sidebar]:before{opacity:0;transition:none;pointer-events:none}#slidepanels:before{z-index:1}#toc{transition:none;transform:translate3d(0,0,0);box-shadow:0 0 5px 1px rgba(0,0,0,.15) inset;z-index:0}}@media (max-width:900px){main{width:100%;min-width:auto;max-width:none;padding:.5em 1.25em 1.5em 1.25em}#header{margin:-.5em -1.25em 0 -1.25em}#toc header [panel-toggle]{display:block}#header #toc_toggle{display:flex}}@media (max-width:550px){td{font-size:.8em}}@keyframes display-show{0%{display:none;opacity:0}1%{display:block}100%{opacity:1}}@keyframes highlight{50%{background-color:#ff0}}article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::after{content:'';width:12px;height:12px;margin-left:4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:contain;display:inline-block}.btn,.no-xref-found-message{font-variant:small-caps;text-transform:uppercase}.no-xref-found-message{background:#f8c481!important;color:#03365f!important;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem}.powered-by,.snapshots{margin:0;padding:0;flex:none}.powered-by{text-align:center;font-size:.7em}.snapshots a{display:block;margin:.5em;padding:.5em .8em;border-radius:.25rem;background:#a9dde0;color:#03365f;text-decoration:none;font-size:1rem}
|
package/assets/css/index.css
CHANGED
|
@@ -227,12 +227,13 @@ ol, ul {
|
|
|
227
227
|
padding: 0 0 0 1.2em;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
/* START: Definition list for terms */
|
|
231
|
+
dl.terms-and-definitions-list {
|
|
231
232
|
margin: 0;
|
|
232
233
|
padding: 0;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
|
-
dt {
|
|
236
|
+
dl.terms-and-definitions-list dt {
|
|
236
237
|
font-weight: bold;
|
|
237
238
|
margin: 0;
|
|
238
239
|
background-color: #f0f0f0;
|
|
@@ -241,7 +242,7 @@ dt {
|
|
|
241
242
|
border-radius: 5px 5px 0 0;
|
|
242
243
|
}
|
|
243
244
|
|
|
244
|
-
dd {
|
|
245
|
+
dl.terms-and-definitions-list dd {
|
|
245
246
|
margin: 0;
|
|
246
247
|
background-color: #f9f9f9;
|
|
247
248
|
border: 1px solid #ccc;
|
|
@@ -252,24 +253,26 @@ dd {
|
|
|
252
253
|
/* Remove bottom borders for all dd's by default */
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
dd p {
|
|
256
|
+
dl.terms-and-definitions-list dd p {
|
|
256
257
|
margin: 0;
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
/* Remove borders between consecutive <dd> elements */
|
|
260
|
-
dd+dd {
|
|
261
|
+
dl.terms-and-definitions-list dd+dd {
|
|
261
262
|
border-bottom: none;
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
/* Add a margin between the last <dd> and the next <dt> */
|
|
265
|
-
dd+dt {
|
|
266
|
+
dl.terms-and-definitions-list dd+dt {
|
|
266
267
|
margin-top: 2em;
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
dd.last-dd {
|
|
270
|
+
dl.terms-and-definitions-list dd.last-dd {
|
|
270
271
|
border-radius: 0 0 5px 5px;
|
|
271
272
|
border-bottom: 1px solid #ccc;
|
|
272
273
|
}
|
|
274
|
+
/* END: Definition list for terms */
|
|
275
|
+
|
|
273
276
|
|
|
274
277
|
main {
|
|
275
278
|
box-sizing: border-box;
|
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
module.exports = function (options = {}) {
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const gulp = require('gulp');
|
|
5
6
|
|
|
6
7
|
const {
|
|
7
8
|
fetchExternalSpecs,
|
|
@@ -21,7 +22,6 @@ module.exports = function (options = {}) {
|
|
|
21
22
|
const { insertTermIndex } = require('./src/insert-term-index.js');
|
|
22
23
|
insertTermIndex();
|
|
23
24
|
|
|
24
|
-
const gulp = require('gulp');
|
|
25
25
|
const findPkgDir = require('find-pkg-dir');
|
|
26
26
|
const modulePath = findPkgDir(__dirname);
|
|
27
27
|
let config = fs.readJsonSync('./output/specs-generated.json');
|
|
@@ -29,6 +29,8 @@ module.exports = function (options = {}) {
|
|
|
29
29
|
const createVersionsIndex = require('./src/create-versions-index.js');
|
|
30
30
|
createVersionsIndex(config.specs[0].output_path);
|
|
31
31
|
|
|
32
|
+
const { fixMarkdownFiles } = require('./src/fix-markdown-files.js');
|
|
33
|
+
|
|
32
34
|
let template = fs.readFileSync(path.join(modulePath, 'templates/template.html'), 'utf8');
|
|
33
35
|
let assets = fs.readJsonSync(modulePath + '/src/asset-map.json');
|
|
34
36
|
let externalReferences;
|
|
@@ -46,20 +48,24 @@ module.exports = function (options = {}) {
|
|
|
46
48
|
return fs.readFileSync(path, 'utf8');
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
];
|
|
50
|
-
|
|
51
|
-
const { processMarkdownFiles } = require('./src/fix-markdown-files.js');
|
|
51
|
+
];
|
|
52
52
|
|
|
53
|
-
//
|
|
54
|
-
|
|
53
|
+
// Synchronously process markdown files
|
|
54
|
+
fixMarkdownFiles(path.join(config.specs[0].spec_directory, config.specs[0].spec_terms_directory));
|
|
55
|
+
|
|
56
|
+
function createScriptElementWithXrefDataForEmbeddingInHtml() {
|
|
57
|
+
// Test if xrefs-data.js exists, else make it an empty string
|
|
58
|
+
const inputPath = 'output/xrefs-data.js';
|
|
59
|
+
let xrefsData = "";
|
|
60
|
+
if (fs.existsSync(inputPath)) {
|
|
61
|
+
xrefsData = '<script>' + fs.readFileSync(inputPath, 'utf8') + '</script>';
|
|
62
|
+
}
|
|
55
63
|
|
|
56
|
-
|
|
57
|
-
const inputPath = 'output/xrefs-data.js';
|
|
58
|
-
let xrefsData = "";
|
|
59
|
-
if (fs.existsSync(inputPath)) {
|
|
60
|
-
xrefsData = '<script>' + fs.readFileSync(inputPath, 'utf8') + '</script>';
|
|
64
|
+
return xrefsData;
|
|
61
65
|
}
|
|
62
66
|
|
|
67
|
+
const xrefsData = createScriptElementWithXrefDataForEmbeddingInHtml();
|
|
68
|
+
|
|
63
69
|
function applyReplacers(doc) {
|
|
64
70
|
return doc.replace(replacerRegex, function (match, type, args) {
|
|
65
71
|
let replacer = replacers.find(r => type.trim().match(r.test));
|
|
@@ -101,6 +107,74 @@ module.exports = function (options = {}) {
|
|
|
101
107
|
throw Error("katex distribution could not be located");
|
|
102
108
|
}
|
|
103
109
|
|
|
110
|
+
// Custom plugin to add class to <dl> and the last <dd> in each series after a <dt>
|
|
111
|
+
function addClassToDefinitionList(md) {
|
|
112
|
+
const originalRender = md.renderer.rules.dl_open || function (tokens, idx, options, env, self) {
|
|
113
|
+
return self.renderToken(tokens, idx, options);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// Variable to keep track of whether the class has been added to the first <dl> after the target HTML
|
|
117
|
+
let classAdded = false;
|
|
118
|
+
|
|
119
|
+
md.renderer.rules.dl_open = function (tokens, idx, options, env, self) {
|
|
120
|
+
|
|
121
|
+
const targetHtml = 'terminology-section-start-h7vc6omi2hr2880';
|
|
122
|
+
let targetIndex = -1;
|
|
123
|
+
|
|
124
|
+
// Find the index of the target HTML
|
|
125
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
126
|
+
if (tokens[i].content && tokens[i].content.includes(targetHtml)) {
|
|
127
|
+
targetIndex = i;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Add class to the first <dl> only if it comes after the target HTML
|
|
133
|
+
if (targetIndex !== -1 && idx > targetIndex && !classAdded) {
|
|
134
|
+
tokens[idx].attrPush(['class', 'terms-and-definitions-list']);
|
|
135
|
+
classAdded = true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
let lastDdIndex = -1;
|
|
139
|
+
|
|
140
|
+
for (let i = idx + 1; i < tokens.length; i++) {
|
|
141
|
+
if (tokens[i].type === 'dl_close') {
|
|
142
|
+
// Add class to the last <dd> before closing <dl>
|
|
143
|
+
if (lastDdIndex !== -1) {
|
|
144
|
+
const ddToken = tokens[lastDdIndex];
|
|
145
|
+
const classIndex = ddToken.attrIndex('class');
|
|
146
|
+
if (classIndex < 0) {
|
|
147
|
+
ddToken.attrPush(['class', 'last-dd']);
|
|
148
|
+
} else {
|
|
149
|
+
ddToken.attrs[classIndex][1] += ' last-dd';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (tokens[i].type === 'dt_open') {
|
|
156
|
+
// Add class to the last <dd> before a new <dt>
|
|
157
|
+
if (lastDdIndex !== -1) {
|
|
158
|
+
const ddToken = tokens[lastDdIndex];
|
|
159
|
+
const classIndex = ddToken.attrIndex('class');
|
|
160
|
+
if (classIndex < 0) {
|
|
161
|
+
ddToken.attrPush(['class', 'last-dd']);
|
|
162
|
+
} else {
|
|
163
|
+
ddToken.attrs[classIndex][1] += ' last-dd';
|
|
164
|
+
}
|
|
165
|
+
lastDdIndex = -1; // Reset for the next series
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (tokens[i].type === 'dd_open') {
|
|
170
|
+
lastDdIndex = i;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return originalRender(tokens, idx, options, env, self);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
104
178
|
try {
|
|
105
179
|
|
|
106
180
|
var toc;
|
|
@@ -218,55 +292,7 @@ module.exports = function (options = {}) {
|
|
|
218
292
|
})
|
|
219
293
|
.use(require('@traptitech/markdown-it-katex'))
|
|
220
294
|
|
|
221
|
-
// Custom plugin to add class to <dl> and the last <dd> in each series after a <dt>
|
|
222
|
-
function addClassToDefinitionList(md) {
|
|
223
|
-
const originalRender = md.renderer.rules.dl_open || function (tokens, idx, options, env, self) {
|
|
224
|
-
return self.renderToken(tokens, idx, options);
|
|
225
|
-
};
|
|
226
295
|
|
|
227
|
-
md.renderer.rules.dl_open = function (tokens, idx, options, env, self) {
|
|
228
|
-
// Add class to <dl>
|
|
229
|
-
tokens[idx].attrPush(['class', 'terms-and-definitions-list']);
|
|
230
|
-
|
|
231
|
-
let lastDdIndex = -1;
|
|
232
|
-
|
|
233
|
-
for (let i = idx + 1; i < tokens.length; i++) {
|
|
234
|
-
if (tokens[i].type === 'dl_close') {
|
|
235
|
-
// Add class to the last <dd> before closing <dl>
|
|
236
|
-
if (lastDdIndex !== -1) {
|
|
237
|
-
const ddToken = tokens[lastDdIndex];
|
|
238
|
-
const classIndex = ddToken.attrIndex('class');
|
|
239
|
-
if (classIndex < 0) {
|
|
240
|
-
ddToken.attrPush(['class', 'last-dd']);
|
|
241
|
-
} else {
|
|
242
|
-
ddToken.attrs[classIndex][1] += ' last-dd';
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
if (tokens[i].type === 'dt_open') {
|
|
249
|
-
// Add class to the last <dd> before a new <dt>
|
|
250
|
-
if (lastDdIndex !== -1) {
|
|
251
|
-
const ddToken = tokens[lastDdIndex];
|
|
252
|
-
const classIndex = ddToken.attrIndex('class');
|
|
253
|
-
if (classIndex < 0) {
|
|
254
|
-
ddToken.attrPush(['class', 'last-dd']);
|
|
255
|
-
} else {
|
|
256
|
-
ddToken.attrs[classIndex][1] += ' last-dd';
|
|
257
|
-
}
|
|
258
|
-
lastDdIndex = -1; // Reset for the next series
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (tokens[i].type === 'dd_open') {
|
|
263
|
-
lastDdIndex = i;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return originalRender(tokens, idx, options, env, self);
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
296
|
|
|
271
297
|
md.use(addClassToDefinitionList);
|
|
272
298
|
|
|
@@ -288,6 +314,14 @@ module.exports = function (options = {}) {
|
|
|
288
314
|
if (spec.external_specs && !externalReferences) {
|
|
289
315
|
externalReferences = await fetchExternalSpecs(spec);
|
|
290
316
|
}
|
|
317
|
+
|
|
318
|
+
// Find the index of the terms-and-definitions-intro.md file
|
|
319
|
+
const termsIndex = (spec.markdown_paths || ['spec.md']).indexOf('terms-and-definitions-intro.md');
|
|
320
|
+
if (termsIndex !== -1) {
|
|
321
|
+
// Append the HTML string to the content of terms-and-definitions-intro.md. This string is used to create a div that is used to insert an alphabet index, and a div that is used as the starting point of the terminology index. The newlines are essential for the correct rendering of the markdown.
|
|
322
|
+
docs[termsIndex] += '\n\n<div id="alphabet-index-h7vc6omi2hr2880"></div>\n\n<div id="terminology-section-start-h7vc6omi2hr2880"></div>\n\n<hr>\n\n';
|
|
323
|
+
}
|
|
324
|
+
|
|
291
325
|
let doc = docs.join("\n");
|
|
292
326
|
doc = applyReplacers(doc);
|
|
293
327
|
md[spec.katex ? "enable" : "disable"](katexRules);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76",
|
|
4
4
|
"description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"repository": {
|
|
@@ -2,7 +2,7 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
4
|
// Function to process markdown files in a directory recursively
|
|
5
|
-
function
|
|
5
|
+
function fixMarkdownFiles(directory) {
|
|
6
6
|
// Helper function to process a directory
|
|
7
7
|
function processDirectory(directory) {
|
|
8
8
|
try {
|
|
@@ -92,5 +92,5 @@ function processMarkdownFiles(directory) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
module.exports = {
|
|
95
|
-
|
|
95
|
+
fixMarkdownFiles
|
|
96
96
|
};
|
package/src/insert-term-index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
2
|
+
* Inserts term index into the specification.
|
|
3
3
|
*
|
|
4
|
-
* This function
|
|
5
|
-
* term directories, and updates the specification with the term index.
|
|
4
|
+
* This function reads the entries from term-index.json,
|
|
5
|
+
* processes the term directories, and updates the specification with the term index.
|
|
6
|
+
* It modifies the markdown paths in the specification and saves the updated specification
|
|
7
|
+
* to a JSON file in the output directory.
|
|
6
8
|
*
|
|
7
9
|
* @function
|
|
8
10
|
* @name insertTermIndex
|
|
@@ -22,7 +24,10 @@ function insertTermIndex() {
|
|
|
22
24
|
let specGenerated = config;
|
|
23
25
|
let markdownPaths = specGenerated.specs[0].markdown_paths;
|
|
24
26
|
|
|
27
|
+
// Find the index of the "terms-and-definitions-intro.md" file in the markdown paths
|
|
25
28
|
const index = markdownPaths.indexOf('terms-and-definitions-intro.md');
|
|
29
|
+
|
|
30
|
+
//
|
|
26
31
|
if (index !== -1) {
|
|
27
32
|
// Insert the items of the "terms" array after the found index
|
|
28
33
|
markdownPaths.splice(index + 1, 0, ...terms);
|