Skip to content

Instantly share code, notes, and snippets.

Last active Nov 28, 2018
What would you like to do?
hightlighting bug test
/* Highlighting Bug Test Code
* 2009 Nicholas Perry
(Feel free to use this as you want, I'm calling it public domain.)
I was messing around with code highlighting engines.
This should compile and print out a message in any valid c-programming compiler.
Although it won't look like it would in nearly every code highlighting environment or IDE.
It seems to handle it properly in,
so you'll need to copy it into your own editor to try it out.
Apparently, the continuation line ( [slash][newline] ) isn't considered by many text highlighting parsers.
Seems to be a problem in Scintilla based engines (gedit, notepad++), try it out yourself!
| |
/ |
#include <stdio.h>
int main() {
look("\n\ni'm going to run from the comments\n\n");
int i;//* / you can't run from the comments...
/* *\
// But i'm gonna!
int look(const char* string, void *his_function){
// i'm going to run!
//*/ dont do it, you'll devide by zero!
/* *\
///*/ // I'm going to run!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment