3 ms·
> If My and first just stand for themselves, you're not interpolating variables; where is the templating? Templating wasn't mentioned (yet. looking at the feed
by lelanthran 3y ago
> If My and first just stand for themselves, you're not interpolating variables; where is the templating?
Templating wasn't mentioned (yet. looking at the feedback I got, some avenues are open for some sort of templating).
> Also, what if you don't want a space between the bold hello and emphasized world?
Then you don't put one in?
$ echo "(div My first (b hello)(em world)) " | ./l2h -s
<div>My first <b>hello</b><em>world</em></div>
> Or between first and <b>hello</b>?
Again, don't put one in:
echo "(div My first(b hello) (em world))" | ./l2h -s
<div>My first<b>hello</b> <em>world</em></div>
I think that that is is intuitive as it can get for people who know HTML: space-emission matches what you would expect for HTML.
If you look at the git history, I spent a lot of time making sure that the parsing of whitespace and newlines made sense from an HTML perspective, not from a Lisp perspective.
- kazinator 3y agoThat's not S-exprs then because there is no symbolic difference between )( and ) ( or between foo( and foo (. But it's a better representation for HTML, that we would have had if Berners-Lee hadn't been a supreme goofball.
- lelanthran 3y ago> That's not S-exprs then because there is no symbolic difference between )( and ) ( or between foo( and foo (. You (and everyone else) who points this out is quite correct. I could have chosen a proper name, but when I started project (and created the name for it) I did not realise that I would have to make whitespace and newlines significant in order for it to make sense from an HTML perspective. It was only when doing testing and trying to bold the middle two letters of "hello" that I knew I had to make whitespace significant. So .. uh, sorry about the name :-(