From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu, Federico Benavento <benavento@gmail.com>
Subject: Re: [9fans] libhtml vs. <pre> tags
Date: Thu, 20 Oct 2005 23:01:43 -0500 [thread overview]
Message-ID: <20051021040143.6102C13024B@dexter-peak.quanstro.net> (raw)
In-Reply-To: <32d987d50510201004o56dec138t27e4050410f7ca59@mail.gmail.com>
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 <pre>-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 <pre> 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 <benavento@gmail.com> writes
|
| hi
|
| On 10/19/05, erik quanstrom <quanstro@quanstro.net> wrote:
| > to be more exact: this
| >
| > <pre>
| > 1 2
| > </pre>
| >
| > yields 2 tokens
| >
| > '1 ' ('1' + ' '*8)
| > '2'
| >
| > render() never sees the <pre> 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:
| <pre>, <table>, 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.
next prev parent reply other threads:[~2005-10-21 4:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-20 1:56 erik quanstrom
2005-10-20 2:17 ` erik quanstrom
2005-10-20 17:04 ` Federico Benavento
2005-10-21 4:01 ` erik quanstrom [this message]
2005-10-21 4:34 Federico G. Benavento
2005-10-21 5:09 ` Federico Benavento
2005-10-21 9:49 ` Kenji Okamoto
2005-10-21 9:51 ` Kenji Okamoto
2005-10-21 13:19 ` erik quanstrom
2005-10-21 13:25 ` erik quanstrom
2005-10-21 13:40 Federico G. Benavento
2005-10-21 13:51 ` erik quanstrom
2005-10-21 13:47 Trickey, Howard W (Howard)
2005-10-21 13:55 ` erik quanstrom
2005-10-21 14:06 ` Wes Kussmaul
2005-10-21 14:16 ` C H Forsyth
2005-10-21 15:04 ` Uriel
2005-10-21 18:45 ` Wes Kussmaul
2005-10-21 19:12 ` Uriel
2005-10-21 19:20 ` Wes Kussmaul
2005-10-21 17:35 ` Skip Tavakkolian
2005-10-21 17:51 ` David Tolpin
2005-10-21 14:02 Federico G. Benavento
2005-10-21 14:16 ` rog
2005-10-21 14:20 ` LiteStar numnums
2005-10-21 15:09 ` Wes Kussmaul
2005-10-21 14:21 Federico G. Benavento
2005-10-21 14:40 ` C H Forsyth
2005-10-21 14:37 Federico G. Benavento
2005-10-21 18:16 Trickey, Howard W (Howard)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051021040143.6102C13024B@dexter-peak.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@cse.psu.edu \
--cc=benavento@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).