-
-
Notifications
You must be signed in to change notification settings - Fork 767
Comment.getShortSummary does not work for Windows line ending \r\n #3093
Copy link
Copy link
Open
Description
Search terms
Comment, getShortSummary, windows, line ending, CRLF
Expected Behavior
For a comment object like
"comment": {
"summary": [
{
"kind": "text",
"text": "First\r\n\r\nSecond"
}
]
},getShortSummary should return "First"
Actual Behavior
It returns First\r\n\r\nSecond
Steps to reproduce the bug
it("Handles a multi-paragraph comment with Windows line ending", () => {
const comment = new Comment([
{
kind: "text",
text: "Paragraph one\r\n\r\nParagraph two",
},
]);
equal(comment.getShortSummary(true), [
{ kind: "text", text: "Paragraph one" },
]);
});Other
Looks like the cause might be pretty straightforward as the code only checks for \n\n
typedoc/src/lib/models/Comment.ts
Line 470 in d743a1c
| return part.text.includes("\n\n"); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels