Skip to content

Instantly share code, notes, and snippets.

@stevenringo
Forked from freshtonic/gist:376081
Created April 23, 2010 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenringo/376242 to your computer and use it in GitHub Desktop.
Save stevenringo/376242 to your computer and use it in GitHub Desktop.
%p
Blah blah blah blah
%a(href='#foo') foo
and
%a(href='#bar') bar
\.
-# The problem with the above Haml fragment is that I am left with a space after <a href='#bar'>bar</a> and before the period.
-# Haml's whitespace removal does not resolve the issue, because it can either remove ALL whitespace
-# around an element or ALL whitespace within an element. Neither option seems to fit the bill.
-# AFAIK from reading the docs, you can't put whitespace removal around the text node either.
-# What's the (preferably clean) solution?
%p
Blah blah blah blah
%a(href='#foo') foo
and
<a href='#bar'>bar</a>.
-# works around the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment