Last active
July 3, 2017 15:58
-
-
Save EHLOVader/6611930 to your computer and use it in GitHub Desktop.
Syntax highlighting test with HTML PHP and some tricky bits for testing that a highlighter is doing things right.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Text Highlight Demo</title> | |
<script type="text/javascript"> | |
jQuery(function($,undefined){ | |
var Sublime = { | |
"theme": "Flatland Dark.sublime-theme", | |
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme", | |
"font_face": "Anonymous Pro", | |
"font_size": 8 | |
}; | |
}); | |
</script> | |
</head> | |
<body> | |
<?php | |
$pattern = '(<body[^>]*?>'; | |
/* abcdef | |
multi-line | |
*/ | |
$hello = <<<HELLO | |
<<<<--! jk --> | |
>>> | |
/* | |
1Il|iO0oB8 | |
HELLO; | |
function echoit($pattern) { | |
$complex = new stdClass(); | |
$complex->pattern = array( 3 => $pattern); | |
foreach (array(1,2,3) as $val) { | |
echo $val; | |
} | |
echo "123 456 $pattern {$complex->pattern[$val]}"; | |
echo '123 456 $pattern {$complex->pattern[$val]}'; | |
} | |
echo "/*"; | |
echo '//';echoit($pattern); | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment