Formatting a CHANGES text file as HTML
Take a look at html/template package from standard library. It will help you a lot in separating parsing code and HTML generation. Also it will escape all input by default.



Some other notes:


It is handy to use ` instead of " when writing regular expressions with lots of escapes.
GPRegex variable will be exported. Should it be?
Kudos for using bytes.Buffer and not concating strings by hand (: