Skip to content

Commit

Permalink
Resolved the last of the regex issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
shefulloflight committed Feb 6, 2025
1 parent e1a8e4e commit 0667473
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hardware-guide/hpe-apollo-4200-gen9/drive-leds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
8 changes: 4 additions & 4 deletions spellcheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0667473

Please sign in to comment.