diff --git a/CHANGELOG.md b/CHANGELOG.md
index c633b59a2..b8f08c5b5 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@ The attributions below are for work that has been incorporated into the script a
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
-
+
### v1.9.2.9 [F](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.2.9/builds/4chan-X-noupdate.user.js "Firefox version") [C](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.2.9/builds/4chan-X-noupdate.crx "Chromium version")
*2014-09-13*
diff --git a/Gruntfile.coffee b/Gruntfile.coffee
index 1381c2fb8..9b863687a 100755
--- a/Gruntfile.coffee
+++ b/Gruntfile.coffee
@@ -309,7 +309,10 @@ module.exports = (grunt) ->
filename = "/builds/#{name}#{suffix.noupdate}"
today = grunt.template.today 'yyyy-mm-dd'
changelog = grunt.file.read 'CHANGELOG.md'
- [_, note, body] = changelog.match /([^]*<\!-- end notes -->\n)([^]*)/
+ separator = "\n"
+ breakPos = changelog.indexOf(separator)
+ throw new Error 'Separator not found.' if breakPos is -1
+ breakPos += separator.length
- grunt.file.write 'CHANGELOG.md', "#{note}#{headerPrefix} v#{version} [F](#{oldVersions}#{version}#{filename}.user.js \"Firefox version\") [C](#{oldVersions}#{version}#{filename}.crx \"Chromium version\")\n*#{today}*\n\n#{body}"
+ grunt.file.write 'CHANGELOG.md', "#{changelog[..breakPos-1]}#{headerPrefix} v#{version} [F](#{oldVersions}#{version}#{filename}.user.js \"Firefox version\") [C](#{oldVersions}#{version}#{filename}.crx \"Chromium version\")\n*#{today}*\n\n#{changelog[breakPos..]}"
grunt.log.ok "Changelog updated for v#{version}."