On Mon, Feb 16, 2004 at 08:23:45AM +0100, Tomas Abrahamsson wrote:
>=20
> Hi,
>=20
> I set out to convert the wiki in yaws into ehtml[1],
> as well as to add a few features from another wiki (from one
> that is based on Joe's wiki/pico).
>=20
> However, I noted a couple of things about ehtml and yaws
> that I thought I should share:
>=20
> The first one is that yaws_api.erl unconditionally prepends
> tags with \n (yaws_api.erl, around line 1223). While this
> makes the rendered html code nice and easy to read, it also
> introduces a whitespace, which can be significant in some
> contexts[2]. I've attached a patch which attempts to fix
> this in a reasonable way, I think.
>=20
> The second is that when setting up more than one virtual
> server on the same IP and port number, I lacked a way to say
> that a certain server config is to be selected if no server
> config matches the Host:-field in the HTTP-request (someone
> may have typed in e.g. http://123.123.123.123/). So I added
> an is_default option to the server config. I've attached a
> patch for this (the patch also includes documentation
> updates).
>=20
Ok, both patches applied. The first one modified though.=20
- I didn't like the lists:member call, replaced with
faster func clause.
- I added the br tag (Was that correct ??)
- I applied the same procedure for the ehtml_expander (the
ehtml template expander code)
Question: where did you get the list of tags from ??
As for the second patch, I applied it directly. We
had this feature earlier, but I can't recall why it
disappeared ?
>=20
> [2] Example: {ehtml, ["E=3Dmc",{sup,[],"2"}]}
> will prodcuce "E=3Dmc\n<sup>2</sup>", which the browser
> will rendered as "E=3Dmc =B2". It looks better without
> the space in this case.
Good example , I know that Jocke G was concerened before
about the newlines in ehtml, thus some odd code there in=20
ehtml that treated img and br as special (nonl) tags.
This looked better.=20
/klacke
--=20
Claes Wikstrom -- Caps lock is nowhere and
http://www.hyber.org -- everything is under control =
=20
|