We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Puzzle “New Line” with line feed and carriage return

Home Forums Puzzles Puzzle “New Line” with line feed and carriage return

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #57203
    Tim
    Customer

    Hello everyone,

    I am currently connecting a product configurator with a client’s webshop system via PHP. Therefore I am sending a formatted text file to PHP. The format is very specific. Basically it is a text document (.txt or .sql) where each line describes an article. This text is prepared in the Verge 3D application by using the “New line”-Puzzle a lot.

    Now it turns out that the client requires that each line ends with a line break with carriage return (CRLF). Unfortunately, the “New line”-Puzzle does not and a line with “CR“ (Carriage Return CHR(13)) but with “LF” (Line Feed CHR(10)).

    Is it possible to implement a line break with carriage return in Verge? If so, how would I achieve this? I would be happy about your help. Thank you in advance.

    #57205
    kdv
    Participant

    you can do it on your own. Open “puzzles.min.js”, find this
    textNewLine=function(e){return["'\\n'"
    and replace '\\n' with '\\r\\n'

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #57266
    Tim
    Customer

    Hi kdv77kdv, that works :yahoo:
    Thank you very much for your reply!

    I changed it to
    Blockly.JavaScript.textNewLine=function(e){return["'\\r\\n'",

    It turned out that it is also mandatory to resave the puzzles editor, so this new info is pulled into the project files.

    Also I found a lot of “puzzles.min.js” in outdated installation paths.
    It will probably be important to manually update this in each new version of Verge 3D.

    #57272

    Perhaps we should add a setting to this puzzle. :yes:

    Chief 3D Verger | LinkedIn | Twitter

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.