I would do it with SQL, replace the carriage returns with <BR> tags.
I did this in a report, but it should work for what you want as well
Thanks for you input Jeff.
That's actually what I used to do. Unfortunately that has the same problem as manually concatenating the <PRE> and </PRE> tags: it shows it as actual "<BR>" strings in the output. The actual HTML file instead has "<br;%gt;" so it displays the <BR> literally instead of as an HTML tag.
Also that captures the CRs but not the multiple spaces (indents).
I guess the best solution I could come up with was to change the query to:
select '<PRE>'||my_text||'</PRE>' from my_demo;
Then export it to HTML. Then open it with my favorite text editor and perform the following replacements:
<PRE> ---> <PRE>
</PRE> ---> </PRE>
Save my raw HTML after manually making that substitution with the text editor and now I the saved page displays properly like I want it to.
So that work around works - I was just hoping that there was a better solution that didn't require me to manually edit the resulting HTML in a text editor.