aboutsummaryrefslogtreecommitdiff
path: root/src/mdx/mdx_parser.zig
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2023-01-10 15:35:20 +0200
committerGravatar GitHub <noreply@github.com> 2023-01-10 05:35:20 -0800
commit270b07e85e82b46491cc713fb2a5bb973d3de4f6 (patch)
treeb8071eaf835f2aefb8ee95c68f9002d84b7b5761 /src/mdx/mdx_parser.zig
parentb458abedbb865461005757cac5ea2b458249ef25 (diff)
downloadbun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.tar.gz
bun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.tar.zst
bun-270b07e85e82b46491cc713fb2a5bb973d3de4f6.zip
use `strings.hasPrefixComptime()` (#1755)
Diffstat (limited to 'src/mdx/mdx_parser.zig')
-rw-r--r--src/mdx/mdx_parser.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mdx/mdx_parser.zig b/src/mdx/mdx_parser.zig
index b44ab239a..3b2064c39 100644
--- a/src/mdx/mdx_parser.zig
+++ b/src/mdx/mdx_parser.zig
@@ -1043,9 +1043,8 @@ pub const MDParser = struct {
}
// Scan for end of the line.
- while (off + 3 < this.size and
- !(strings.eqlComptimeIgnoreLen(this.source.contents.ptr[off..][0..4], "\n\n\n\n") or
- strings.eqlComptimeIgnoreLen(this.source.contents.ptr[off..][0..4], "\r\n\r\n")))
+ while (!(strings.hasPrefixComptime(this.source.contents.ptr[off..], "\n\n\n\n") or
+ strings.hasPrefixComptime(this.source.contents.ptr[off..], "\r\n\r\n")))
{
off += 4;
}