[REBOL] shifting characters in rejoin Re:
From: kgd03011:nifty:ne:jp at: 5-Oct-2000 10:16
Andrew Martin already answered you, but maybe this provides a little
different perspective ...
The results look strange because the < and > aren't part of the tag!
data, they just delimit it.
>> length? <TAG>
When you do
markup-string: rejoin [open-tag data/name close-tag]
the first item in REJOIN's block argument is a tag, so the result is
a tag. But before close-tag is appended, it is formed to a string,
which causes the delimiting < > to actually become characters of data.
A tag! is meant to represent only one tag. If you want to have more than one
tag in an HTML element, you need to make a string. So it's very easy to
correct your function. Replace the line quoted above with:
markup-string: rejoin ["" open-tag data/name close-tag]