coffeecup icon indicating copy to clipboard operation
coffeecup copied to clipboard

Underlined space follows a link in formatted mode

Open lorensr opened this issue 11 years ago • 1 comments

To reproduce:

$ cat test.coffee
a href: '', -> 'link'
text 'after'
$ coffeecup -f test.coffee && cat test.html
<a href="">
  link
</a>
after
$ open test.html

Perhaps there should be a formatting exception for text within <a> so that it gives:

<a href="">link</a>
after

However, this still leaves the problem that it adds a space between link and after. I don't think using the -f option should change how the page looks - just how the HTML looks.

lorensr avatar Apr 04 '13 17:04 lorensr

@lorensr If you want the link to be rendered inline, you could do:

p "Before #{cede -> a href: '/', 'a link'} after."

That will output:

<p>Before <a href="/">a link</a>
 after.</p>

I did a little work on separating inline tags (e.g. a, span, etc.) from the regular tags so that they would always be formatted inline when using the -f option. Do you think that's something other people would be interested in?

What do you think, @gradus?

10xLaCroixDrinker avatar Apr 23 '13 04:04 10xLaCroixDrinker