From b6a6abda99a9bfd561e2ae07a9fb624a125672cb Mon Sep 17 00:00:00 2001 From: Florian Ludwig Date: Tue, 5 Jun 2018 09:09:21 +0200 Subject: [PATCH] enable code highlighting for JS in readme --- README.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e3a6f7f1..4458e2d9 100644 --- a/README.md +++ b/README.md @@ -116,24 +116,28 @@ If you're using [TheThingsNetwork](https://www.thethingsnetwork.org/) you may wa Decoder: - function Decoder(bytes, port) { - var decoded = {}; - if (port === 1) { - decoded.wifi = (bytes[0] << 8) | bytes[1]; - decoded.ble = (bytes[2] << 8) | bytes[3]; - } - return decoded; +```javascript +function Decoder(bytes, port) { + var decoded = {}; + if (port === 1) { + decoded.wifi = (bytes[0] << 8) | bytes[1]; + decoded.ble = (bytes[2] << 8) | bytes[3]; } + return decoded; +} +``` Converter: - function Converter(decoded, port) { - var converted = decoded; - if (port === 1) { - converted.pax = converted.ble + converted.wifi; - } - return converted; - } +```javascript +function Converter(decoded, port) { + var converted = decoded; + if (port === 1) { + converted.pax = converted.ble + converted.wifi; + } + return converted; +} +``` # Remote command set