Skip to content

Commit

Permalink
chore: fix typos found by go-report-card
Browse files Browse the repository at this point in the history
  • Loading branch information
bevzzz committed Jan 15, 2024
1 parent 688926e commit 89dabc7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion render/html/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion render/html/wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func (n *node) cmp(other *stdhtml.Node, status *htmlDiff) {
}
}

// findFirst fast-forwards to the first ocurrence of the <target> node and returns it.
// findFirst fast-forwards to the first occurrence of the <target> 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 {
Expand Down
4 changes: 2 additions & 2 deletions render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 89dabc7

Please sign in to comment.