Project

General

Profile

Feature #4

TH3: Support for source with line endings other as CRLF

Added by Wil van Antwerpen over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
03/20/2017
Due date:
% Done:

0%


Description

Currently the hammer works best with source code that has CR+LF as end of line characters.
A.k.a. windows style texts.
The editor controls (codemax/scintilla) by themselves have support for all common formats (LF / CRLF / CR).

However for scintilla we have to read the text via DataFlex and as such we have to use binary reads as that's the way to preserve the tab symbol when using the readln command. We now detect the eol format by inspecting the first line and can thereby detect either LF or CRLF.
If line endings are CRLF we strip the CR before passing the text on as CRLF to scintilla.

Another reason we currently have to hardwire to CRLF is because the parser that is used for the code explorer (among others) only understands CRLF.

It would be great if we can support all formats.

FWIW:
Windows = CRLF
Linux/Unix = LF
Macintosh (pre OS X) = CR

I don't think we have to support only CR as line endings as it isn't common at all.

Also available in: Atom PDF