Source Code for user.html.macros.includeSourceCode

on includeSourceCode (adroutline, indentSpace=5) {
     «includeSourceCode © 1997, 1998 by Philip Suh <phil@filsa.net>.
          «Terms of Use:
               «Permission granted to use and redistribute this script
               «only if this documentation and copyright statement are
               «included and unmodified.  Use of this script is governed
               «by the full copyright statement, available from the Script Archive.
          «From the filsa.net Frontier Script Archive:
               «Full documentation, updates, and other scripts are available from
               «http://www.filsa.net/frontier/scripts/
          «Docs -- version 2 Wed, Oct 15, 1997 at 8:37:09 AM by PS
               «minor fixes on Wed, Oct 15, 1997 at 8:37:37 AM by PS
               «Thanks to Jeb Bateman for bug reports
     local (s, outlineCopy = adroutline^);
     s = string (outlineCopy);
     on normalizeSpecialChar (s) {
          s = string.replaceAll (s, "&", "&amp;");
          s = string.replaceAll (s, "<", "&lt;");
          s = string.replaceAll (s, ">", "&gt;");
          s = string.replaceAll (s, "\"", "&quot;");
          s = string.replaceAll (s, "#", "&#35;");
          s = string.replaceAll (s, "«", "&#171;");
          s = string.replaceAll (s, "\t", string.filledstring (' ', indentSpace));
          return (s)};
     s = normalizeSpecialChar (s);
     return ("<pre>\r" + s + "</pre>\r")};
bundle { «test code
     t = publishSource (@user.html.macros.publishSource);
     webbrowser.displaytext ("<html>" + t )}

Go back to the main page for this script