On Sun, May 23, 2021 at 2:50 PM Rob <[email protected]> wrote: The result of both the Extract command and [g.getScript] is the same; all > trailing blank lines are stripped out. > > Is this by design? If so, what is the rationale? >
These are two very different questions: - For Extract, the present behavior comes from the call to rstrip in the createLastChildNode helper function. I have just created #1955 <https://github.com/leo-editor/leo-editor/issues/1955> for this, and fixed it via PR #1956 <https://github.com/leo-editor/leo-editor/pull/1956>. The new code is in the ekr-extract branch. Please give it a look. I'll merge ekr-extract into devel tomorrow Notes: 1: #1742 <https://github.com/leo-editor/leo-editor/issues/1742> and PR #1745 <https://github.com/leo-editor/leo-editor/pull/1745> (concerning LeoBody.getSelectionLines) is not involved, apparently. 2: The new code caused several unit tests to fail. Happily, the fix was to remove a strange hack (@nonl) in a headline of the tests. - For g.getScript, the present behavior arise from at.stringToString, which can not (will not :-) be changed. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS3G64Dr6%2B7pEQPHYS1VQjKABSVW%3DCTL0Ygh-neYTmzizQ%40mail.gmail.com.
