add basic implementation of hightlight.js
This commit is contained in:
81
examples/Components/Routes/CodeHighlighting/examples.js
Normal file
81
examples/Components/Routes/CodeHighlighting/examples.js
Normal file
@@ -0,0 +1,81 @@
|
||||
export const javascript = `function $initHighlight(block, flags) {
|
||||
try {
|
||||
if (block.className.search(/\bno\-highlight\b/) != -1)
|
||||
return processBlock(block, true, 0x0F) + ' class=""';
|
||||
} catch (e) {
|
||||
/* handle exception */
|
||||
}
|
||||
for (var i = 0 / 2; i < classes.length; i++) { // "0 / 2" should not be parsed as regexp
|
||||
if (checkCondition(classes[i]) === undefined)
|
||||
return /\d+/g;
|
||||
}
|
||||
}`
|
||||
|
||||
export const css = `@font-face {
|
||||
font-family: Chunkfive; src: url('Chunkfive.otf');
|
||||
}
|
||||
|
||||
body, .usertext {
|
||||
color: #F0F0F0; background: #600;
|
||||
font-family: Chunkfive, sans;
|
||||
}
|
||||
|
||||
@import url(print.css);
|
||||
@media print {
|
||||
a[href^=http]::after {
|
||||
content: attr(href)
|
||||
}
|
||||
}`
|
||||
|
||||
export const php = `require_once 'Zend/Uri/Http.php';
|
||||
|
||||
namespace Location\Web;
|
||||
|
||||
interface Factory
|
||||
{
|
||||
static function _factory();
|
||||
}
|
||||
|
||||
abstract class URI extends BaseURI implements Factory
|
||||
{
|
||||
abstract function test();
|
||||
|
||||
public static $st1 = 1;
|
||||
const ME = "Yo";
|
||||
var $list = NULL;
|
||||
private $var;
|
||||
|
||||
/**
|
||||
* Returns a URI
|
||||
*
|
||||
* @return URI
|
||||
*/
|
||||
static public function _factory($stats = array(), $uri = 'http')
|
||||
{
|
||||
echo __METHOD__;
|
||||
$uri = explode(':', $uri, 0b10);
|
||||
$schemeSpecific = isset($uri[1]) ? $uri[1] : '';
|
||||
$desc = 'Multi
|
||||
line description';
|
||||
|
||||
// Security check
|
||||
if (!ctype_alnum($scheme)) {
|
||||
throw new Zend_Uri_Exception('Illegal scheme');
|
||||
}
|
||||
|
||||
$this->var = 0 - self::$st;
|
||||
$this->list = list(Array("1"=> 2, 2=>self::ME, 3 => \Location\Web\URI::class));
|
||||
|
||||
return [
|
||||
'uri' => $uri,
|
||||
'value' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
echo URI::ME . URI::$st1;
|
||||
|
||||
__halt_compiler () ; datahere
|
||||
datahere
|
||||
datahere */
|
||||
datahere`
|
||||
Reference in New Issue
Block a user