From 89dabc79e2450661ffded89f7059d079d8ae8538 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Mon, 15 Jan 2024 13:30:13 +0100 Subject: [PATCH] chore: fix typos found by go-report-card --- render/html/wrapper.go | 2 +- render/html/wrapper_test.go | 2 +- render/render.go | 4 ++-- schema/schema.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/render/html/wrapper.go b/render/html/wrapper.go index ff6f883..e3b186e 100644 --- a/render/html/wrapper.go +++ b/render/html/wrapper.go @@ -276,10 +276,10 @@ func (attrs attributes) WriteTo(w io.Writer) (n64 int64, err error) { return sorted[i].Key < sorted[j].Key }) - // class="" for _, attr := range sorted { s := " " if attr.IsBool { + // FIXME: 'continue' prevents the attribute from being written. s += attr.Key continue } diff --git a/render/html/wrapper_test.go b/render/html/wrapper_test.go index 87767e0..42f0a17 100644 --- a/render/html/wrapper_test.go +++ b/render/html/wrapper_test.go @@ -681,7 +681,7 @@ func (n *node) cmp(other *stdhtml.Node, status *htmlDiff) { } } -// findFirst fast-forwards to the first ocurrence of the node and returns it. +// findFirst fast-forwards to the first occurrence of the node and returns it. // If the node is not in the tree, it will return nil. func findFirst(n *stdhtml.Node, target string) *stdhtml.Node { if n.Type == stdhtml.ElementNode && n.Data == target { diff --git a/render/render.go b/render/render.go index 862333c..8be3db5 100644 --- a/render/render.go +++ b/render/render.go @@ -13,7 +13,7 @@ type Renderer interface { // Render writes the contents of the notebook cells it supports. // // Implementations should not error on cell types, for which no RenderCellFunc is registered. - // This is expected, as some [RawCells] will be renderered in some output formats and ignored in others. + // This is expected, as some [RawCells] will be rendered in some output formats and ignored in others. // // [RawCells]: https://nbformat.readthedocs.io/en/latest/format_description.html#raw-nbconvert-cells Render(io.Writer, schema.Notebook) error @@ -101,7 +101,7 @@ func (r *renderer) AddOptions(opts ...Option) { // Register registers a new RenderCellFunc for the cell type. // -// Any previously registered functions will be overriden. All configurations +// Any previously registered functions will be overridden. All configurations // should be done the first call to Render(), as later changes will have no effect. func (r *renderer) Register(t schema.CellTypeMixed, f RenderCellFunc) { r.renderCellFuncsTmp[t] = f diff --git a/schema/schema.go b/schema/schema.go index b8c8556..a1aaffb 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -33,7 +33,7 @@ type Cell interface { MimeType() string Text() []byte - // Type will be superceeded with CellType in the following commits. + // Type will be superseded with CellType in the following commits. Type() CellTypeMixed }