GeSHi / geshi-1.0

Original version of Generic Syntax Highlighter for PHP
http://qbnz.com/highlighter/
GNU General Public License v2.0
168 stars 101 forks source link

yaml: Notice when numbers are in the file #53

Closed cweiske closed 8 years ago

cweiske commented 9 years ago

I get a E_NOTICE when there are numbers in my .yml file:

PHP Notice:  Undefined offset: 0 in /usr/share/php/geshi.php on line 3480
PHP Stack trace:
PHP   1. {main}() /home/cweiske/Dev/html/cweiske.de/tagebuch/update-file.php:0
PHP   2. Tagebuch_Renderer->updateForSingleFile() /home/cweiske/Dev/html/cweiske.de/tagebuch/update-file.php:27
PHP   3. Tagebuch_Renderer->createPost() /home/cweiske/Dev/html/cweiske.de/tagebuch/src/Tagebuch/Renderer.php:93
PHP   4. Tagebuch_Renderer->renderPost() /home/cweiske/Dev/html/cweiske.de/tagebuch/src/Tagebuch/Renderer.php:204
PHP   5. Tagebuch_Renderer->addSyntaxHighlighting() /home/cweiske/Dev/html/cweiske.de/tagebuch/src/Tagebuch/Renderer.php:265
PHP   6. GeSHi->parse_code() /home/cweiske/Dev/html/cweiske.de/tagebuch/src/Tagebuch/Renderer.php:428
PHP   7. GeSHi->parse_non_string_part() /usr/share/php/geshi.php:3069

File to reproduce this:

foo: 1
BenBE commented 8 years ago

The yaml.php file was missing the NUMBERS section.