Skip to content

Commit

Permalink
fix: use correct URL in regex assembly standard header
Browse files Browse the repository at this point in the history
  • Loading branch information
theseion committed Sep 15, 2023
1 parent f9353bf commit 8d5f63a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/regex_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/coreruleset/crs-toolchain/regex/processors"
)

const regexAssemblyStandardHeader = "##! Please refer to the documentation at\n##! https://coreruleset.org/docs/development/crs_toolchain/.\n"
const regexAssemblyStandardHeader = "##! Please refer to the documentation at\n##! https://coreruleset.org/docs/development/regex_assembly/.\n"

// formatCmd represents the generate command
var formatCmd = createFormatCommand()
Expand Down Expand Up @@ -285,8 +285,8 @@ func formatEndOfFile(lines []string) []string {
}

func checkStandardHeader(lines []string) bool {
if len(lines) > 2 &&
lines[0]+lines[1] == regexAssemblyStandardHeader {
if len(lines) >= 3 &&
fmt.Sprintf("%s\n%s\n%s", lines[0], lines[1], lines[2]) == regexAssemblyStandardHeader {
return true
}
return false
Expand Down

0 comments on commit 8d5f63a

Please sign in to comment.