Should engine be applying link or metadata to an LINEFEED (LF) character?

Jim Lambert jiml at netrin.com
Wed Oct 25 15:42:28 EDT 2017


Trevor wrote:
> 
> ...
> <p>This is <span metadata="90660"><font color="#3597F3">line
> 1</font></span></p>
> <p>This is line 2</p>
> 
>> 
> set the htmltext of field 1 to the clipboarddata
> put 15 into tChar
> put charToNum(char tChar of field 1) & cr & the metadata of char tChar of
> field 1

As you noted, one gets:
10

90660


Now select before char 1 of line 2 and hit the delete key, so that all the text is on line 1.
Next hit the return key, so that the text is again on two lines and looks just as it did before.
Next run:
> put 15 into tChar
> put charToNum(char tChar of field 1) & cr & the metadata of char tChar of
> field 1

Now you only get ’10’, no metadata!

Check the htmltext and it’s identical to the original.

Odd!

Jim Lambert


More information about the use-livecode mailing list