From 2289d5a38028d83321898da44fa35cf3ed1a2b24 Mon Sep 17 00:00:00 2001 From: Ruairidh Carmichael Date: Sun, 3 Apr 2016 19:14:14 +0100 Subject: [PATCH] Readme syntax highlighting Just to make things more readable <3 --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0c99428..8cb30fe 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,17 @@ Serializes and deserializes Lua values with LuaJIT. - local bitser = require 'bitser' +```lua +local bitser = require 'bitser' - bitser.register('someResource', someResource) - bitser.registerClass(SomeClass) +bitser.register('someResource', someResource) +bitser.registerClass(SomeClass) - serializedString = bitser.dumps(someValue) - someValue = bitser.loads(serializedString) - serializedData = love.filesystem.newFileData("filename") - someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize()) +serializedString = bitser.dumps(someValue) +someValue = bitser.loads(serializedString) +serializedData = love.filesystem.newFileData("filename") +someValue = bitser.loadData(serializedData:getPointer(), serializedData:getSize()) +``` Pull requests, bug reports and other feedback welcome! :heart: