Skip to content

TEXT .. TO problems with line feed #31

Open

Description

@lscheffler

TEXT .. TO will remove line feed LF - 0h0A if not combined with CR 0h0D, independent of any setting of PRETEXT.
At least a Remark should be introduced to help.
Try

lcInput = 'line 1'+0h0a+'line 2'

TEXT To lcText Noshow Textmerge Pretext 3
	<<lcInput>>
ENDTEXT


?lcText

Update:

It keeps CR, CRLF, but not LF

Activity

  1. DougHennig commented on Nov 9, 2022

    @DougHennig
    Member

    Interesting. I usually do this to ensure the last line has a CR and LF:

    text to lcText noshow
    some text
    
    endtext
    
  2. lscheffler commented on Nov 9, 2022

    @lscheffler
    Author

    I see the problem on TEXT TO .. TEXTMERGE merging a variable read from a textfile with only LF.
    A prg with only LF and the code you show will do no harm. The frx seems to A) to be considered as binary file by git, and B) not be harmed by the problem. Either the frx adds there own line ends while compiling, or it is a problem of TEXTMERGE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions