Should SourceCodePositioner
(and other classes) consider all kinds of line breaks?
#3972
-
Currently the PMD class Would it make sense to adjust |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
PMD 7 does consider all of I'm not sure it makes sense to change this in PMD 6. SourceCodePositioner does work with |
Beta Was this translation helpful? Give feedback.
PMD 7 does consider all of
\n
,\r
, and\r\n
- the PR is still pending: #3893 (comment)I'm not sure it makes sense to change this in PMD 6. SourceCodePositioner does work with
\r\n
because splitting lines on\n
also splits correctly\r\n
(see #3893 (comment)), and so text coordinates work the same. It doesn't support single\r
, but that's AFAIK only used on machines that are relatively rare nowadays: https://en.wikipedia.org/wiki/Newline#Representation