Project

Profile

Help

Bug #3417

closed

unparsed-text-lines() incorrect behaviour with blank lines

Added by John Lumley about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-08-29
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Tests fn-uparsed-text-lines-5[3|4] fail due to incorrect handling of blank lines. This is for two reasons:

  1. Iter.oneToOne .next()@, when provided with a @ForArray argument, tests for an end of sequence value item = _base.next() by using !item@. Unfortunately in this case, under @unparsed-text-lines()@, the input is a series of JavaScript strings, for which @!"" is true@!. Hence the result is terminated at the first blank line. Switching the test to @item === null seems to sort the problem

  2. The logic on CoreFn.unparsed-text-lines does not handle a blank line as the last, i.e. when the last character is a line break, for which that blank line should be ommitted from the result.

Actions #1

Updated by John Lumley about 7 years ago

  • Fix Committed on JS Branch 1.0, Trunk added
Actions #2

Updated by John Lumley about 7 years ago

  • Status changed from New to Resolved
Actions #3

Updated by Debbie Lockett about 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.0.2

Bug fix applied in Saxon-JS 1.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page