mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 12:36:16 -04:00
docs: Minor JSON docs bugfix for hiding a header, remove invalid comment (#87)
This commit is contained in:
parent
af3676862b
commit
05fa4bcca1
3 changed files with 5 additions and 6 deletions
|
@ -10,7 +10,7 @@
|
||||||
<div id="top-doc">
|
<div id="top-doc">
|
||||||
<!--Populated by JS-->
|
<!--Populated by JS-->
|
||||||
</div>
|
</div>
|
||||||
<h2 id="field-list">Field List</h2>
|
<h2 id="field-list-header">Field List</h2>
|
||||||
<dl id="field-list-contents">
|
<dl id="field-list-contents">
|
||||||
<!--Populated by JS-->
|
<!--Populated by JS-->
|
||||||
</dl>
|
</dl>
|
|
@ -179,8 +179,8 @@ function beginRendering(json) {
|
||||||
renderData(pageData.structure, 0, "", $('<div class="group"/>'));
|
renderData(pageData.structure, 0, "", $('<div class="group"/>'));
|
||||||
console.log("DOCS:", pageDocs);
|
console.log("DOCS:", pageDocs);
|
||||||
|
|
||||||
if ($('#field-list-contents').html().trim()) {
|
if ($('#field-list-contents').text().trim()) {
|
||||||
$('#field-list').show();
|
$('#field-list-header').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the browser tried to navigate directly to an element
|
// if the browser tried to navigate directly to an element
|
||||||
|
|
|
@ -50,9 +50,8 @@ $(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add links to [<matcher>] or named matcher tokens in code blocks.
|
// Add links to [<matcher>] or named matcher tokens in code blocks.
|
||||||
// We can't do it exactly the same as the above block, because
|
// The matcher text includes <> characters which are parsed as HTML,
|
||||||
// the matcher text includes <> character which are parsed as HTML
|
// so we must use text() to change the link text.
|
||||||
// unless we use text() to change the link text.
|
|
||||||
$('pre.chroma .nd')
|
$('pre.chroma .nd')
|
||||||
.map(function(k, item) {
|
.map(function(k, item) {
|
||||||
let text = item.innerText;
|
let text = item.innerText;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue