[ExtendScript] Incorrect paragraph count when linefeeds are used.
MacOS 13.3.1, Adobe Illustrator 27.4.1
To see the issue, run this script:
```
(function () {
var doc = app.documents.add();
var tf1 = doc.textFrames.add();
tf1.position = [100, 100];
tf1.contents = 'Paragraph one\u000DParagraph two';
var tf2 = doc.textFrames.add();
tf2.position = [200, 100];
tf2.contents = 'Paragraph one\u0003still paragraph one';
alert('Paragraph counts\n2 paragraphs: ' + tf1.paragraphs.length + '\n1 paragraphs with forced line break:\n ' + tf2.paragraphs.length);
})();
```
I expect the left text frame to have 2 paragraphs and the right text frame to have 1 paragraph, but the right text frame is incorrectly shown to have 2 paragraphs.
This discussion revolves around this issue.
Also, because the issue relates to conflating U+000A and U+000D, this bug may be implicated in this bug, this bug and this bug.
3
votes
m1b
shared this idea