Add syntax highlighting to readme

This commit is contained in:
Shoozza 2019-08-04 12:46:46 +02:00 committed by GitHub
parent 170f7d9463
commit 547e34514a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@ Changes the internal timer manually to `running`, or to 0 if nothing is specifie
Examples Examples
======== ========
```lua
local cron = require 'cron' local cron = require 'cron'
local function printMessage() local function printMessage()
@ -57,6 +58,7 @@ Examples
c3:update(5) -- nothing (total time: 5) c3:update(5) -- nothing (total time: 5)
c3:update(4) -- nothing (total time: 9) c3:update(4) -- nothing (total time: 9)
c3:update(12) -- prints 'Hello' twice (total time is now 21) c3:update(12) -- prints 'Hello' twice (total time is now 21)
```
Gotchas / Warnings Gotchas / Warnings
================== ==================
@ -72,7 +74,9 @@ Just copy the cron.lua file somewhere in your projects (maybe inside a /lib/ fol
Remember to store the value returned by require somewhere! (I suggest a local variable named `cron`) Remember to store the value returned by require somewhere! (I suggest a local variable named `cron`)
```lua
local cron = require 'cron' local cron = require 'cron'
```
Also, make sure to read the license file; the text of that license file must appear somewhere in your projects' files. Also, make sure to read the license file; the text of that license file must appear somewhere in your projects' files.
@ -81,7 +85,9 @@ Specs
This project uses [busted](https://olivinelabs.com/busted) for its specs. If you want to run the specs, you will have to install it first. Then run: This project uses [busted](https://olivinelabs.com/busted) for its specs. If you want to run the specs, you will have to install it first. Then run:
```bash
cd path/where/the/spec/folder/is cd path/where/the/spec/folder/is
busted busted
```