From e7b1caca9ee86ad87354ed02949473025ce9d6ca Mon Sep 17 00:00:00 2001 From: himynameismartin Date: Thu, 4 Sep 2014 11:14:03 +0200 Subject: [PATCH] Added C++ syntax highlighting --- doc/coding.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/coding.md b/doc/coding.md index 3581d7de..f1a33408 100644 --- a/doc/coding.md +++ b/doc/coding.md @@ -5,20 +5,22 @@ Please be consistent with the existing coding style. Block style: - bool Function(char* psz, int n) - { - // Comment summarising what this section of code does - for (int i = 0; i < n; i++) - { - // When something fails, return early - if (!Something()) - return false; - ... - } - - // Success return is usually at the end - return true; - } +``` cpp +bool Function(char* psz, int n) +{ + // Comment summarising what this section of code does + for (int i = 0; i < n; i++) + { + // When something fails, return early + if (!Something()) + return false; + ... + } + + // Success return is usually at the end + return true; +} +``` - ANSI/Allman block style - 4 space indenting, no tabs