Skip to content

Commit

Permalink
chore: remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Jul 1, 2024
1 parent 6d3eb1c commit 05ff658
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12,435 deletions.
5 changes: 4 additions & 1 deletion tools/documentation-generation/generate-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import { Documentation, Language } from "jsii-docgen";
function isH2(node) {
return node.type === "heading" && "depth" in node && node.depth === 2;
}

function hasContent(node, content) {
return (
"children" in node &&
Expand All @@ -94,6 +95,7 @@ import { Documentation, Language } from "jsii-docgen";
node.children[0].value.startsWith(content)
);
}

return function (tree) {
let takeIn = false;
let returnNodes = [];
Expand All @@ -104,8 +106,9 @@ import { Documentation, Language } from "jsii-docgen";
// We want to stop on the next h2
if (isH2(node)) {
takeIn = false;
} else {
returnNodes.push(node);
}
returnNodes.push(node);
} else {
if (isH2(node) && hasContent(node, topic)) {
// We found the topic we are looking for, start taking in nodes
Expand Down
Loading

0 comments on commit 05ff658

Please sign in to comment.