diff blog/src/lib/Post.luan @ 604:b73f005f3735 0.13

table constructor now uses end_of_line as a delimiter
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 24 Nov 2015 16:29:27 -0700
parents 50540f0813e2
children ca169567ce07
line wrap: on
line diff
--- a/blog/src/lib/Post.luan	Tue Nov 10 06:20:08 2015 -0700
+++ b/blog/src/lib/Post.luan	Tue Nov 24 16:29:27 2015 -0700
@@ -13,10 +13,10 @@
 
 local function from_doc(doc)
 	return M.new {
-		id = doc.id;
-		subject = doc.subject;
-		content = doc.content;
-		date = doc.date;
+		id = doc.id
+		subject = doc.subject
+		content = doc.content
+		date = doc.date
 	}
 end
 
@@ -27,11 +27,11 @@
 
 	function this.save()
 		local doc = {
-			type = "post";
-			id = this.id;
-			subject = this.subject;
-			content = this.content;
-			date = this.date;
+			type = "post"
+			id = this.id
+			subject = this.subject
+			content = this.content
+			date = this.date
 		}
 		Db.save(doc)
 		this.id = doc.id