diff --git a/extra/websites/factorcode/examples.txt b/extra/websites/factorcode/examples.txt index 420035c5fb..15c77e071c 100644 --- a/extra/websites/factorcode/examples.txt +++ b/extra/websites/factorcode/examples.txt @@ -46,8 +46,8 @@ set-file-lines USING: sequences xml.syntax xml.writer ; { "three" "blind" "mice" } -[ [XML <li><-></li> XML] ] map -[XML <ul><-></ul> XML] +[ [XML
  • <->
  • XML] ] map +[XML XML] pprint-xml ---- USING: inspector io.files.info io.pathnames system tools.files ; diff --git a/extra/websites/factorcode/index.fhtml b/extra/websites/factorcode/index.fhtml index ab901eaaff..cc65dbd509 100644 --- a/extra/websites/factorcode/index.fhtml +++ b/extra/websites/factorcode/index.fhtml @@ -1,7 +1,7 @@ <% USING: namespaces http.client kernel io.files splitting random io io.encodings.utf8 sequences webapps.mason.version.data webapps.mason.backend webapps.mason.grids webapps.mason.downloads -webapps.mason.utils html.elements accessors -xml.writer ; %> +webapps.mason.utils html.elements html.streams accessors +xml.writer xmode.highlight ; %> @@ -45,12 +45,12 @@ xml.writer ; %>

    Factor belongs to the family of concatenative languages: this means that, at the lowest level, a Factor program is a series of words (functions) that manipulate a stack of references to dynamically-typed values. This gives the language a powerful foundation which allows many abstractions and paradigms to be built on top. Reload this page to see a random code example below.

    -
    -<%
    +
    <%
     "resource:extra/websites/factorcode/examples.txt" utf8 file-lines
    -{ "----" } split random "\n" join write
    -%>
    -
    +{ "----" } split random +"factor" [ highlight-lines ] with-html-writer +[ xml>string write ] each +%>

    See the example programs page on the wiki for more.