annotate tests/urblog.ur @ 2142:3288e3c9948b

Fix XML indentation in Emacs mode The return value of MATCH-STRING is a string. At least on Emacs 25, the comparisons between string and character with EQUAL could never succeed, and so the cases for matching braces were never triggered. GET-TEXT-PROPERTY may return a list rather than an atom (for example, on long lines with whitespace-mode turned on), and this broke the heuristic of looking for the tag face in previous text.
author Julian Squires <julian@cipht.net>
date Mon, 04 May 2015 14:35:07 -0400
parents 19e8e3d556d6
children
rev   line source
adam@1443 1 table entry : { Id : int, Title : string, Created : time, Author : string,
adam@1443 2 Body : string }
adam@1443 3 PRIMARY KEY Id
adam@1443 4
adam@1443 5 fun list () =
adam@1443 6 rows <- queryX (SELECT * FROM entry)
adam@1443 7 (fn row =>
adam@1443 8 <xml>
adam@1443 9 <div>
adam@1443 10 <h1>{[row.Entry.Title]}</h1><br />
adam@1443 11 <h2>By {[row.Entry.Author]} at {[row.Entry.Created]}</h2>
adam@1443 12 <p>{[row.Entry.Body]}</p>
adam@1443 13 </div>
adam@1443 14 </xml>
adam@1443 15 );
adam@1443 16 return
adam@1443 17 <xml>
adam@1443 18 <head>
adam@1443 19 <title>All Entries</title>
adam@1443 20 </head>
adam@1443 21 <body>
adam@1443 22 <h1>All Entries</h1>
adam@1443 23 {rows}
adam@1443 24 </body>
adam@1443 25 </xml>
adam@1443 26
adam@1443 27 fun main () = return <xml>
adam@1443 28 <head>
adam@1443 29 <title>UrBlog</title>
adam@1443 30 </head>
adam@1443 31
adam@1443 32 <body>
adam@1443 33 <h1>UrBlog</h1>
adam@1443 34 </body>
adam@1443 35 </xml>