fix(lint): correct typos
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 18s

This commit is contained in:
2025-06-25 19:29:51 +02:00
parent 7bddd42ca7
commit 01c2d4b8b9

View File

@@ -9,7 +9,7 @@ pub const Token = struct {
}; };
pub const Tag = enum(u8) { pub const Tag = enum(u8) {
asterik, asterisk,
block, block,
eof, eof,
hashtag, hashtag,
@@ -26,7 +26,7 @@ pub const Token = struct {
pub fn lexeme(tag: Tag) ?[]const u8 { pub fn lexeme(tag: Tag) ?[]const u8 {
return switch (tag) { return switch (tag) {
.asterik => "*", .asterisk => "*",
.minus => "-", .minus => "-",
.tick => "`", .tick => "`",
.underscore => "_", .underscore => "_",
@@ -152,7 +152,7 @@ pub const Tokenizer = struct {
result.tag = .text; result.tag = .text;
} else { } else {
index += 1; index += 1;
result.tag = .asterik; result.tag = .asterisk;
}, },
'#' => if (result.loc.start != index) { '#' => if (result.loc.start != index) {
result.tag = .text; result.tag = .text;
@@ -347,8 +347,8 @@ test "paragraphs" {
} }
test "styling" { test "styling" {
try testTokenize("*Test with _same_ more text*", &.{ .asterik, .text, .underscore, .text, .underscore, .text, .asterik }); try testTokenize("*Test with _same_ more text*", &.{ .asterisk, .text, .underscore, .text, .underscore, .text, .asterisk });
try testTokenize("*`~_test_~`*", &.{ .asterik, .tick, .text, .underscore, .text, .underscore, .text, .tick, .asterik }); try testTokenize("*`~_test_~`*", &.{ .asterisk, .tick, .text, .underscore, .text, .underscore, .text, .tick, .asterisk });
} }
test "links" { test "links" {