From 0667473a643818cc094b49fd150e3392e6690e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=ADa=20M=2E=20Polis?= Date: Thu, 6 Feb 2025 15:43:37 -0800 Subject: [PATCH] Resolved the last of the regex issues. --- hardware-guide/hpe-apollo-4200-gen9/drive-leds.md | 2 +- spellcheck.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hardware-guide/hpe-apollo-4200-gen9/drive-leds.md b/hardware-guide/hpe-apollo-4200-gen9/drive-leds.md index 67ecd8a5..b6d2955e 100644 --- a/hardware-guide/hpe-apollo-4200-gen9/drive-leds.md +++ b/hardware-guide/hpe-apollo-4200-gen9/drive-leds.md @@ -111,7 +111,7 @@ The following table explains the various combinations of the two LFF LEDs. To locate the SFF drive LEDs, use the following diagram. -{% capture alt_tag %}Small form factor (SFF) drive LEDs on the {[site.a4200g9}} node{% endcapture %} +{% capture alt_tag %}Small form factor (SFF) drive LEDs on the {{site.a4200g9}} node{% endcapture %} {% include image.html alt=alt_tag file="sff-led-guide.png" %} 1. **Locate LED** diff --git a/spellcheck.rb b/spellcheck.rb index cc354ab9..b6ce49ca 100644 --- a/spellcheck.rb +++ b/spellcheck.rb @@ -22,8 +22,10 @@ def preprocess_content(content, filename, allowlist_words) end content - .gsub(/\{%\s*capture\s+[\s\S]*?%\}[\s\S]*?\{%\s*endcapture\s*%\}/m, '') # Ignore Liquid capture tags comprised entirely of JSON - .gsub(/\{%\s*capture\s+[^\s]+\s*%\}/, ' ') # Ignore variable capture statements + .gsub(/\{\{.+?\}\}/, ' ') # Ignore Liquid variables + .gsub(/{%\s*include\s+shared_image\.html.*%}/, ' ') # Ignore Liquid shared images + .gsub(/{%\s*capture\s+[^\s]+\s*%\}\s*(.*){%\s?endcapture\s?%}/, '\1') + .gsub(/{%\s?capture[^}]*}(?:\n)?{(?:.*\n)*^}(?:.*\n)?{%\s?endcapture\s?%}/m, ' ') # Ignore capture statements comprised entirely of JSON .gsub(/content=\S+\s+%}/, ' ') # Ignore usage of captured variables .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') # Ignore Markdown links, keeping only the text within square brackets .gsub(/{%\s*include\s+content-reuse\/[^\n%]+\.md(?:\s+\w+="[^"]*")*\s*%}/, ' ') # Ignore transcludes @@ -63,8 +65,6 @@ def preprocess_content(content, filename, allowlist_words) .gsub(/{%\s*assign\s+\w+\s*=.*?%}/m, ' ') # Ignore Liquid {% assign %} tags .gsub(/{%\s*comment\s*%}.*?{%\s*endcomment\s*%}/m, ' ') # Ignore Liquid comments .gsub(/{%\s*include image\.html .*?%}/m, ' ') # Ignore Liquid images - .gsub(/{%\s*include\s+shared_image\.html[\s\S]+?%}/, ' ') - .gsub(/\{\{.+?\}\}/, ' ') # Ignore Liquid variables .gsub(/var[[:alpha:]]*/, ' ') # Ignore local variables in YAML .gsub(/\{%\s*endcapture\s*%\}/, ' ') # Ignore {% endcapture %} Liquid tags .gsub(/\{%\s*endif\s*%\}/, ' ') # Ignore {% endif %} Liquid tags