From 70a96ccd9693646bf322b47b72d15dacd5a3b033 Mon Sep 17 00:00:00 2001 From: TADefx <72205337+TADefx@users.noreply.github.com> Date: Thu, 1 Oct 2020 08:07:05 -0500 Subject: [PATCH 1/2] Update increment.adoc Corrected formatting of the Syntax section, caused by "+" operator that caused the "++" to be hidden and cut-off the lines --- Language/Structure/Compound Operators/increment.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Language/Structure/Compound Operators/increment.adoc b/Language/Structure/Compound Operators/increment.adoc index b9dd49b7b..66ec79ff6 100644 --- a/Language/Structure/Compound Operators/increment.adoc +++ b/Language/Structure/Compound Operators/increment.adoc @@ -24,8 +24,11 @@ Increments the value of a variable by 1. [float] === Syntax -`x++; // increment x by one and returns the old value of x` + -`++x; // increment x by one and returns the new value of x` +[source,arduino] +---- +x++; // increment x by one and returns the old value of x +++x; // increment x by one and returns the new value of x +---- [float] From 2eb7c1e8166f2fa685423e382079cba65c0edd37 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 3 Oct 2020 08:46:27 -0700 Subject: [PATCH 2/2] Use {plus} predefined attribute to escape increment operator Previously, the increment operator in the syntax section was being treated as markup. --- Language/Structure/Compound Operators/increment.adoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Language/Structure/Compound Operators/increment.adoc b/Language/Structure/Compound Operators/increment.adoc index 66ec79ff6..7419f1ff6 100644 --- a/Language/Structure/Compound Operators/increment.adoc +++ b/Language/Structure/Compound Operators/increment.adoc @@ -24,11 +24,8 @@ Increments the value of a variable by 1. [float] === Syntax -[source,arduino] ----- -x++; // increment x by one and returns the old value of x -++x; // increment x by one and returns the new value of x ----- +`x{plus}{plus}; // increment x by one and returns the old value of x` + +`{plus}{plus}x; // increment x by one and returns the new value of x` [float]