Skip to content

Commit

Permalink
chore: fix misspellings (#1040)
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Hesketh <[email protected]>
  • Loading branch information
szepeviktor and a-h authored Jan 21, 2025
1 parent 34660b3 commit 725a88f
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please make sure you're using the latest version of the templ CLI (`go install g
A clear and concise description of what the bug is.

**To Reproduce**
A small, self-container, complete reproduction, uploaded to a Github repo, containing the minimum amount of files required to reproduce the behaviour, along with a list of commands that need to be run. Keep it simple.
A small, self-container, complete reproduction, uploaded to a GitHub repo, containing the minimum amount of files required to reproduce the behaviour, along with a list of commands that need to be run. Keep it simple.

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.822
0.3.826
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ git diff --exit-code

### push-release-tag

Push a semantic version number to Github to trigger the release process.
Push a semantic version number to GitHub to trigger the release process.

```sh
./push-tag.sh
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The latest version of templ is supported.

## Reporting a Vulnerability

Use the "Security" tab in Github and fill out the "Report a vulnerability" form.
Use the "Security" tab in GitHub and fill out the "Report a vulnerability" form.
6 changes: 3 additions & 3 deletions cmd/templ/lspcmd/lsp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,11 @@ func TestDocumentSymbol(t *testing.T) {
}
}

expectdSlice, err := sliceToAnySlice(test.expect)
expectedSlice, err := sliceToAnySlice(test.expect)
if err != nil {
t.Errorf("failed to convert expect to any slice: %v", err)
}
diff := cmp.Diff(expectdSlice, actual)
diff := cmp.Diff(expectedSlice, actual)
if diff != "" {
t.Errorf("unexpected document symbol: %v", diff)
}
Expand Down Expand Up @@ -843,7 +843,7 @@ func Setup(ctx context.Context, log *zap.Logger) (clientCtx context.Context, app
var wg sync.WaitGroup
var cmdErr error

// Copy from the LSP to the CLient, and vice versa.
// Copy from the LSP to the Client, and vice versa.
fromClient, toLSP := io.Pipe()
fromLSP, toClient := io.Pipe()
clientStream := jsonrpc2.NewStream(newStdRwc(log, "clientStream", toLSP, fromLSP))
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-quick-start/01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ With Go 1.23 or greater installed, run:
go install github.com/a-h/templ/cmd/templ@latest
```

## Github binaries
## GitHub binaries

Download the latest release from https://github.com/a-h/templ/releases/latest

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/03-syntax-and-usage/12-script-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ templ page(content string) {
}
```

The data passed into the Javascript funtion will be JSON encoded, which then can be used inside the function.
The data passed into the Javascript function will be JSON encoded, which then can be used inside the function.

```go title="main.go"
package main
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/09-developer-tools/02-ide-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ end

### Troubleshooting

If you cannot run `:TSInstall templ`, ensure you have an up-to-date version of [tree-sitter](https://github.com/nvim-treesitter/nvim-treesitter). The [package for templ](https://github.com/vrischmann/tree-sitter-templ) was [added to the main tree-sitter repositry](https://github.com/nvim-treesitter/nvim-treesitter/pull/5667) so you shouldn't need to install a separate plugin for it.
If you cannot run `:TSInstall templ`, ensure you have an up-to-date version of [tree-sitter](https://github.com/nvim-treesitter/nvim-treesitter). The [package for templ](https://github.com/vrischmann/tree-sitter-templ) was [added to the main tree-sitter repository](https://github.com/nvim-treesitter/nvim-treesitter/pull/5667) so you shouldn't need to install a separate plugin for it.

If you still don't get syntax highlighting after it's installed, try running `:TSBufEnable highlight`. If you find that you need to do this every time you open a .templ file, you can run this autocmd to do it for your neovim configuation.
If you still don't get syntax highlighting after it's installed, try running `:TSBufEnable highlight`. If you find that you need to do this every time you open a .templ file, you can run this autocmd to do it for your neovim configuration.

```lua
vim.api.nvim_create_autocmd("BufEnter", { pattern = "*.templ", callback = function() vim.cmd("TSBufEnable highlight") end })
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/09-developer-tools/03-live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ templ generate --notify-proxy --proxybind="localhost" --proxyport="8080"
wgo -file=.go -file=.templ -xfile=_templ.go templ generate :: go run main.go
```

To avoid a continous reloading files ending with `_templ.go` should be skipped via `-xfile`.
To avoid a continuous reloading files ending with `_templ.go` should be skipped via `-xfile`.

## Alternative 2: air

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/09-developer-tools/05-llm.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Coding assistants / LLMs

To provide AI coding assistants such as Github Copilot, Cursor or similar with help on how to write templ code, the templ project maintains a single file containing documentation for LLMs to read.
To provide AI coding assistants such as GitHub Copilot, Cursor or similar with help on how to write templ code, the templ project maintains a single file containing documentation for LLMs to read.

You can find the file at `https://templ.guide/llms.md`.

## LLM tools

### https://github.com/CopilotC-Nvim/CopilotChat.nvim

CopilotChat is a plugin for Neovim that provides a chat interface for Github Copilot. It allows you to ask Copilot questions and get responses in real-time.
CopilotChat is a plugin for Neovim that provides a chat interface for GitHub Copilot. It allows you to ask Copilot questions and get responses in real-time.

Use the URL feature to load `https://templ.guide/llms.md`.
2 changes: 1 addition & 1 deletion docs/docs/10-security/03-code-signing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code signing

Binaries are created by the Github Actions workflow at https://github.com/a-h/templ/blob/main/.github/workflows/release.yml
Binaries are created by the GitHub Actions workflow at https://github.com/a-h/templ/blob/main/.github/workflows/release.yml

Binaries are signed by cosign. The public key is stored in the repository at https://github.com/a-h/templ/blob/main/cosign.pub

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/13-experimental/02-urlbuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ templ component(o Order) {
}
```

See [URL Attribures](/syntax-and-usage/attributes#url-attributes) for more information.
See [URL Attributes](/syntax-and-usage/attributes#url-attributes) for more information.

## Feedback

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/14-help-and-community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Use the #templ channel in the Gopher Slack community.

https://invite.slack.golangbridge.org/

## Github Discussion
## GitHub Discussion

https://github.com/a-h/templ/discussions
4 changes: 2 additions & 2 deletions generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ func (g *generator) writeAttributeCSS(indentLevel int, attr parser.ExpressionAtt
}
// Create a class name for the style.
// The expression can either be expecting a templ.Classes call, or an expression that returns
// var templ_7745c5c3_CSSClassess = []any{
// var templ_7745c5c3_CSSClasses = []any{
classesName := g.createVariableName()
if _, err = g.w.WriteIndent(indentLevel, "var "+classesName+" = []any{"); err != nil {
return
Expand All @@ -1028,7 +1028,7 @@ func (g *generator) writeAttributeCSS(indentLevel int, attr parser.ExpressionAtt
return
}
// Render the CSS before the element if required.
// templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_CSSClassess...)
// templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_CSSClasses...)
if _, err = g.w.WriteIndent(indentLevel, "templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, "+classesName+"...)\n"); err != nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion generator/test-css-usage/expected.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="a c">Maps can be used to determine if a class should be added or not.</div>
<style type="text/css">.e_739d4573{font-size:14pt;}</style>
<div class="a c e_739d4573">KV can be used to conditionally set classes.</div>
<div class="bg-violet-500 hover:bg-red-600 hover:bg-sky-700 text-[#50d71e] w-[calc(100%-4rem)">Psuedo attributes and complex class names are supported.</div>
<div class="bg-violet-500 hover:bg-red-600 hover:bg-sky-700 text-[#50d71e] w-[calc(100%-4rem)">Pseudo attributes and complex class names are supported.</div>
<div class="a&#34; onClick=&#34;alert(&#39;hello&#39;)&#34;">
Class names are HTML escaped.
</div>
Expand Down
6 changes: 3 additions & 3 deletions generator/test-css-usage/template.templ
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ templ KVCanBeUsedToConditionallySetClasses() {
}

// Pseudo attributes can be used without any special syntax.
templ PsuedoAttributesAndComplexClassNamesAreSupported() {
<div class={ "bg-violet-500", "hover:bg-red-600", "hover:bg-sky-700", "text-[#50d71e]", "w-[calc(100%-4rem)" }>Psuedo attributes and complex class names are supported.</div>
templ PseudoAttributesAndComplexClassNamesAreSupported() {
<div class={ "bg-violet-500", "hover:bg-red-600", "hover:bg-sky-700", "text-[#50d71e]", "w-[calc(100%-4rem)" }>Pseudo attributes and complex class names are supported.</div>
}

// Class names are HTML escaped.
Expand Down Expand Up @@ -89,7 +89,7 @@ templ TestComponent() {
@CSSComponentsAndConstantsAreSupported()
@MapsCanBeUsedToConditionallySetClasses()
@KVCanBeUsedToConditionallySetClasses()
@PsuedoAttributesAndComplexClassNamesAreSupported()
@PseudoAttributesAndComplexClassNamesAreSupported()
@ClassNamesAreHTMLEscaped()
@CSSComponentsCanBeUsedWithArguments()
@Rotate(45)
Expand Down
6 changes: 3 additions & 3 deletions generator/test-css-usage/template_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ func TestHandler(t *testing.T) {
}
// Expect the status code to be 201, not 400, because in streaming mode,
// we have to write the header before we can call the error handler.
if actualRepsonseCode := w.Result().StatusCode; http.StatusCreated != actualRepsonseCode {
t.Errorf("expected status %d, got %d", http.StatusCreated, actualRepsonseCode)
if actualResponseCode := w.Result().StatusCode; http.StatusCreated != actualResponseCode {
t.Errorf("expected status %d, got %d", http.StatusCreated, actualResponseCode)
}
// Expect the body to be "BodyError message", not just "Error message" because
// in streaming mode, we've already written part of the body to the response, unlike in
Expand Down
4 changes: 2 additions & 2 deletions parser/v2/ifexpressionparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (ifExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error) {
return r, false, nil
}

// Parse the Go if expresion.
// Parse the Go if expression.
if r.Expression, err = parseGo("if", pi, goexpression.If); err != nil {
return r, false, err
}
Expand Down Expand Up @@ -78,7 +78,7 @@ func (elseIfExpressionParser) Parse(pi *parse.Input) (r ElseIfExpression, ok boo

// Rewind to the start of the `if` statement.
pi.Seek(pi.Index() - 2)
// Parse the Go if expresion.
// Parse the Go if expression.
if r.Expression, err = parseGo("else if", pi, goexpression.If); err != nil {
return r, false, err
}
Expand Down
4 changes: 2 additions & 2 deletions parser/v2/switchexpressionparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (switchExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error
return
}

// Parse the Go switch expresion.
// Parse the Go switch expression.
if r.Expression, err = parseGo("switch", pi, goexpression.Switch); err != nil {
return r, false, err
}
Expand Down Expand Up @@ -67,7 +67,7 @@ var caseExpressionStartParser = parse.Func(func(pi *parse.Input) (r Expression,
pi.Seek(start)
return r, false, nil
}
// Parse the Go expresion.
// Parse the Go expression.
if r, err = parseGo("case", pi, goexpression.Case); err != nil {
return r, false, err
}
Expand Down
4 changes: 2 additions & 2 deletions parser/v2/textparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestTextParser(t *testing.T) {
},
},
{
name: "Multiline text is colected line by line",
name: "Multiline text is collected line by line",
input: "Line 1\nLine 2",
expected: Text{
Value: "Line 1",
Expand All @@ -92,7 +92,7 @@ func TestTextParser(t *testing.T) {
},
},
{
name: "Multiline text is colected line by line (Windows)",
name: "Multiline text is collected line by line (Windows)",
input: "Line 1\r\nLine 2",
expected: Text{
Value: "Line 1",
Expand Down
2 changes: 1 addition & 1 deletion safehtml/style_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestSanitizeCSS(t *testing.T) {
expectedValue: InnocuousPropertyValue,
},
{
name: "background-image invalid sufix",
name: "background-image invalid suffix",
inputProperty: "background-image",
expectedProperty: "background-image",
inputValue: `url("/img.png`,
Expand Down

0 comments on commit 725a88f

Please sign in to comment.