Remove all template tag lines from the .d.ts file (#2030)

This commit is contained in:
Jed Fox 2023-01-31 16:42:17 -05:00 committed by GitHub
parent 8ec4e26703
commit 83252ef641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -88,12 +88,15 @@ func generateFunctionTypes() (string, error) {
continue
}
body = body + "\n"
body = strings.ReplaceAll(body, "{% hint style=\"danger\" %}", "")
body = strings.ReplaceAll(body, "{% hint style=\"info\" %}", "")
body = strings.ReplaceAll(body, "{% hint style=\"success\" %}", "")
body = strings.ReplaceAll(body, "{% hint style=\"warning\" %}", "")
body = strings.ReplaceAll(body, "{% endhint %}", "")
lines := strings.Split(body, "\n")
body = ""
for _, line := range lines {
if strings.HasPrefix(line, "{%") && strings.HasSuffix(line, "%}") {
continue
}
body += line + "\n"
}
body = strings.ReplaceAll(body, "**NOTE**", "NOTE")
body = strings.ReplaceAll(body, "**WARNING**", "WARNING")
body = fixRuns(body)

View file

@ -1758,17 +1758,13 @@ declare function getConfiguredDomains(): string[];
* One more important thing to note: `require_glob()` is as smart as `require()` is. It loads files always relative to the JavaScript
* file where it's being executed in. Let's go with an example, as it describes it better:
*
* {% code title="dnsconfig.js" %}
* ```javascript
* require("domains/index.js");
* ```
* {% endcode %}
*
* {% code title="domains/index.js" %}
* ```javascript
* require_glob("./user1/");
* ```
* {% endcode %}
*
* This will now load files being present underneath `./domains/user1/` and **NOT** at below `./domains/`, as `require_glob()`
* is called in the subfolder `domains/`.