On Oct 7, 2010, at 11:04 AM, mdipierro wrote:
> 
> I am away from my computer but I suspect the
> 
> text=text.replace('\r\n','\n').strip()+'\n'
> 
> is missing before exec-uting (text)

If I understand correctly, Mariano is concerned that any compile-error 
diagnostics match the character (vs line) position of the code that ends up in 
the textarea block, so that the diagnostics can be properly correlated with the 
code.

So I think that's the transformation we want, but I think it needs to happen 
when the file is first read.


> 
> On Oct 7, 11:20 am, Mariano Reingart <[email protected]> wrote:
>> On Thu, Oct 7, 2010 at 12:36 PM, Jonathan Lundell <[email protected]> wrote:
>>> On Oct 7, 2010, at 8:05 AM, Jonathan Lundell wrote:
>> 
>>>> On Oct 7, 2010, at 7:32 AM, Jonathan Lundell wrote:
>> 
>>>>> On Oct 7, 2010, at 7:09 AM, mdipierro wrote:
>> 
>>>>>> For now I reverted to 1.86.2 hoping the problem is not there.
>> 
>>>>> A hunch: the new syntax-checking code in admin/default/edit needs to 
>>>>> convert Windows line endings before calling compile.
>> 
>>>> If that's right, a (possibly) better alternative is to do the conversion 
>>>> before saving the edited file.
>> 
>>> Second & third thoughts.
>> 
>>> There are three logical places to do the conversion: when reading the file 
>>> (for editing), when saving the edited file, and at compilation time.
>> 
>>> It might be best to do it either when reading the file (so the editor sees 
>>> "proper" newlines), or when compiling (so the file is changed as little as 
>>> possible).
>> 
>>> On the whole, I think it's best to end up with the on-disk file fully 
>>> converted. Otherwise, you might end up with a confusing mix of Windows 
>>> newlines (from the original file) and Unix newlines (from the editor).
>> 
>> Yes, actually the file is converted before saving it, but for
>> compilation it uses the original text, because if compilation is done
>> on converted text, highlight would not be accurate  (editarea set
>> selection based on chars, not lines).
>> 
>> The problem here seems to be the browser / editarea, I'll look forward
>> it and do test in more platforms.
>> 
>> What browser/operating system/editor are you using?
>> 
>> Anyway, compile messages are warnings, as the file is stored correctly
>> in all cases (that was not modified).
>> 
>> Regards,
>> 
>> Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com


Reply via email to