On Tue, 10 Aug 2010 18:28:42 +0300 Tom Hacohen
<tom.haco...@partner.samsung.com> said:

> On Tue, 2010-08-10 at 19:12 +0900, Carsten Haitzler wrote:
> > 2nd sounds better - but you need to differentiate between differeing formats
> > those that just insert a newline or a tab (one off inserts or one off format
> > changes) vs push and pop of a format string. i'd say you need to keep
> > matching pushes and pops as you describe above until they are directly
> > together, then nuke them as they are empty push/pop pairs.
> 
> Exactly as I planned to do. With the new textblock redesign it's rather
> easy to implement. Just check all the nodes at offset 0 from the current
> node to find the closing format. Currently textblock just considers "-"
> prefixed nodes as pop, it doesn't really keep anything useful that can
> help us match markup pairs. So in general, if not defined specifically
> otherwise, <b>a</b> is exactly the same as <b>a</> which even makes our

correct - and as such though.. thats only in the markup. when it gets parsed
its broken down into text + raw formatting. and raw formatting is:
"font=blah size=10"
"+ font=blah-bold"
"- "

etc.
ie "+ " for push, "-..." for pop. :) thats the level you live at i guess.  now
u have to handle things like

"+ font=blah-bold"
"size=10"
"-"

some formatting is visible like:
"\n"
"\t"
etc.
some is not
"size=10"
"font=blah"
"color=#ff0000"

ie it changes state but in and of itself it does not show anything or consume
space.

so the case of "+ something", "blah", "-" where "blah" is not visible - you
would do the "push and pop cancel out deleting all items in between" - in this
case the "blah" goes too. if "blah" was visible formatting, then you wouldnt.
it's as if you have actual text there.

> lives easier. I'm not sure how it is in html, but I think not allowing
> cross closing/opening is reasonable, i.e: <b><u>a</b>b</u> won't work
> ATM and in my pov, it's ok to let such things break (or at least not act
> amazingly awesome :P).

actually in tb this would work. as </b> == </> - it's literally just popping
the stack. problem is you dont quite get the results you wanted. it wont break
tb or make things fall over badly - you just get incorrect results - and thats
a result of incorrect input anyway. so fix the input :)


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to