reFind regression

Description

https://github.com/lucee/lucee-docs/blob/master/api/rendering/SyntaxHighlighter.cfc#L45

lucee.runtime.exp.NativeException: begin -1, end -1, length 3877 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319) at java.base/java.lang.String.substring(String.java:1874) at lucee.runtime.regex.Perl5Util.getMatchStruct(Perl5Util.java:187) at lucee.runtime.regex.Perl5Util.find(Perl5Util.java:141) at lucee.runtime.regex.Perl5Regex.find(Perl5Regex.java:65) at lucee.runtime.functions.string.REFind.call(REFind.java:57) at lucee.runtime.functions.string.REFind.call(REFind.java:45)

<h1>ReFind test case LDEV-3066</h1> <cfscript> dump(server.lucee.version); startPos=840; text = FileRead("https://raw.githubusercontent.com/lucee/lucee-docs/master/docs/06.docs/02.markdown/page.md"); referenceRegex = "```([a-z\+]+)?\n(.*?)\n```"; dump(arguments); flush; match = ReFind( referenceRegex, text, startPos, true ); dump(match); </cfscript>

Environment

None

Attachments

2
  • 23 Oct 2020, 08:02 am
  • 20 Oct 2020, 04:31 pm

is caused by

Activity

Show:

Zac Spitzer 14 April 2021 at 14:51

the test case was in CRLF, not LF and the test was expecting LF

https://github.com/lucee/Lucee/commit/9b99fbcc6fdc48a36a65979752df35b55cdc1ea2

Zac Spitzer 28 February 2021 at 09:32
Edited

this test is failing on Windows with Lucee 6.0 and 5.3.8

[java] [script] Failed: test.tickets.LDEV3103.check refind ---> Expected [3] but received [1] [java] [script] at [java] [script] C:\work\lucee\test\tickets\LDEV3103.cfc:25

Pothys - MitrahSoft 4 December 2020 at 05:30

As per the reporter said I close this ticket

Zac Spitzer 3 December 2020 at 13:56

sure

Fixed

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 20 October 2020 at 16:31
Updated 21 June 2021 at 14:55
Resolved 4 December 2020 at 05:30

Flag notifications