From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom To: 9fans@cse.psu.edu, Federico Benavento References: <20051020015629.41CB5130256@dexter-peak.quanstro.net> <20051020021707.8C4F613025C@dexter-peak.quanstro.net> <32d987d50510201004o56dec138t27e4050410f7ca59@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: <32d987d50510201004o56dec138t27e4050410f7ca59@mail.gmail.com> Subject: Re: [9fans] libhtml vs.
 tags
Message-Id: <20051021040143.6102C13024B@dexter-peak.quanstro.net>
Date: Thu, 20 Oct 2005 23:01:43 -0500
Cc: 
Topicbox-Message-UUID: 9dbd0940-ead0-11e9-9d60-3106f5b1d025

in my hasty reading of libhtml i was thinking that the tokenization is almost
correct. the only change needed is to not translate \t to 8 spaces. on output,

for rendering, perhaps the solution is to add a flag indicating that the output 
is 
-formatted and just memcpy() the text in render.

i was impressed with how little the tokenizing and rendering code was 
special cased, given how ad hoc html is. however, otoh, maybe 
 should be
handled in a special manner, with the tokenizer just converting character
sets and entities and treating that result as one big Bytes*.

erik


Federico Benavento  writes

| 
| hi
| 
| On 10/19/05, erik quanstrom  wrote:
| > to be more exact: this
| >
| > 
| > 1       2
| > 
| > | > yields 2 tokens | > | > '1 ' ('1' + ' '*8) | > '2' | > | > render() never sees the
 tag and renderrunes()
| > eats the trailing spaces yielding
| >
| > 1 2
| >
| I'm aware of this,
| 
| > i'm not sure if this is the spec or not, but it's not what
| > one expects, based on most browsers.
| >
| 
| You are right, there are a lot of things to be improved:
| 
, , justified text, etc.  And to
| do this the whole render process need to be changed,
| I still don't know how to solve this.
| Charon solves this by using the Line struct (layout.b),
| and braking the html items list into a list of Lines.
| I don't want to brake the list of items,I'm short
| of ideas about how to do this, but i'm still thinking.
| 
| Suggestions are welcome.