jakemiles wrote: > Thanks! The .chomp fixed it. > > No, the intention isn't to create helper functions in Java. The web > page happens to be a tutorial on Java. The helper function is a ruby > helper that appliers google's syntaxhighlighting javascript thing to > the provided block of text. > > The resulting code in the view, for posterity, is: > > <%= code "java", <<-"CODE".chomp > > // create a panel using a GridBagLayout > JPanel panel = new JPanel (new GridBagLayout()); > > // three labels on the first row > panel.add (new JLabel ("One")); > panel.add (new JLabel ("Two")); > panel.add (new JLabel ("Threeeee")); > > CODE > %> > [...] Interesting. Something else you might want to consider: use Haml. It's got a number of advantages over ERb, but the relevant one here is that you could define a custom filter so you could do :java // your java code // goes here and not mess around with here documents. Best, -- MarnenLaibow-Koser http://www.marnen.org marnen / marnen.org -- Posted via http://www.ruby-forum.com/.