Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] partialMatch does not match if text that would ordinarily be matched is preceded by newlines #24

Open
notcancername opened this issue Jun 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@notcancername
Copy link

notcancername commented Jun 19, 2023

partialMatch does not match after newlines:

const std = @import("std");
const Regex = @import("zig-regex/src/regex.zig").Regex;

test "partialMatch after newlines" {
    var reg = try Regex.compile(std.testing.allocator, "a");
    defer reg.deinit();
    try std.testing.expect(try reg.partialMatch("\na")); // fails
}
@tiehuis
Copy link
Owner

tiehuis commented Jun 19, 2023

This should be true.

@notcancername
Copy link
Author

Seems like a bug then.

@notcancername notcancername changed the title Intended newline behavior of partialMatch [bug] partialMatch does not match if text that would ordinarily be matched is preceded by newlines Jun 19, 2023
@notcancername notcancername changed the title [bug] partialMatch does not match if text that would ordinarily be matched is preceded by newlines [bug] partialMatch does not match if text that would ordinarily be matched if preceded by newlines Jun 19, 2023
@notcancername notcancername changed the title [bug] partialMatch does not match if text that would ordinarily be matched if preceded by newlines [bug] partialMatch does not match if text that would ordinarily be matched is preceded by newlines Jun 19, 2023
@tiehuis tiehuis added the bug Something isn't working label Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants