From f42d706de0b8ef255163cb75bda5d2a5a2dc029b Mon Sep 17 00:00:00 2001 From: Jeremy Ruten Date: Fri, 28 Apr 2017 18:33:44 -0600 Subject: [PATCH] Fix incorrect description of strchr() --- CHANGELOG.md | 6 ++++++ doc/07.syntaxHighlighting.md | 7 +++---- leg.yml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef22acd..780fbd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.0.0beta8 (April 28, 2017) + +* `strchr()` was described incorrectly in + [chapter 7](http://viewsourcecode.org/snaptoken/kilo/07.syntaxHighlighting.html#colorful-numbers). + (Thanks Rudi) + ## 1.0.0beta7 (April 20, 2017) * In `editorSelectSyntaxHighlight()`, change the logic for filename pattern diff --git a/doc/07.syntaxHighlighting.md b/doc/07.syntaxHighlighting.md index 8831a48..cbbf872 100644 --- a/doc/07.syntaxHighlighting.md +++ b/doc/07.syntaxHighlighting.md @@ -181,10 +181,9 @@ returns true if it's considered a separator character. {{is-separator}} -`strchr()` comes from ``. It looks to see if any one of the -characters in the first string appear in the second string. If so, it returns a -pointer to the character in the second string that matched. Otherwise, it -returns `NULL`. +`strchr()` comes from ``. It looks for the first occurrence of a +character in a string, and returns a pointer to the matching character in the +string. If the string doesn't contain the character, `strchr()` returns `NULL`. Right now, numbers are highlighted even if they're part of an identifier, such as the `32` in `int32_t`. To fix that, we'll require that numbers are preceded diff --git a/leg.yml b/leg.yml index 6e68ca8..1ba5661 100644 --- a/leg.yml +++ b/leg.yml @@ -1,6 +1,6 @@ --- :name: kilo -:version: "1.0.0beta7" +:version: "1.0.0beta8" :title: Build Your Own Text Editor :rouge_theme: github :bold_weight: 500