From c0c3e3cdaaff83797f50fdfe7e625f4a3277e778 Mon Sep 17 00:00:00 2001 From: ysugimoto Date: Thu, 4 Apr 2024 21:25:25 +0900 Subject: [PATCH] fix {NAME} signture dealing and add one lacked variable --- __generator__/predefined.yml | 5 +++++ cmd/documentation-checker/html.go | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/__generator__/predefined.yml b/__generator__/predefined.yml index 3da5d01d..80df4255 100644 --- a/__generator__/predefined.yml +++ b/__generator__/predefined.yml @@ -2283,3 +2283,8 @@ ratecounter.%any%.rate.60s: reference: "https://developer.fastly.com/reference/vcl/variables/rate-limiting/ratecounter-rate-60s/" on: [RECV, HASH, HIT, MISS, PASS, FETCH, ERROR, DELIVER, LOG] get: FLOAT + +director.%any%.healthy: + reference: "https://developer.fastly.com/documentation/reference/vcl/variables/miscellaneous/director-healthy/" + on: [RECV, HASH, HIT, MISS, PASS, FETCH, ERROR, DELIVER, LOG] + get: BOOL diff --git a/cmd/documentation-checker/html.go b/cmd/documentation-checker/html.go index be578170..5c4919b3 100644 --- a/cmd/documentation-checker/html.go +++ b/cmd/documentation-checker/html.go @@ -53,11 +53,17 @@ func fetchFastlyDocument(ctx context.Context, url string, m *sync.Map) error { } name := a.FirstChild.Data if name == ignoreFunctionIf || - strings.Contains(name, ignoreHTTPHeaderRelatedSignaure) || strings.Contains(name, ignoreRegexCapturedNumber) { continue } + + name = strings.ReplaceAll( + name, + ignoreHTTPHeaderRelatedSignaure, + "%any%", + ) + var link string for _, v := range a.Attr { if v.Key == "href" {