Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion _data/maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ maintainers:
- name: Eddie Knight
organization: Sonatype
github: eddie-knight
- name: Jason Meridth
organization: Chainguard
github: jmeridth

emeritus:
- name: Travis Truman
organization: CVS Health
github: trumant

8 changes: 8 additions & 0 deletions community/maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ Gemara is maintained by a group of contributors across the community. These
folks review contributions, guide the project's direction, and are happy to
help you get started.

## Active Maintainers

{% for maintainer in site.data.maintainers.maintainers %}
- {{ maintainer.name }}, {{ maintainer.organization }} (@{{ maintainer.github }})
{% endfor %}

## Emeritus Maintainers

{% for maintainer in site.data.maintainers.emeritus %}
- {{ maintainer.name }}, {{ maintainer.organization }} (@{{ maintainer.github }})
{% endfor %}

Want to get involved? See the [Contributing guide](/community/contributing)
or come find us on [Slack](https://openssf.slack.com/archives/C09A9PP765Q).
5 changes: 5 additions & 0 deletions tools/internal/cmd/termlinker.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ func processLine(line string, termInfos []TermInfo, defPath string) string {
// Find all existing markdown links, inline code, and HTML tags to skip
linkPattern := regexp.MustCompile(`\[([^\]]+)\]\([^\)]+\)`)
inlineCodePattern := regexp.MustCompile("`[^`]+`")
liquidPattern := regexp.MustCompile(`\{\{.*?\}\}|\{%.*?%\}`)
// Match HTML tags: <tag>, </tag>, <tag/>, <tag attr="value">, etc.
// This regex matches opening tags, closing tags, and self-closing tags
htmlTagPattern := regexp.MustCompile(`<[^>]+>`)
Expand Down Expand Up @@ -537,6 +538,7 @@ func processLine(line string, termInfos []TermInfo, defPath string) string {
// Rebuild skip ranges after each replacement
linkRanges := linkPattern.FindAllStringIndex(result, -1)
codeRanges := inlineCodePattern.FindAllStringIndex(result, -1)
liquidRanges := liquidPattern.FindAllStringIndex(result, -1)
htmlRanges := htmlTagPattern.FindAllStringIndex(result, -1)

// Find HTML tag pairs (opening and closing tags) to skip ALL content between them
Expand All @@ -550,6 +552,9 @@ func processLine(line string, termInfos []TermInfo, defPath string) string {
for _, r := range codeRanges {
skipRanges = append(skipRanges, rangeInfo{start: r[0], end: r[1]})
}
for _, r := range liquidRanges {
skipRanges = append(skipRanges, rangeInfo{start: r[0], end: r[1]})
}
// Add HTML tags themselves
for _, r := range htmlRanges {
skipRanges = append(skipRanges, rangeInfo{start: r[0], end: r[1]})
Expand Down
23 changes: 23 additions & 0 deletions tools/internal/cmd/termlinker_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cmd

import (
"regexp"
"testing"
)

func TestProcessContentPreservesLiquidOutput(t *testing.T) {
termInfos := []TermInfo{{
OriginalTerm: "organization",
Slug: "organization",
Regex: regexp.MustCompile(`(?i)\borganization\b`),
}}
for _, content := range []string{
"{{ maintainer.organization }}",
"{{ organization | append: \"}\" }}",
"{% assign organization = \"100%\" %}",
} {
if got := processContent(content, termInfos, "../model/02-definitions.html"); got != content {
t.Fatalf("processContent() = %q, want %q", got, content)
}
}
}
Loading