Skip to content

Commit

Permalink
Merge pull request #41 from tarikjaber/main
Browse files Browse the repository at this point in the history
Fix typos found with typos cli
  • Loading branch information
kristoff-it authored Nov 6, 2024
2 parents f5f59d0 + 255bf24 commit dbb0d1f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Ast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub fn init(
) orelse continue;
const new_node_idx: u32 = @intCast(p.nodes.items.len - 1);

// Iterface and block mode
// Interface and block mode
switch (new_node.kind) {
.root, .super_block => unreachable,
.super, .element, .ctx => {},
Expand Down Expand Up @@ -478,7 +478,7 @@ const Parser = struct {
// "unexpected_extend",
// "UNEXPECTED EXTEND TAG",
// \\The <extend> tag can only be present at the beginning of a
// \\template and it can only be preceeded by HTML comments and
// \\template and it can only be preceded by HTML comments and
// \\whitespace.
// ,
// );
Expand Down
4 changes: 2 additions & 2 deletions src/cli/check.zig
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ const Command = struct {
\\
\\Options:
\\
\\ --stdin Format bytes from stdin and ouptut to stdout.
\\ Mutually exclusive with other input aguments.
\\ --stdin Format bytes from stdin and output to stdout.
\\ Mutually exclusive with other input arguments.
\\
\\ --stdin-super Same as --stdin but for SuperHTML files.
\\
Expand Down
6 changes: 3 additions & 3 deletions src/cli/fmt.zig
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ const Command = struct {
\\
\\Options:
\\
\\ --stdin Format bytes from stdin and ouptut to stdout.
\\ Mutually exclusive with other input aguments.
\\ --stdin Format bytes from stdin and output to stdout.
\\ Mutually exclusive with other input arguments.
\\
\\ --stdin-super Same as --stdin but for SuperHTML files.
\\
\\ --check List non-conforming files and exit with an
\\ error if the list is not empty.
\\
\\ --help, -h Prints this help and extits.
\\ --help, -h Prints this help and exits.
, .{});

std.process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/lsp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ pub const Handler = struct {
return null;
}

/// Handle a reponse that we have received from the client.
/// Handle a response that we have received from the client.
/// Doesn't usually happen unless we explicitly send a request to the client.
pub fn response(self: Handler, _response: Message.Response) !void {
_ = self;
Expand Down
4 changes: 2 additions & 2 deletions src/html/Ast.zig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub const Node = struct {
open: Span,
/// Span covering end_tag, diamond brackets included
/// Unset status is represented by .start = 0 and .end = 0
/// not set for doctype, element_void and elment_self_closing
/// not set for doctype, element_void and element_self_closing
close: Span = .{ .start = 0, .end = 0 },

parent_idx: u32 = 0,
Expand Down Expand Up @@ -391,7 +391,7 @@ pub fn init(
.return_attrs = true,
};
const tag_src = current.open.slice(src);
// all early exit brances are in the case of
// all early exit branches are in the case of
// malformed HTML and we also expect in all of
// those cases that errors were already emitted
// by the tokenizer
Expand Down
8 changes: 4 additions & 4 deletions src/html/Tokenizer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const State = union(enum) {
doctype_public_identifier_single: Token.Doctype,
after_doctype_public_identifier: Token.Doctype,

beteen_doctype_public_and_system_identifiers: Token.Doctype,
between_doctype_public_and_system_identifiers: Token.Doctype,
after_doctype_system_kw: Token.Doctype,

before_doctype_system_identifier: Token.Doctype,
Expand Down Expand Up @@ -674,7 +674,7 @@ fn next2(self: *Tokenizer, src: []const u8) ?struct {
// Entering this state would have to be triggered by the
// parser, but we never do it as we consider plaintext a
// deprecated and unsupported tag (ie we emit an error
// and treat it like a normal tag to contiue parsing).
// and treat it like a normal tag to continue parsing).
unreachable;
// if (!self.consume(src)) {
// // EOF
Expand Down Expand Up @@ -4456,7 +4456,7 @@ fn next2(self: *Tokenizer, src: []const u8) ?struct {
// Switch to the between DOCTYPE public and system identifiers state.
'\t', '\n', '\r', form_feed, ' ' => {
self.state = .{
.beteen_doctype_public_and_system_identifiers = state,
.between_doctype_public_and_system_identifiers = state,
};
},
// U+0022 QUOTATION MARK (")
Expand Down Expand Up @@ -4529,7 +4529,7 @@ fn next2(self: *Tokenizer, src: []const u8) ?struct {
}
},
// https://html.spec.whatwg.org/multipage/parsing.html#between-doctype-public-and-system-identifiers-state
.beteen_doctype_public_and_system_identifiers => |state| {
.between_doctype_public_and_system_identifiers => |state| {
if (!self.consume(src)) {
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's force-quirks flag to on. Emit the current DOCTYPE token. Emit an end-of-file token.
Expand Down

0 comments on commit dbb0d1f

Please sign in to comment.