wahsaga: innerHTML und Zeilenumbrüche im Quelltext in <pre>

Beitrag lesen

hi,

Wah! (again ;-))

replace(/\n/g ...
Das "g" sorgt dafür, daß *alle* Vorkommnisse ersetzt werden, nicht nur das erste!

war mir wohl entgangen, benutze regex in JS so gut wie nie.

gruß,
wahsaga

--
"Look, that's why there's rules, understand? So that you _think_ before you break 'em."