Searching for hyphen or minus sign on Google
December 17, 2006 10:23 AM Subscribe
How do you search for minus sign (the "-") in Google?
I am looking for someone's explanation for what this construction does in Embedded Ruby:
< % -%>
Because usually you write it out as:
< % %>
or
< %=%>
And Google naturally interperets "-" as "exclude". (Annoyed grunt)>>>
I am looking for someone's explanation for what this construction does in Embedded Ruby:
< % -%>
Because usually you write it out as:
< % %>
or
< %=%>
And Google naturally interperets "-" as "exclude". (Annoyed grunt)>>>
Best answer: Google code search however...
posted by fvw at 10:28 AM on December 17, 2006 [1 favorite]
posted by fvw at 10:28 AM on December 17, 2006 [1 favorite]
Best answer: I know this isn't what you asked, but in case someone else manages to Google this page in future:
The <% -%> construction supresses the new line after the %>, so that you don't end up with lots of empty lines in your output.
posted by chrismear at 11:15 AM on December 17, 2006
The <% -%> construction supresses the new line after the %>, so that you don't end up with lots of empty lines in your output.
posted by chrismear at 11:15 AM on December 17, 2006
-%> means "don't print a new line once you accept this ruby code."
< %=
means the same as
< % putsbr>
< % ... %> allows you to declare variables and whatnot, but (I believe) only returns a new line.
I'm sure someone can explain this better than me, but that's (I believe) what it means.>>>
posted by Alt F4 at 11:17 AM on December 17, 2006
< %=
means the same as
< % putsbr>
< % ... %> allows you to declare variables and whatnot, but (I believe) only returns a new line.
I'm sure someone can explain this better than me, but that's (I believe) what it means.>>>
posted by Alt F4 at 11:17 AM on December 17, 2006
And why that's not the default behaviour is a mystery for all time.
posted by smackfu at 11:44 AM on December 17, 2006
posted by smackfu at 11:44 AM on December 17, 2006
This thread is closed to new comments.
posted by majick at 10:25 AM on December 17, 2006