Eruby


(Manfred Hansen) #1

Hello

the script

eruby example <% print "Hello\n" print "World\n" %>

print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s

Hello
World

Manfred


(Peter Hickman) #2

Manfred Hansen wrote:

Hello

the script

eruby example <% print "Hello\n" print "World\n" %>

print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s

Hello
World

Manfred

This gets transformed into …

eruby example Hello World

and html pays no attention to line breaks unless they are in

..
tags.

If you want a line break you need either

Hello

World

or

Hello

World

It’s an HTML thing


(Daniel P. Zepeda) #3

Hello

the script

eruby example <% print "Hello\n" print "World\n" %>

print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s

The output is rendered in a browser, so it must be HTML:

print "Hello
"
print “World

Newlines are ignored by browsers under most circumstances.

···

On Thu, 13 Jun 2002 01:02:05 +0900 Manfred Hansen manfred@mobilcom.de wrote:

Hello
World

Manfred


“Daniel P. Zepeda” <daniel@z,e,p,e,d,a,-,z,o,n,e.net>
(Remove commas for address)


(Rick Bradley) #4

<%
print "Hello\n"
print “World\n”
%>

print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s

Hello
World

It did – view the document source. When the browser
renders the HTML, however you’ll want a “
” to create
a line-break.

Rick

···


http://www.rickbradley.com MUPRN: 235 (79F/84F)
> might semi-enjoy
random email haiku | this. I will be sojourning
> as of tomorrow.


(ts) #5

print on the browser "Hello World" in one line.
Wy didn't print this in two line's

Well, it give you an HTML document, you must add <p>, or <br> if you want
a new paragraph, line

print "Hello<br>\n"
print "World<br>\n"
   
Guy Decoux


(Michael Campbell) #6

Browsers “fold” multiple whitespace (in this case, a newline) into a
single space.

If you want hard breaks in your output, you need to put in “

instead of newlines, or surround the whole thing with “

” …
”.
···

— Manfred Hansen manfred@mobilcom.de wrote:

Hello

the script

eruby example <% print "Hello\n" print "World\n" %>

print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s

Hello
World

=====

Yahoo IM: michael_s_campbell


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup


(moxliukas (Petras Kudaras)) #7

<%
print "Hello\n"
print “World\n”
%>
print on the browser “Hello World” in one line.
Wy didn’t print this in two line’s
Hello
World

Because the output is in HTML, and the new line only occurs when
tag
is met.

Petras Kudaras
aka moxliukas


(Amos) #8

Good God! No wonder I can’t ever keep up with the volume on this
list. At least this poor sap will never forget this one. :wink:

···

On Thu, 13 Jun 2002 01:22:11 +0900, >>>>> moxliukas (Petras Kudaras) moxliukas@delfi.lt (mk) writes:

Because the output is in HTML, and the new line only occurs when
tag
is met.


Amos


(W Kent Starr) #9

Bravo! The

pairing and the
are xml compliant, thus geared
for “the future” while the deprecated leading

and
are not.
Peter seems to be the only one who expressed this; apologies if I missed
it in someone else’s post.

Small point, but a significant one. All new markup should IMO be xml
compliant to save you time, money and hassle in the future. OTOH some of
us are hoping to make the big $$$$ fixing documents that are not! (Using
Ruby to parse them, of course (_] )

Regards,

Kent Starr

···

On Wed, 2002-06-12 at 12:07, Peter Hickman wrote:

If you want a line break you need either

Hello
<===============! emphasis added
World

or

Hello

<===============! emphasis added

World

It’s an HTML thing