added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
101
EnlighterJS/Resources/TestcaseData/assembly.html
Normal file
101
EnlighterJS/Resources/TestcaseData/assembly.html
Normal file
|
@ -0,0 +1,101 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="asm">MOV PSW,#107H ; register bank N</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="asm">
|
||||
; COMMENTS
|
||||
; -----------------------------------------------------
|
||||
; Single Line Comment
|
||||
;Single Line Comment leading Whitespaces
|
||||
|
||||
; NO
|
||||
; Multi
|
||||
; line
|
||||
; Comments
|
||||
|
||||
|
||||
; CONTROL STATEMENTS
|
||||
; -----------------------------------------------------
|
||||
$TITLE Assembly Testdata
|
||||
$TARGET mcu8051
|
||||
$ASSEMBLER keiluv01 /opt/keil/asm8051 -k -h -of=/dev/usbTTY1
|
||||
$INCLUDE (REG8051.INC)
|
||||
|
||||
; NUMBERS
|
||||
; -----------------------------------------------------
|
||||
MOV edx,101001011010101b ; binary number
|
||||
MOV edc, 101001011010101B ; binary number
|
||||
MOV eda, 101$0010$1101$0101b ; binary number with spacer
|
||||
MOV edx,101$0010$1101$0101B ; binary number with spacer
|
||||
|
||||
data_array0: DS 50H ; reserve 80 Bytes for data_array0
|
||||
data_array0: DS 0$50H ; reserve 80 Bytes for data_array0 with spacer
|
||||
data_array0: DS 5050h ; reserve 20.560 Bytes for data_array0
|
||||
data_array0: DS 50$5$0H ; reserve 20.560 Bytes for data_array0 with spacer
|
||||
|
||||
MOV edx,208781D ; decimal number
|
||||
MOV edc, 208781d ; decimal number
|
||||
MOV eda, 87$8171$2101D ; decimal number with spacer
|
||||
MOV edx,87$8171$2101D ; decimal number with spacer
|
||||
|
||||
MOV edx,70q ; octal number
|
||||
MOV edc, 70O ; octal number
|
||||
MOV eda, 7$121q ; octal number with spacer
|
||||
MOV edx,104$4321$77Q ; octal number with spacer
|
||||
|
||||
|
||||
; STRINGS
|
||||
; -----------------------------------------------------
|
||||
|
||||
LDI R30, 'A'
|
||||
DB 18H, 'SDATA'
|
||||
|
||||
|
||||
; INSTRUCTIONS
|
||||
; -----------------------------------------------------
|
||||
|
||||
LDI R30, 0x30 ; instruction start of line
|
||||
LDI R30, 0x30 ; instruction start of line with whitespaces
|
||||
test: LDI R30, 0x30 ; instruction after label
|
||||
JMP test
|
||||
MOV SP,#STACK - 1
|
||||
|
||||
|
||||
; FUNCTIONS
|
||||
; -----------------------------------------------------
|
||||
|
||||
LDI R30, HIGH(temp0)
|
||||
DB 18H, SLS(tmp)
|
||||
|
||||
|
||||
; EXAMPLES
|
||||
; -----------------------------------------------------
|
||||
section .text
|
||||
global _s_start
|
||||
|
||||
_init:
|
||||
MOV R4,@DR8 ; indirect access
|
||||
MOV @DR8+50H,R4 ; access with constant offset
|
||||
MOV K8,#WX ; load addr
|
||||
|
||||
start:
|
||||
MOV edx,10H ; message length
|
||||
MOV ecx,xy ; message
|
||||
MOV ebx,1
|
||||
INT 0x80 ; kernel call
|
||||
ADD R1,R2
|
||||
MOV VAR3,R1
|
||||
|
||||
MOV eax,1 ; system call
|
||||
LDI R1,10H
|
||||
|
||||
|
||||
section .data
|
||||
|
||||
section .eeprom
|
||||
|
||||
section .flash
|
||||
|
||||
|
||||
END ; end of file (required)
|
||||
</pre>
|
113
EnlighterJS/Resources/TestcaseData/avr-assembly.html
Normal file
113
EnlighterJS/Resources/TestcaseData/avr-assembly.html
Normal file
|
@ -0,0 +1,113 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="avrasm">.include "m8def.inc"</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="avrasm">
|
||||
; SOURCE: AVR Assembler User Guide [DOC1022] www.atmel.com/Images/doc1022.pdf
|
||||
|
||||
; COMMENTS
|
||||
; -----------------------------------------------------
|
||||
; Single Line Comment
|
||||
;Single Line Comment leading Whitespaces
|
||||
|
||||
; NO
|
||||
; Multi
|
||||
; line
|
||||
; Comments
|
||||
|
||||
; NUMBERS
|
||||
; -----------------------------------------------------
|
||||
.SET io_offset = 0x23
|
||||
.SET io_offset = $23
|
||||
.SET PORTA = io_offset + 2
|
||||
.SET PORTX = 0b11011101 efwefew
|
||||
|
||||
.CSEG ; Start code segment
|
||||
clr r2 ; Clear register 2
|
||||
out porta,r2 ; Write to Port A
|
||||
|
||||
; DIRECTIVES
|
||||
; -----------------------------------------------------
|
||||
.include "m8def.inc"
|
||||
.include "lcd.asm"
|
||||
|
||||
.def PI = 3141
|
||||
.def BOLTZMANN = 13806
|
||||
.def temp1 = r16
|
||||
.def temp2 = r17
|
||||
.def temp3 = r18
|
||||
.def flag = r22
|
||||
|
||||
; OPERATORS
|
||||
; -----------------------------------------------------
|
||||
ldi r16,!0xf0 ; Load r16 with 0x00
|
||||
ldi r16,~0xf0 ; Load r16 with 0x0f
|
||||
ldi r16,-2 ; Load -2(0xfe) in r16
|
||||
ldi r30,label*2 ; Load r30 with label*2
|
||||
ldi r30,label/2 ; Load r30 with label/2
|
||||
ldi r30,c1+c2 ; Load r30 with c1+c2
|
||||
ldi r18,High(c1&c2) ;Load r18 with an expression
|
||||
ldi r18,Low(c1|c2) ;Load r18 with an expression
|
||||
ldi r18,Low(c1||c2) ;Load r18 with an expression
|
||||
|
||||
|
||||
|
||||
|
||||
; EXAMPLES
|
||||
; -----------------------------------------------------
|
||||
.DEF temp=R16
|
||||
.DEF ior=R0
|
||||
.CSEG
|
||||
|
||||
ldi temp,0xf0 ; Load 0xf0 into temp register
|
||||
in ior,0x3f ; Read SREG into ior register
|
||||
eor temp,ior ; Exclusive or temp and ior
|
||||
|
||||
init:
|
||||
|
||||
.DSEG ; Start data segment
|
||||
vartab: .BYTE 4 ; Reserve 4 bytes in SRAM
|
||||
.ESEG
|
||||
eevar: .DW 0xff0f ; Initialize one word in
|
||||
; EEPROM
|
||||
.CSEG ; Start code segment
|
||||
const: .DW 2 ; Write 0x0002 in prog.mem.
|
||||
mov r1,r0 ; Do something
|
||||
|
||||
|
||||
.NOLIST ; Disable listfile generation
|
||||
.INCLUDE "macro.inc" ; The included files will not
|
||||
.INCLUDE "const.def" ; be shown in the listfile
|
||||
.LIST ; Reenable listfile generation
|
||||
|
||||
.MACRO MACX ; Define an example macro
|
||||
add r0,@0 ; Do something
|
||||
eor r1,@1 ; Do something
|
||||
.ENDMACRO ; End macro definition
|
||||
.LISTMAC ; Enable macro expansion
|
||||
MACX r2,r1 ; Call macro, show expansion
|
||||
|
||||
|
||||
|
||||
.CSEG
|
||||
varlist:.DW 0,0xffff,0b1001110001010101,-32768,65535
|
||||
.ESEG
|
||||
eevar: .DW 0xffff
|
||||
|
||||
|
||||
.DEF temp=R16
|
||||
.DEF ior=R0
|
||||
.CSEG
|
||||
ldi temp,0xf0 ; Load 0xf0 into temp register
|
||||
in ior,0x3f ; Read SREG into ior register
|
||||
eor temp,ior ; Exclusive or temp and ior
|
||||
|
||||
|
||||
.DSEG
|
||||
var1: .BYTE 1 ; reserve 1 byte to var1
|
||||
table: .BYTE tab_size ; reserve tab_size bytes
|
||||
.CSEG
|
||||
ldi r30,low(var1) ; Load Z register low
|
||||
ldi r31,high(var1) ; Load Z register high
|
||||
ld r1,Z ; Load VAR1 into register 1
|
||||
</pre>
|
91
EnlighterJS/Resources/TestcaseData/c.html
Normal file
91
EnlighterJS/Resources/TestcaseData/c.html
Normal file
|
@ -0,0 +1,91 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="c">volatile uint8_t burstmodeDelayCounter = 0;</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="c">
|
||||
// http://andidittrich.de/index.php/2012/04/xbox-360-controller-advanced-rapid-fire-mod/
|
||||
#include "Trigger.h"
|
||||
#include "Calibration.h"
|
||||
|
||||
// KEY STATES
|
||||
enum{KEYUP=0, KEYDOWN=1, FALLINGEDGE =2, RISINGEDGE=3, KEYDOWN_LONG=4};
|
||||
|
||||
// SYTMEM STATE
|
||||
enum{OFFLINE, RAPIDFIRE_SLOW, RAPIDFIRE_FAST, RAPIDFIRE_BURST};
|
||||
|
||||
// switch observer
|
||||
volatile uint8_t switchState0 = 2;
|
||||
volatile uint8_t switchState1 = 127;
|
||||
volatile uint8_t switchStateChange = 0;
|
||||
|
||||
// system state
|
||||
volatile uint8_t systemState = OFFLINE;
|
||||
|
||||
// led blink counter
|
||||
volatile uint8_t ledBlinkCounter = 0;
|
||||
|
||||
// burstmode delay counter
|
||||
volatile uint8_t burstmodeDelayCounter = 0;
|
||||
|
||||
// switch observer ISR - 48ms steady state required -> 122Hz Update Rate
|
||||
ISR (TIMER1_OVF_vect){
|
||||
// increment burstmode counter
|
||||
//burstmodeDelayCounter = burstmodeDelayCounter+1;
|
||||
|
||||
// LED BLink Action
|
||||
if (systemState == RAPIDFIRE_FAST){
|
||||
ledBlinkCounter = ledBlinkCounter+1;
|
||||
|
||||
// ~ 12 Hz Blink rate
|
||||
if (ledBlinkCounter%20 == 0){
|
||||
toggleStatusLed();
|
||||
}
|
||||
}
|
||||
|
||||
// LED BLink Action
|
||||
if (systemState == RAPIDFIRE_BURST){
|
||||
ledBlinkCounter = ledBlinkCounter+1;
|
||||
|
||||
// ~ 18 Hz Blink rate
|
||||
if (ledBlinkCounter < 50){
|
||||
if (ledBlinkCounter%10 == 0){
|
||||
toggleStatusLed();
|
||||
}
|
||||
}else{
|
||||
showStatusLed(0);
|
||||
}
|
||||
}
|
||||
|
||||
// SIGNAL A OBERVING (SWITCH)
|
||||
if (bit_is_clear(PINB, PB4)){
|
||||
// increment -> KEY PRESSED
|
||||
if (switchState0<5){
|
||||
switchState0++;
|
||||
}else{
|
||||
// FALLING EDGE DETECTED
|
||||
if (switchStateChange==KEYUP){
|
||||
switchStateChange = KEYDOWN;
|
||||
}
|
||||
}
|
||||
if (switchState1<255){
|
||||
switchState1++;
|
||||
}else{
|
||||
switchStateChange = KEYDOWN_LONG;
|
||||
}
|
||||
}else{
|
||||
// decrement -> KEY RELEASED
|
||||
if (switchState0>0){
|
||||
switchState0--;
|
||||
}else{
|
||||
// RISING EDGE DETECTED
|
||||
if (switchStateChange==KEYDOWN){
|
||||
switchStateChange = FALLINGEDGE;
|
||||
}
|
||||
}
|
||||
if (switchState1>0){
|
||||
switchState1--;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</pre>
|
50
EnlighterJS/Resources/TestcaseData/cpp.html
Normal file
50
EnlighterJS/Resources/TestcaseData/cpp.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="cpp">void CRectangle::set_value(int a);</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<!-- SOURCE: http://www.cplusplus.com/doc/tutorial/classes/ -->
|
||||
<pre data-enlighter-language="cpp">
|
||||
// SOURCE: http://www.cplusplus.com/doc/tutorial/classes/
|
||||
|
||||
// classes example
|
||||
#include <iostream>
|
||||
#define DOIT 1
|
||||
using namespace std;
|
||||
|
||||
class CRectangle {
|
||||
int x, y;
|
||||
public:
|
||||
void set_values (int,int);
|
||||
int area () {return (x*y);}
|
||||
};
|
||||
|
||||
void CRectangle::set_values (int a, int b) {
|
||||
x = a;
|
||||
y = b;
|
||||
}
|
||||
|
||||
/*
|
||||
void CRectangle::set_valueA (int a) {
|
||||
x = a;
|
||||
}
|
||||
*/
|
||||
|
||||
int main () {
|
||||
CRectangle rect;
|
||||
rect.set_values (3,4);
|
||||
cout << "area: " << rect.area();
|
||||
|
||||
CRectangle rect2 = new CRectangle();
|
||||
|
||||
int x = 0x54b4c2;
|
||||
int y = 291;
|
||||
int z = 0b1110101;
|
||||
|
||||
|
||||
#ifdef DOIT
|
||||
cout << __FILE__ << __LINE__;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
</pre>
|
45
EnlighterJS/Resources/TestcaseData/csharp.html
Normal file
45
EnlighterJS/Resources/TestcaseData/csharp.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="csharp">System.out.println("Hello World!");</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="csharp">
|
||||
// Source: https://en.wikipedia.org/wiki/C_Sharp_syntax#Attributes
|
||||
public class EdibleAttribute : Attribute
|
||||
{
|
||||
public EdibleAttribute() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EdibleAttribute(bool isNotPoisonous)
|
||||
{
|
||||
this.IsPoisonous = !isNotPoisonous;
|
||||
}
|
||||
|
||||
public bool IsPoisonous { get; set; }
|
||||
}
|
||||
|
||||
|
||||
// Source: https://en.wikipedia.org/wiki/C_Sharp_syntax#Events
|
||||
public class MainWindow : System.Windows.Controls.Window
|
||||
{
|
||||
private Button button1;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
button1 = new Button();
|
||||
button1.Text = "Click me!";
|
||||
|
||||
/* Subscribe to the event */
|
||||
button1.ClickEvent += button1_OnClick;
|
||||
|
||||
/* Alternate syntax that is considered old:
|
||||
button1.MouseClick += new MouseEventHandler(button1_OnClick); */
|
||||
}
|
||||
|
||||
protected void button1_OnClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
MessageBox.Show("Clicked!");
|
||||
}
|
||||
}
|
||||
</pre>
|
267
EnlighterJS/Resources/TestcaseData/css.html
Normal file
267
EnlighterJS/Resources/TestcaseData/css.html
Normal file
|
@ -0,0 +1,267 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="css">list-style: decimal-leading-zero outside;</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
<pre data-enlighter-language="css" data-enlighter-highlight="13-22">
|
||||
/*!
|
||||
---
|
||||
description: EnlighterJS Theme-Base - All Themes are derived from these styles!
|
||||
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
p {
|
||||
font-family: "Times New Roman";
|
||||
font-size: 20px;
|
||||
}
|
||||
@media screen {
|
||||
p {
|
||||
font-family: verdana, sans-serif;
|
||||
font-size: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
p {
|
||||
font-family: georgia, serif;
|
||||
font-size: 14px;
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
input.number,
|
||||
select.number,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 800) {
|
||||
.navbar-right .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.navbar-right .dropdown-menu-left {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.btn-group-vertical > .btn:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.nav-pills > li.active > a:focus {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
/*
|
||||
---
|
||||
description: EnlighterJS Theme-Base - All Themes are derived from these styles! Don't edit this file if you wan't to change styles! Use a derived theme!
|
||||
|
||||
license: MIT-style
|
||||
|
||||
authors:
|
||||
- Andi Dittrich
|
||||
...
|
||||
*/
|
||||
|
||||
/* BASE Styles */
|
||||
.EnlighterJS, .EnlighterJSWrapper{
|
||||
font-family: Monaco, Courier, Monospace;
|
||||
font-size: 10px;
|
||||
line-height: 16px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* Wrapper/Container - contains all elements of an instance */
|
||||
.EnlighterJSWrapper{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* RAW Styles */
|
||||
.EnlighterJSWrapper pre{
|
||||
font-family: inherit;
|
||||
background-color: #ffffff;
|
||||
padding: 5px 5px 5px 10px;
|
||||
margin: 0px 0px 20px 0px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
color: #444444;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
clear: none;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Inline specific styles */
|
||||
span.EnlighterJS {
|
||||
padding: 3px 5px 1px 5px;
|
||||
border: solid 1px #e0e0e0;
|
||||
color: #333333;
|
||||
background-color: #f7f7f7;
|
||||
margin: 0px 2px 0px 2px;
|
||||
}
|
||||
|
||||
/* LIST specific styles */
|
||||
ol.EnlighterJS, ul.EnlighterJS{
|
||||
color: #939393;
|
||||
font-size: 10px;
|
||||
background-color: #f2f2f2;
|
||||
color: #939393;
|
||||
margin: 0px 0px 20px 0px;
|
||||
padding: 0px;
|
||||
text-indent: 0px;
|
||||
list-style: decimal-leading-zero outside;
|
||||
}
|
||||
|
||||
/* line styles */
|
||||
ol.EnlighterJS li, ul.EnlighterJS li {
|
||||
margin: 0px;
|
||||
background-color: #ffffff;
|
||||
border: solid 0px #ffffff;
|
||||
padding: 0px 5px 0px 14px;
|
||||
line-height: 14px;
|
||||
color: #939393;
|
||||
list-style: none;
|
||||
font-size: inherit;
|
||||
}
|
||||
ol.EnlighterJS li{
|
||||
list-style: decimal-leading-zero outside;
|
||||
margin: 0px 0px 0px 40px;
|
||||
}
|
||||
|
||||
/* no-linenumber style */
|
||||
ul.EnlighterJS, ul.EnlighterJS li{
|
||||
list-style: none;
|
||||
display: block;
|
||||
}
|
||||
ul.EnlighterJS li:AFTER{
|
||||
content: ' ';
|
||||
}
|
||||
|
||||
/* top+bottom offsets */
|
||||
ol.EnlighterJS li:FIRST-CHILD, ul.EnlighterJS li:FIRST-CHILD{
|
||||
padding-top: 5px;
|
||||
}
|
||||
ol.EnlighterJS li:LAST-CHILD, ul.EnlighterJS li:LAST-CHILD{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
/* special line highlight color */
|
||||
ol.EnlighterJS li.specialline, ul.EnlighterJS li.specialline {
|
||||
background-color: #F4F8FC;
|
||||
}
|
||||
|
||||
/* default symbol style */
|
||||
.EnlighterJS span {
|
||||
color: #000000;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
line-height: inherit;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* TAB Panel - containing "buttons" to switch between multiple codeblocks */
|
||||
.EnlighterJSTabPane .controls {
|
||||
}
|
||||
.EnlighterJSTabPane .controls ul{
|
||||
margin: 0px 0px 0px 40px;
|
||||
padding: 0px;
|
||||
}
|
||||
.EnlighterJSTabPane .controls li {
|
||||
float: left;
|
||||
display: block;
|
||||
list-style: none;
|
||||
padding: 3px 10px 3px 10px;
|
||||
margin: 0px 5px 0px 5px;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
font-family: Courier, monospace;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.EnlighterJSTabPane .controls .clearfixList{
|
||||
clear: left;
|
||||
}
|
||||
.EnlighterJSTabPane .pane {
|
||||
padding: 5px 0px 0px 0px;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* Toolbar - containing buttons */
|
||||
.EnlighterJSToolbar{
|
||||
position: absolute;
|
||||
display: none;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
height: 40px;
|
||||
width: auto;
|
||||
padding: 15px;
|
||||
}
|
||||
/* Button Container */
|
||||
.EnlighterJSToolbar > a{
|
||||
float: right;
|
||||
display: block;
|
||||
border-radius: 3px;
|
||||
z-index: 10;
|
||||
background-color: #ffffff;
|
||||
color: #717171;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
padding: 0px;
|
||||
border: solid 1px #e0e0e0;
|
||||
margin: 0px 0px 0px 15px;
|
||||
text-decoration: none;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background-position: 0px 0px;
|
||||
background-size: contain;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.EnlighterJSToolbar > a:HOVER{
|
||||
border-color: #b0b0b0;
|
||||
}
|
||||
|
||||
/* Raw Button Identifiers */
|
||||
.EnlighterJSRawButton, .EnlighterJSWindowButton{}
|
||||
|
||||
/* Show Toolbar on MouseOver */
|
||||
.EnlighterJSToolbar > a:HOVER{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Button Icons */
|
||||
.EnlighterJSWindowButton{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyW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uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAALtJREFUeNpi/P//P8PgAEwMgwaMOmXUKaNOGSZOYcEjt2zTEWpZE+VnM1xCBQIMnGwoseDCviOjyZamEQQH2xavIduanukoeksyQ4ZLqECAV2wIJfbhCdqhHCoQIM4+WgcRD/z9i/z9i0ZDZdQpgzIzkwrYGGnsFFyZBVN8+6a+ERNBGzf2YQ0PTPFf/0dz0AjIzMS3k0dGqKD1o9Dap0TmqdFkS+cijpIuyJAJFcbRwdJRp4w6ZXg4BTAAcgIqryILA7oAAAAASUVORK5CYII=);
|
||||
}
|
||||
.EnlighterJSRawButton{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAIAAADY27xgAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJh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TPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHJJREFUeNrs18ENgCAMBVAwjuUEjuMgjOME7oUHE2O4YmIlr6eeyAv8Qsi11hSjphSmUFB+SJn7l1jW7WqOvXy5K7ej6WUlCOWZj86sZG/Q2PdKM8A9cXFAKCgoKCgoKCgoKCNT/A5RUFDerhMAAP//AwBh/xVVGTlP9gAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
/* Show Toolbar on Mouseover */
|
||||
.EnlighterJSWrapper:hover .EnlighterJSToolbar{
|
||||
display: block;
|
||||
}
|
||||
.EnlighterJSToolbar .clear{
|
||||
clear: right;
|
||||
content: ' ';
|
||||
display: block;
|
||||
}
|
||||
|
||||
</pre>
|
83
EnlighterJS/Resources/TestcaseData/cython.html
Normal file
83
EnlighterJS/Resources/TestcaseData/cython.html
Normal file
|
@ -0,0 +1,83 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="cython">links = [element for element in liste if element < pivotelement]</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="cython">
|
||||
# Hello World
|
||||
def say_hello():
|
||||
print "Hello World!"
|
||||
|
||||
'''
|
||||
Multiline String Comment Style1
|
||||
Hello
|
||||
'''
|
||||
|
||||
import pyximport; pyximport.install()
|
||||
|
||||
# compile-time constant
|
||||
DEF _LIST = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
|
||||
|
||||
# preprocessor conditional statements
|
||||
IF UNAME_SYSNAME == "Windows":
|
||||
include "windows.pxi"
|
||||
ELIF UNAME_SYSNAME == "Linux":
|
||||
include "linux.pxi"
|
||||
ELSE:
|
||||
include "misc.pxi"
|
||||
|
||||
"""
|
||||
Multiline String Comment Style2
|
||||
Hello, again
|
||||
"""
|
||||
|
||||
def primes(int kmax):
|
||||
"""Function documentation comment
|
||||
SOURCE: http://docs.cython.org/src/tutorial/cython_tutorial.html
|
||||
"""
|
||||
cdef int n, k, i
|
||||
cdef int p[1000]
|
||||
result = []
|
||||
if kmax > 1000:
|
||||
kmax = 1000
|
||||
k = 0
|
||||
n = 2
|
||||
while k < kmax:
|
||||
i = 0
|
||||
while i < k and n % p[i] != 0:
|
||||
i = i + 1
|
||||
if i == k:
|
||||
p[k] = n
|
||||
k = k + 1
|
||||
result.append(n)
|
||||
n = n + 1
|
||||
return result
|
||||
|
||||
# cdef examples
|
||||
cdef int i, j, k
|
||||
cdef float f, g[42], *h
|
||||
|
||||
# struct, union, and enum data-types
|
||||
cdef struct Car:
|
||||
int age
|
||||
float mileage
|
||||
|
||||
cdef union Country:
|
||||
char *name
|
||||
int *population
|
||||
|
||||
cdef enum Planets:
|
||||
Earth, Mars,
|
||||
Saturn
|
||||
|
||||
cdef enum PlanetType:
|
||||
dwarf = 1
|
||||
giant = 2
|
||||
regular = 3
|
||||
|
||||
# raise example
|
||||
# SOURCE: http://docs.cython.org/src/userguide/language_basics.html#checking-return-values-of-non-cython-functions
|
||||
cdef FILE* p
|
||||
p = fopen('spam.txt', 'r')
|
||||
if p == NULL:
|
||||
raise SpamError('Couldn\'t open the spam file')
|
||||
</pre>
|
65
EnlighterJS/Resources/TestcaseData/diff.html
Normal file
65
EnlighterJS/Resources/TestcaseData/diff.html
Normal file
|
@ -0,0 +1,65 @@
|
|||
<pre data-enlighter-language="diff">
|
||||
--- enlighter/trunk/readme.txt 2014-06-06 23:40:41 UTC (rev 928010)
|
||||
+++ enlighter/trunk/readme.txt 2014-06-06 23:41:44 UTC (rev 928011)
|
||||
@@ -4,7 +4,7 @@
|
||||
Donate link: http://andidittrich.de/go/enlighterjs
|
||||
Requires at least: 3.5
|
||||
Tested up to: 3.9.1
|
||||
-Stable tag: 2.1
|
||||
+Stable tag: 2.2
|
||||
License: MIT X11-License
|
||||
License URI: http://opensource.org/licenses/MIT
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Support for all common used languages
|
||||
* Theme Customizer
|
||||
* Inline Syntax Highlighting
|
||||
-* Visual-Editor (TinyMCE) Integration
|
||||
+* **Full** Visual-Editor (TinyMCE) Integration
|
||||
* Easy to use Text-Editor mode through the use of Shortcodes
|
||||
* Advanced configuration options (e.g. CDN usage) are available within the options page.
|
||||
* Supports code-groups (displays multiple code-blocks within a tab-pane)
|
||||
@@ -198,15 +198,27 @@
|
||||
|
||||
1. CSS highlighting Example (GIT Theme)
|
||||
2. Visual Editor Integration
|
||||
-3. Options Page - Appearance Settings
|
||||
-4. Options Page - Advanced Settings
|
||||
-5. Theme Customizer - General styles
|
||||
-6. Theme Customizer - Language Token styling
|
||||
-7. Special options for use with a CDN (Content Delivery Network)
|
||||
-8. Tab-Pane Example (multiple languages)
|
||||
+3. Visual Editor Code Settings
|
||||
+4. Visual Editor Inline/Block Formats
|
||||
+5. Options Page - Appearance Settings
|
||||
+6. Options Page - Advanced Settings
|
||||
+7. Theme Customizer - General styles
|
||||
+8. Theme Customizer - Language Token styling
|
||||
+9. Special options for use with a CDN (Content Delivery Network)
|
||||
+10. Tab-Pane Example (multiple languages)
|
||||
|
||||
== Changelog ==
|
||||
|
||||
+= 2.3 =
|
||||
+* Added Tab / Tab-Shift keyhandler to re-indent code within an Enlighter-Codeblock (the `tabfocus` plugin will be deactivated! - you can't use the tab key anymore to leave the editor window)
|
||||
+
|
||||
+= 2.2 =
|
||||
+* Added "Code Insert Dialog" to avoid copy-auto-formatting issues - feature requested on [WordPress Forums](http://wordpress.org/support/topic/code-indent-removed-by-wordpress-editor?replies=9#post-5652635)
|
||||
+* Added "Enlighter Settings Button" to control the Enlighter Settings (highlight, show-linenumbers, ..) directly from the Visual-Editor - just click into a codeblock and the button will appear (requires WordPress >=3.9)
|
||||
+* Added Enlighter Toolbar Menu-Buttons
|
||||
+* New Visual-Editor integration style
|
||||
+* Bugfix: Added missing codeblock-name for "C#"
|
||||
+
|
||||
= 2.1 =
|
||||
* Added EnlighterJS 2.2
|
||||
* Added language support for C# (csharp) [provided by Joshua Maag](https://github.com/joshmaag)
|
||||
@@ -281,6 +293,9 @@
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
+= 2.2 =
|
||||
+Full Visual-Editor (TinyMCE4) Integration including codeblock-settings (WordPress >= 3.9 required)
|
||||
+
|
||||
= 2.0 =
|
||||
Added Inline-Syntax-Highlighting as well as some other cool feature - please go to the settings page and click "Apply Settings"
|
||||
</pre>
|
25
EnlighterJS/Resources/TestcaseData/generic.html
Normal file
25
EnlighterJS/Resources/TestcaseData/generic.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="generic">Object.notify([3.141, "Test"]);</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h3>Generic Highlighting</h3>
|
||||
<pre data-enlighter-language="generic">
|
||||
// R Language Example using Generic Highlighting
|
||||
// Source: https://en.wikipedia.org/wiki/R_%28programming_language%29
|
||||
|
||||
|
||||
library(caTools) # external package providing write.gif function
|
||||
jet.colors <- colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F",
|
||||
"yellow", "#FF7F00", "red", "#7F0000"))
|
||||
m <- 1000 # define size
|
||||
C <- complex( real=rep(seq(-1.8,0.6, length.out=m), each=m ),
|
||||
imag=rep(seq(-1.2,1.2, length.out=m), m ) )
|
||||
C <- matrix(C,m,m) # reshape as square matrix of complex numbers
|
||||
Z <- 0 # initialize Z to zero
|
||||
X <- array(0, c(m,m,20)) # initialize output 3D array
|
||||
for (k in 1:20) { # loop with 20 iterations
|
||||
Z <- Z^2+C # the central difference equation
|
||||
X[,,k] <- exp(-abs(Z)) # capture results
|
||||
}
|
||||
write.gif(X, "Mandelbrot.gif", col=jet.colors, delay=800)
|
||||
</pre>
|
33
EnlighterJS/Resources/TestcaseData/html.html
Normal file
33
EnlighterJS/Resources/TestcaseData/html.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="html"><link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" /></code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
<pre data-enlighter-language="html">
|
||||
<head>
|
||||
<!-- Include EnlighterJS Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
|
||||
|
||||
<!-- Include MooTools Framework -->
|
||||
<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
|
||||
|
||||
<!-- Include EnlighterJS -->
|
||||
<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
|
||||
|
||||
<!-- Initialize EnlighterJS -->
|
||||
<script type="text/javascript">
|
||||
window.addEvent('domready', function() {
|
||||
// highlight all pre tags
|
||||
$$('pre').light({
|
||||
altLines : 'hover',
|
||||
indent : 2,
|
||||
editable: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Syntax highlight using Languages/Js.js and default theme -->
|
||||
<pre data-enlighter-language="css">var myClass = new Class({})</pre>
|
||||
|
||||
<!-- Syntax highlight using Languages/Php.js and theme from Themes/Twilight.css -->
|
||||
<pre data-enlighter-language="php" data-enlighter-theme="twilight"><?php php_info() ?></pre>
|
||||
|
||||
</pre>
|
73
EnlighterJS/Resources/TestcaseData/ini.html
Normal file
73
EnlighterJS/Resources/TestcaseData/ini.html
Normal file
|
@ -0,0 +1,73 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="ini">docref_root = "/phpmanual/"</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h3>PHP.ini Example</h3>
|
||||
<!-- Source: https://github.com/php/php-src/blob/master/php.ini-production -->
|
||||
<pre data-enlighter-language="ini">
|
||||
; An XML-RPC faultCode
|
||||
xmlrpc_error_number = 0
|
||||
|
||||
; When PHP displays or logs an error, it has the capability of formatting the
|
||||
; error message as HTML for easier reading. This directive controls whether
|
||||
; the error message is formatted as HTML or not.
|
||||
; Note: This directive is hardcoded to Off for the CLI SAPI
|
||||
; Default Value: On
|
||||
; Development Value: On
|
||||
; Production value: On
|
||||
; http://php.net/html-errors
|
||||
html_errors = On
|
||||
|
||||
docref_root = "/phpmanual/"
|
||||
|
||||
; http://php.net/docref-ext
|
||||
docref_ext = .html
|
||||
|
||||
|
||||
[Session]
|
||||
; Handler used to store/retrieve data.
|
||||
; http://php.net/session.save-handler
|
||||
session.save_handler = files
|
||||
|
||||
; Whether to use strict session mode.
|
||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||
; session ID if browser sends uninitialized session ID. Strict mode protects
|
||||
; applications from session fixation via session adoption vulnerability. It is
|
||||
; disabled by default for maximum compatibility, but enabling it is encouraged.
|
||||
; https://wiki.php.net/rfc/strict_sessions
|
||||
session.use_strict_mode = 0
|
||||
|
||||
; Whether to use cookies.
|
||||
; http://php.net/session.use-cookies
|
||||
session.use_cookies = 1
|
||||
|
||||
; http://php.net/session.cookie-secure
|
||||
;session.cookie_secure =
|
||||
|
||||
; This option forces PHP to fetch and use a cookie for storing and maintaining
|
||||
; the session id. We encourage this operation as it's very helpful in combating
|
||||
; session hijacking when not specifying and managing your own session id. It is
|
||||
; not the be-all and end-all of session hijacking defense, but it's a good start.
|
||||
; http://php.net/session.use-only-cookies
|
||||
session.use_only_cookies = 1
|
||||
</pre>
|
||||
|
||||
<h3>Lighttpd Config</h3>
|
||||
<pre data-enlighter-language="ini">
|
||||
server.document-root = "/var/www/servers/www.example.org/pages/"
|
||||
|
||||
server.port = 80
|
||||
|
||||
server.username = "www"
|
||||
server.groupname = "www"
|
||||
|
||||
mimetype.assign = (
|
||||
".html" => "text/html",
|
||||
".txt" => "text/plain",
|
||||
".jpg" => "image/jpeg",
|
||||
".png" => "image/png"
|
||||
)
|
||||
|
||||
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
|
||||
index-file.names = ( "index.html" )
|
||||
</pre>
|
93
EnlighterJS/Resources/TestcaseData/java.html
Normal file
93
EnlighterJS/Resources/TestcaseData/java.html
Normal file
|
@ -0,0 +1,93 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="java">System.out.println("Hello World!");</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<!-- Source: http://en.wikipedia.org/wiki/Java_%28programming_language%29 -->
|
||||
<pre data-enlighter-language="java">
|
||||
public class Hello{
|
||||
public static void main(String[] args)
|
||||
throws IOException{
|
||||
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Source: http://en.wikipedia.org/wiki/Java_%28programming_language%29
|
||||
// OddEven.java
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public class OddEven<T>{
|
||||
/**
|
||||
* "input" is the number that the user gives to the computer
|
||||
*/
|
||||
private int input; // a whole number("int" means integer)
|
||||
|
||||
/**
|
||||
* This is the constructor method. It gets called when an object of the OddEven type
|
||||
* is being created.
|
||||
*/
|
||||
public T OddEven() {
|
||||
/*
|
||||
* In most Java programs constructors can initialize objects with default values, or create
|
||||
* other objects that this object might use to perform its functions. In some Java programs, the
|
||||
* constructor may simply be an empty function if nothing needs to be initialized prior to the
|
||||
* functioning of the object. In this program's case, an empty constructor would suffice.
|
||||
* A constructor must exist; however, if the user doesn't put one in then the compiler
|
||||
* will create an empty one.
|
||||
*/
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the main method. It gets called when this class is run through a Java interpreter.
|
||||
* @param args command line arguments (unused)
|
||||
*/
|
||||
public static void main(final String[] args) {
|
||||
/*
|
||||
* This line of code creates a new instance of this class called "number" (also known as an
|
||||
* Object) and initializes it by calling the constructor. The next line of code calls
|
||||
* the "showDialog()" method, which brings up a prompt to ask you for a number
|
||||
*/
|
||||
OddEven<Number> number = new OddEven()<Number>;
|
||||
number.showDialog();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
/*
|
||||
* "try" makes sure nothing goes wrong. If something does,
|
||||
* the interpreter skips to "catch" to see what it should do.
|
||||
*/
|
||||
try {
|
||||
/*
|
||||
* The code below brings up a JOptionPane, which is a dialog box
|
||||
* The String returned by the "showInputDialog()" method is converted into
|
||||
* an integer, making the program treat it as a number instead of a word.
|
||||
* After that, this method calls a second method, calculate() that will
|
||||
* display either "Even" or "Odd."
|
||||
*/
|
||||
this.input = Integer.parseInt(JOptionPane.showInputDialog("Please enter a number."));
|
||||
this.calculate();
|
||||
} catch (final NumberFormatException e) {
|
||||
/*
|
||||
* Getting in the catch block means that there was a problem with the format of
|
||||
* the number. Probably some letters were typed in instead of a number.
|
||||
*/
|
||||
System.err.println("ERROR: Invalid input. Please type in a numerical value.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When this gets called, it sends a message to the interpreter.
|
||||
* The interpreter usually shows it on the command prompt (For Windows users)
|
||||
* or the terminal (For *nix users).(Assuming it's open)
|
||||
*/
|
||||
private void calculate() {
|
||||
if ((this.input % 2) == 0) {
|
||||
JOptionPane.showMessageDialog(null, "Even");
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(null, "Odd");
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre>
|
268
EnlighterJS/Resources/TestcaseData/javascript.html
Normal file
268
EnlighterJS/Resources/TestcaseData/javascript.html
Normal file
|
@ -0,0 +1,268 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="js">var another_greeting = 'Greetings, people of Earth.';</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="js">
|
||||
// Comments
|
||||
/* This
|
||||
is a
|
||||
block
|
||||
* comment
|
||||
*/
|
||||
|
||||
/** Numbers */
|
||||
345; // an "integer", although there is only one numeric type in JavaScript
|
||||
34.5; // a floating-point number
|
||||
3.45e2; // another floating-point, equivalent to 345
|
||||
0377; // an octal integer equal to 255
|
||||
0xFF; // a hexadecimal integer equal to 255, the letters A-F may be upper- or lowercase
|
||||
|
||||
/** Strings */
|
||||
var greeting = "Hello, world!";
|
||||
var another_greeting = 'Greetings, people of Earth.';
|
||||
var escaped_strings = "Hello from an \" escaped string" + 'this should \' work';
|
||||
|
||||
/** Regex */
|
||||
var regex = new RegExp("pattern" [, "flags"]);
|
||||
var literal = /pattern/gimy;
|
||||
|
||||
/** Snippet */
|
||||
var Language = new Class({
|
||||
|
||||
Implements: [Options],
|
||||
options: {
|
||||
matchType: "standard",
|
||||
strict: false
|
||||
},
|
||||
language: '',
|
||||
defaultTheme: 'standard',
|
||||
|
||||
patterns: new Hash(),
|
||||
keywords: new Hash(),
|
||||
rules: new Hash(),
|
||||
delimiters: new Hash({
|
||||
start: null,
|
||||
end: null
|
||||
}),
|
||||
|
||||
/************************
|
||||
* Common Regex Rules
|
||||
***********************/
|
||||
common: {
|
||||
slashComments: /(?:^|[^\\])\/\/.*$/gm, // Matches a C style single-line comment.
|
||||
poundComments: /#.*$/gm, // Matches a Perl style single-line comment.
|
||||
multiComments: /\/\*[\s\S]*?\*\//gm, // Matches a C style multi-line comment.
|
||||
aposStrings: /'[^'\\]*(?:\\.[^'\\]*)*'/gm, // Matches a string enclosed by single quotes.
|
||||
quotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm, // Matches a string enclosed by double quotes.
|
||||
strings: /'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm, // Matches both.
|
||||
properties: /\.([\w]+)\s*/gi, // Matches a property: .property style.
|
||||
methodCalls: /\.([\w]+)\s*\(/gm, // Matches a method call: .methodName() style.
|
||||
functionCalls: /\b([\w]+)\s*\(/gm, // Matches a function call: functionName() style.
|
||||
brackets: /\{|\}|\(|\)|\[|\]/g, // Matches any of the common brackets.
|
||||
numbers: /\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi // Matches integers, decimals, hexadecimals.
|
||||
},
|
||||
|
||||
/************************
|
||||
* Language Constructor
|
||||
***********************/
|
||||
initialize: function(lighter, theme, options, tokens) {
|
||||
this.setOptions(options);
|
||||
this.tokens = tokens || [];
|
||||
options = this.options;
|
||||
|
||||
// Set Lighter/Language/Theme relationship.
|
||||
this.lighter = lighter;
|
||||
this.theme = new Theme[theme || this.defaultTheme](lighter, this);
|
||||
|
||||
// Add delimiter rules if not in strict mode
|
||||
if (!options.strict) {
|
||||
if (this.delimiters.start) this.addLanguage('delimBeg', this.delimiters.start, 'de1');
|
||||
if (this.delimiters.end) this.addLanguage('delimEnd', this.delimiters.end, 'de2');
|
||||
}
|
||||
|
||||
// Set Keyword Rules from this.keywords object.
|
||||
this.keywords.each(function(keywordSet, ruleName) {
|
||||
if (keywordSet.csv != '') {
|
||||
this.addLanguage(ruleName, this.csvToRegExp(keywordSet.csv, "g"), keywordSet.alias);
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Set Rules from this.patterns object.
|
||||
this.patterns.each(function(regex, ruleName) {
|
||||
this.addLanguage(ruleName, regex.pattern, regex.alias);
|
||||
}, this);
|
||||
|
||||
// Set builder object for matchType.
|
||||
this.builder = new Hash({
|
||||
'standard': this.findMatches,
|
||||
'lazy': this.findMatchesLazy
|
||||
});
|
||||
|
||||
/** Process source code based on match type. */
|
||||
var codeBeg = 0,
|
||||
codeEnd = lighter.code.length,
|
||||
codeSeg = '',
|
||||
delim = this.delimiters,
|
||||
matches = [],
|
||||
match = null,
|
||||
endMatch = null;
|
||||
|
||||
if (!options.strict) {
|
||||
// Find matches through the complete source code.
|
||||
matches.extend(this.builder[options.matchType].pass(lighter.code, this)());
|
||||
} else if (delim.start && delim.end) {
|
||||
// Find areas between language delimiters and find matches there.
|
||||
while ((match = delim.start.exec(lighter.code)) != null ) {
|
||||
delim.end.lastIndex = delim.start.lastIndex;
|
||||
if ((endMatch = delim.end.exec(lighter.code)) != null ) {
|
||||
matches.push(new Token(match[0], 'de1', match.index));
|
||||
codeBeg = delim.start.lastIndex;
|
||||
codeEnd = endMatch.index-1;
|
||||
codeSeg = lighter.code.substring(codeBeg, codeEnd);
|
||||
matches.extend(this.builder[options.matchType].pass([codeSeg, codeBeg], this)());
|
||||
matches.push(new Token(endMatch[0], 'de2', endMatch.index));
|
||||
}
|
||||
}
|
||||
}
|
||||
this.tokens = matches;
|
||||
},
|
||||
|
||||
/************************
|
||||
* Regex Helper methods.
|
||||
***********************/
|
||||
addLanguage: function(languageName, RegEx, className) {
|
||||
this.rules[languageName] = RegEx;
|
||||
this.theme.addAlias(languageName, className);
|
||||
},
|
||||
csvToRegExp: function(csv, mod) {return new RegExp('\\b(' + csv.replace(/,\s*/g, '|') + ')\\b', mod);},
|
||||
delimToRegExp: function(beg, esc, end, mod, suffix) {
|
||||
beg = beg.escapeRegExp();
|
||||
if (esc) esc = esc.escapeRegExp();
|
||||
end = (end) ? end.escapeRegExp() : beg;
|
||||
pat = (esc) ? beg+"[^"+end+esc+'\\n]*(?:'+esc+'.[^'+end+esc+'\\n]*)*'+end : beg+"[^"+end+'\\n]*'+end;
|
||||
return new RegExp(pat+(suffix || ''), mod || '');
|
||||
},
|
||||
strictRegExp: function() {
|
||||
var regex = '(';
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
regex += arguments[i].escapeRegExp();
|
||||
regex += (i < arguments.length - 1) ? '|' : '';
|
||||
}
|
||||
regex += ')';
|
||||
return new RegExp(regex, "gim");
|
||||
},
|
||||
|
||||
/************************
|
||||
* Match finding Methods
|
||||
***********************/
|
||||
findMatches: function(code, offset) {
|
||||
var tokens = [],
|
||||
startIndex = 0,
|
||||
matchIndex = code.length
|
||||
insertIndex = 0,
|
||||
match = null,
|
||||
type = null,
|
||||
newToken = null,
|
||||
rule = null,
|
||||
rules = {},
|
||||
currentMatch = null,
|
||||
futureMatch = null;
|
||||
|
||||
offset = (offset) ? offset : 0;
|
||||
this.rules.each(function(regex, rule) {
|
||||
rules[rule] = {pattern: regex, enabled: true, lastIndex: 0};
|
||||
}, this);
|
||||
|
||||
while(startIndex < code.length) {
|
||||
matchIndex = code.length;
|
||||
match = null;
|
||||
for (rule in rules) {
|
||||
rules[rule].pattern.lastIndex = startIndex;
|
||||
currentMatch = rules[rule].pattern.exec(code);
|
||||
if (currentMatch === null) {
|
||||
delete rules[rule];
|
||||
} else {
|
||||
if (currentMatch.index < matchIndex) {
|
||||
match = currentMatch;
|
||||
type = rule;
|
||||
matchIndex = currentMatch.index;
|
||||
} else if (currentMatch.index == matchIndex && match[0].length < currentMatch[0].length) {
|
||||
match = currentMatch;
|
||||
type = rule;
|
||||
matchIndex = currentMatch.index;
|
||||
}
|
||||
rules[rule].nextIndex = rules[rule].pattern.lastIndex - currentMatch[0].length;
|
||||
}
|
||||
}
|
||||
if (match != null) {
|
||||
index = (match[1] && match[0].contains(match[1])) ? match.index + match[0].indexOf(match[1]) : match.index;
|
||||
newToken = new Token(match[1] || match[0], type, index+offset);
|
||||
tokens.push(newToken);
|
||||
|
||||
futureMatch = rules[type].pattern.exec(code);
|
||||
if (!futureMatch) {
|
||||
rules[type].nextIndex = code.length;
|
||||
} else {
|
||||
rules[type].nextIndex = rules[type].pattern.lastIndex - futureMatch[0].length;
|
||||
}
|
||||
|
||||
var min = code.length;
|
||||
for (rule in rules) {
|
||||
if (rules[rule].nextIndex < min) {
|
||||
min = rules[rule].nextIndex;
|
||||
}
|
||||
}
|
||||
startIndex = Math.max(min, newToken.end - offset);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return tokens;
|
||||
},
|
||||
findMatchesLazy: function(code, offset) {
|
||||
var tokens = this.tokens,
|
||||
match = null
|
||||
index = 0;
|
||||
|
||||
offset = (offset) ? offset : 0;
|
||||
|
||||
this.rules.each(function(regex, rule) {
|
||||
while ((match = regex.exec(code)) != null) {
|
||||
index = (match[1] && match[0].contains(match[1])) ? match.index + match[0].indexOf(match[1]) : match.index;
|
||||
tokens.push(new Token(match[1] || match[0], rule, index + offset));
|
||||
}
|
||||
}, this);
|
||||
return this.purgeTokens(tokens);
|
||||
},
|
||||
purgeTokens: function(tokens) {
|
||||
tokens = tokens.sort(this.compareTokens);
|
||||
for (var i = 0, j = 0; i < tokens.length; i++) {
|
||||
if (tokens[i] == null) continue;
|
||||
for (j = i+1; j < tokens.length && tokens[i] != null; j++) {
|
||||
if (tokens[j] == null) {continue;}
|
||||
else if (tokens[j].isBeyond(tokens[i])) {break;}
|
||||
else if (tokens[j].overlaps(tokens[i])) {tokens[i] = null;}
|
||||
else if (tokens[i].contains(tokens[j])) {tokens[j] = null;}
|
||||
}
|
||||
}
|
||||
return tokens.clean();
|
||||
},
|
||||
compareTokens: function(token1, token2) {return token1.index - token2.index;}
|
||||
});
|
||||
|
||||
var Token = new Class({
|
||||
|
||||
initialize: function(match, type, index) {
|
||||
this.text = match;
|
||||
this.type = type;
|
||||
this.index = index;
|
||||
this.length = this.text.length;
|
||||
this.end = this.index + this.length;
|
||||
},
|
||||
contains: function(token) {return (token.index >= this.index && token.index < this.end);},
|
||||
isBeyond: function(token) {return (this.index >= token.end);},
|
||||
overlaps: function(token) {return (this.index == token.index && this.length > token.length);},
|
||||
toString: function() {return this.index+' - '+this.text+' - '+this.end;}
|
||||
});
|
||||
|
||||
</pre>
|
29
EnlighterJS/Resources/TestcaseData/json.html
Normal file
29
EnlighterJS/Resources/TestcaseData/json.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="json">{ value: 'Hello World' }</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="json">
|
||||
{
|
||||
"Herausgeber": "Xema",
|
||||
"Nummer": "1234-5678-9012-3456",
|
||||
"Deckung": 2e+6,
|
||||
"Währung": "EURO",
|
||||
"Inhaber": {
|
||||
"Name": "Mustermann",
|
||||
"Vorname": "Max",
|
||||
"männlich": true,
|
||||
"Hobbys": [ "Reiten", "Golfen", "Lesen" ],
|
||||
"Alter": 42,
|
||||
"Kinder": [],
|
||||
"Partner": null
|
||||
}
|
||||
}
|
||||
|
||||
{ "X1": 123, "Y1": 81.123, "Z1": false,
|
||||
"T": [
|
||||
{ "x": 1, "y": 2},
|
||||
{ "x": 1, "y": 2},
|
||||
{ "x": 1, "y": 2},
|
||||
]
|
||||
}
|
||||
</pre>
|
128
EnlighterJS/Resources/TestcaseData/less.html
Normal file
128
EnlighterJS/Resources/TestcaseData/less.html
Normal file
|
@ -0,0 +1,128 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="less">list-style: decimal-leading-zero outside;</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
<pre data-enlighter-language="less">
|
||||
@base: #f938ab;
|
||||
|
||||
.box-shadow(@style, @c) when (iscolor(@c)) {
|
||||
-webkit-box-shadow: @style @c;
|
||||
box-shadow: @style @c;
|
||||
}
|
||||
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
|
||||
.box-shadow(@style, rgba(0, 0, 0, @alpha));
|
||||
}
|
||||
.box {
|
||||
color: saturate(@base, 5%);
|
||||
border-color: lighten(@base, 30%);
|
||||
div { .box-shadow(0 0 5px, 30%) }
|
||||
}
|
||||
|
||||
#menu a {
|
||||
color: #111;
|
||||
.bordered;
|
||||
}
|
||||
|
||||
.post a {
|
||||
color: red;
|
||||
.bordered;
|
||||
}
|
||||
|
||||
.screen-color {
|
||||
@media screen {
|
||||
color: green;
|
||||
@media (min-width: 768px) {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
@media tv {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
@base: 5%;
|
||||
@filler: @base * 2;
|
||||
@other: @base + @filler;
|
||||
|
||||
color: #888 / 4;
|
||||
background-color: @base-color + #111;
|
||||
height: 100% / 2 + @filler;
|
||||
|
||||
|
||||
|
||||
.weird-element {
|
||||
content: ~"^//* some horrible but needed css hack";
|
||||
}
|
||||
|
||||
@base: #f04615;
|
||||
@width: 0.5;
|
||||
|
||||
.class {
|
||||
width: percentage(@width); // returns `50%`
|
||||
color: saturate(@base, 5%);
|
||||
background-color: spin(lighten(@base, 25%), 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* HEADER
|
||||
----------------------------------- */
|
||||
header{
|
||||
a{
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
.navbar-collapse li:hover ul{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-beyond{
|
||||
height: 70px;
|
||||
.transition(500ms);
|
||||
|
||||
.navbar-brand span{
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-beyond-light{
|
||||
height: 45px;
|
||||
border-bottom: solid 1px #e7e7e7;
|
||||
background-color: @color_bluegrey1 !important;
|
||||
|
||||
.navbar-brand{
|
||||
color: #505050 !important;
|
||||
|
||||
&:hover, &:hover span{
|
||||
color: #505050 !important;
|
||||
}
|
||||
|
||||
span{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-beyond-dark{
|
||||
background-color: rgba(0,0,0,0.85);
|
||||
border-bottom: none;
|
||||
|
||||
.navbar-brand{
|
||||
color: #f0f0f0 !important;
|
||||
|
||||
&:hover, &:hover span{
|
||||
color: #f0f0f0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.nav>li>a {
|
||||
color: #d0d0d0 !important;
|
||||
}
|
||||
|
||||
.navbar-collapse{
|
||||
padding: 10px 0px 0px 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre>
|
146
EnlighterJS/Resources/TestcaseData/lua.html
Normal file
146
EnlighterJS/Resources/TestcaseData/lua.html
Normal file
|
@ -0,0 +1,146 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="lua">local a = "Double Quoted\nString"</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="lua">
|
||||
-- SOURCE: http://www.lua.org/manual/5.3/manual.html
|
||||
|
||||
-- COMMENTS
|
||||
-- --------------------------------------------------
|
||||
|
||||
-- This is a single line comment
|
||||
print "Hello World!"
|
||||
|
||||
--[[Comments can be spread
|
||||
across several lines ]]
|
||||
print "Hello World!"
|
||||
|
||||
---[[The long handled doubleshovel means that this code will run
|
||||
print "This will print because it is not a comment!"
|
||||
-- We can still include comments by prefixing them with a doubledash
|
||||
-- print "This will not print because it is commented out"
|
||||
]]
|
||||
|
||||
-- STRINGS
|
||||
-- --------------------------------------------------
|
||||
local a = "Double Quoted\nString"
|
||||
local b = 'Double Quoted\nString'
|
||||
local c = [[Multi
|
||||
Line String
|
||||
]]
|
||||
|
||||
a = 'alo\n123"'
|
||||
a = "alo\n123\""
|
||||
a = '\97lo\10\04923"'
|
||||
a = [[alo
|
||||
123"]]
|
||||
a = [==[
|
||||
alo
|
||||
123"]==]
|
||||
|
||||
-- NUMBERS
|
||||
-- --------------------------------------------------
|
||||
a = 4
|
||||
b = 0.4
|
||||
c = 4.57e-3
|
||||
D = 0.3e12
|
||||
e = 5e+20
|
||||
|
||||
-- CONSTANT
|
||||
-- --------------------------------------------------
|
||||
a = true
|
||||
b = false
|
||||
c = nil
|
||||
instance.merge(true, false, nil, 1234, 871.124E-12)
|
||||
|
||||
-- LOGICAL OPERATORS
|
||||
-- --------------------------------------------------
|
||||
print(4 and 5) --> 5
|
||||
print(nil and 13) --> nil
|
||||
print(false and 13) --> false
|
||||
print(4 or 5) --> 4
|
||||
print(false or 5) --> 5
|
||||
max = (x > y) and x or y
|
||||
print(not nil) --> true
|
||||
print(not false) --> true
|
||||
print(not 0) --> false
|
||||
print(not not nil) --> false
|
||||
|
||||
-- TABLES
|
||||
-- --------------------------------------------------
|
||||
a = {} -- create a table and store its reference in `a'
|
||||
k = "x"
|
||||
a[k] = 10 -- new entry, with key="x" and value=10
|
||||
a[20] = "great" -- new entry, with key=20 and value="great"
|
||||
print(a["x"]) --> 10
|
||||
k = 20
|
||||
print(a[k]) --> "great"
|
||||
a["x"] = a["x"] + 1 -- increments entry "x"
|
||||
print(a["x"]) --> 11
|
||||
|
||||
days = {"Sunday", "Monday", "Tuesday", "Wednesday",
|
||||
"Thursday", "Friday", "Saturday"}
|
||||
|
||||
-- EXAMPLE
|
||||
-- --------------------------------------------------
|
||||
line = io.read() -- read a line
|
||||
n = tonumber(line) -- try to convert it to a number
|
||||
if n == nil then
|
||||
error(line .. " is not a valid number")
|
||||
else
|
||||
print(n*2)
|
||||
end
|
||||
|
||||
function foo (a)
|
||||
print("foo", a)
|
||||
return coroutine.yield(2*a)
|
||||
end
|
||||
|
||||
co = coroutine.create(function (a,b)
|
||||
print("co-body", a, b)
|
||||
local r = foo(a+1)
|
||||
print("co-body", r)
|
||||
local r, s = coroutine.yield(a+b, a-b)
|
||||
print("co-body", r, s)
|
||||
return b, "end"
|
||||
end)
|
||||
|
||||
print("main", coroutine.resume(co, 1, 10))
|
||||
print("main", coroutine.resume(co, "r"))
|
||||
print("main", coroutine.resume(co, "x", "y"))
|
||||
print("main", coroutine.resume(co, "x", "y"))
|
||||
|
||||
list = nil
|
||||
for line in io.lines() do
|
||||
list = {next=list, value=line}
|
||||
end
|
||||
|
||||
x = 10
|
||||
local i = 1 -- local to the chunk
|
||||
|
||||
while i<=x do
|
||||
local x = i*2 -- local to the while body
|
||||
print(x) --> 2, 4, 6, 8, ...
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
if i > 20 then
|
||||
local x -- local to the "then" body
|
||||
x = 20
|
||||
print(x + 2)
|
||||
else
|
||||
print(x) --> 10 (the global one)
|
||||
end
|
||||
|
||||
print(x) --> 10 (the global one)
|
||||
|
||||
|
||||
|
||||
do
|
||||
local a2 = 2*a
|
||||
local d = sqrt(b^2 - 4*a*c)
|
||||
x1 = (-b + d)/a2
|
||||
x2 = (-b - d)/a2
|
||||
end -- scope of `a2' and `d' ends here
|
||||
print(x1, x2)
|
||||
</pre>
|
96
EnlighterJS/Resources/TestcaseData/markdown.html
Normal file
96
EnlighterJS/Resources/TestcaseData/markdown.html
Normal file
|
@ -0,0 +1,96 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="markdown">### XmlToJsObject</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="markdown" data-enlighter-highlight="9,28,47,66">
|
||||
XmlToJsObject
|
||||
===========
|
||||
|
||||
XmlToJsObject is a free, easy-to-use utility to convert XML-Documents/XML-Strings to Javacript-Objects
|
||||
|
||||

|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Easy XML to JS-Object conversion like JSON to JS-Object
|
||||
* Written in Pure-Javascipt (standalone - no framework like jQuery or MooTools required!)
|
||||
* Supports XML-Documents (from AJAX/XHR Requests) as well as XML-Strings
|
||||
* Smart-Mode automatically merges nodes+attributes for a much easier handling of config files
|
||||
* Ultra lightweight: only 3.9kB of Code (uncompressed); 1.64kB (yui compressed)
|
||||
* Well commented sourcecode allows easy user modifications/custom extensions
|
||||
* Native integration into MooTools (Object.fromXML)
|
||||
|
||||
Demo
|
||||
----
|
||||
The following Examples require the `JSON.stringify` method (supported by all modern browsers)
|
||||
|
||||
* [Example](http://static.andidittrich.de/XmlToJsObject/Example.html)
|
||||
* [MooTools Example](http://static.andidittrich.de/XmlToJsObject/Example.MooTools.html)
|
||||
* [Minimal Example](http://static.andidittrich.de/XmlToJsObject/Example.Minimal.html)
|
||||
|
||||
Available Methods
|
||||
-----------------
|
||||
|
||||
### XmlToJsObject
|
||||
Pure Javascript Implementation
|
||||
|
||||
```js
|
||||
XmlToJsObject(data [, smartMode=true])
|
||||
```
|
||||
**Description:** Converts a XML-String, XMLNode or XMLDocument into a Javascript-Object
|
||||
|
||||
**data**
|
||||
Type: mixed ( [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [XMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/Node), [XMLNode](https://developer.mozilla.org/en-US/docs/Web/API/Node) )
|
||||
A valid XML-String, XMLNode or XMLDocument Node containing various child nodes and attributes
|
||||
|
||||
**smartMode**
|
||||
Type: [Boolean](http://www.w3schools.com/js/js_datatypes.asp)
|
||||
Optional (default=**true**) - Merge attribute names with node-names
|
||||
|
||||
### Object.fromXML (MooTools)
|
||||
Native MooTools implementation: automatically available when using MooTools on your page!
|
||||
|
||||
```js
|
||||
Object.fromXML(data [, smartMode=true])
|
||||
```
|
||||
**Description:** Converts a XML-String, XMLNode or XMLDocument into a Javascript-Object
|
||||
|
||||
**data**
|
||||
Type: mixed ( [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [XMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/Node), [XMLNode](https://developer.mozilla.org/en-US/docs/Web/API/Node) )
|
||||
A valid XML-String, XMLNode or XMLDocument Node containing various child nodes and attributes
|
||||
|
||||
**smartMode**
|
||||
Type: [Boolean](http://www.w3schools.com/js/js_datatypes.asp)
|
||||
Optional (default=**true**) - Merge attribute names with node-names
|
||||
|
||||
|
||||
Tested With
|
||||
-----------
|
||||
* Firefox 27.0.1
|
||||
* Chrome 33.0.1750.117
|
||||
* Internet Explorer 11.0.9600.16518
|
||||
* Safari 5.1.7 (Windows)
|
||||
* Android 4.3 (WebView)
|
||||
|
||||
|
||||
Browser compatibility
|
||||
---------------------
|
||||
The XmlToJsObject Utility requires the [DOMParser](http://www.w3schools.com/dom/dom_parser.asp) object. If you want to support earlier versions of the InternetExplorer you can write a [fallback](http://www.w3schools.com/dom/dom_parser.asp) using `new ActiveXObject("Microsoft.XMLDOM")` instead of the DOMParser.
|
||||
|
||||
Compatibility Reference: [https://developer.mozilla.org/en-US/docs/Web/API/DOMParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)
|
||||
|
||||
* Chrome 1.0+
|
||||
* Safari osx+ios (WebKit) 3.2+
|
||||
* Internet Explorer 9+
|
||||
* Firefox 1.7+
|
||||
* Opera 8+
|
||||
* Android-Webview 4.3 (Webkit Engine)
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
XmlToJsObject is licensed under [The MIT License (X11)](http://opensource.org/licenses/MIT)
|
||||
|
||||
</pre>
|
226
EnlighterJS/Resources/TestcaseData/matlab.html
Normal file
226
EnlighterJS/Resources/TestcaseData/matlab.html
Normal file
|
@ -0,0 +1,226 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="matlab">[t,x] = meshgrid(-1:0.2:1, -1:0.2:1);</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h3>Matlab Script</h3>
|
||||
<pre data-enlighter-language="matlab">
|
||||
function [X]=fkt1000(t, x)
|
||||
|
||||
lambda=-1000;
|
||||
X = lambda*( x - exp(-t) ) - exp(-t);
|
||||
|
||||
end
|
||||
|
||||
function fRichtungsfeld(fhandle)
|
||||
% create meshgrid
|
||||
[t,x] = meshgrid(-1:0.2:1, -1:0.2:1);
|
||||
|
||||
% exec function
|
||||
z = feval(fhandle, t, x);
|
||||
|
||||
% draw figure
|
||||
figure;
|
||||
quiver(t, x, ones(size(t)), z);
|
||||
axis([-1,1,-1,1]);
|
||||
xlabel('t');
|
||||
ylabel('x');
|
||||
title('Richtungsfeld, dx=dt=0.2');
|
||||
legend('Richtungsfeld');
|
||||
end
|
||||
|
||||
classdef Uebung5< handle
|
||||
% Static Methods
|
||||
methods(Static=true)
|
||||
|
||||
%% Aufgabe 15
|
||||
function Aufgabe15()
|
||||
A = [
|
||||
0.9635, 1.4266;
|
||||
1.4266, 0.0365
|
||||
];
|
||||
|
||||
x0 = [
|
||||
0;
|
||||
1
|
||||
];
|
||||
|
||||
p = PowerMethod(A);
|
||||
iter = NumericIterator(p, x0);
|
||||
|
||||
% error < 10^-5
|
||||
iter.addAbortConditionListener(ErrorCalculationListener(10^-5));
|
||||
|
||||
% start iteration
|
||||
iter.start();
|
||||
|
||||
% print result
|
||||
fprintf('Eigenwert: %10.10f\nEigenvektor:\n', p.getEigenwert());
|
||||
Array.print(iter.getResult());
|
||||
|
||||
% Approximation Error < 1.000000e-005 @ 19 Iterations
|
||||
% Eigenwert: 2.0000066033
|
||||
% Eigenvektor:
|
||||
% 0.8090129
|
||||
% 0.5877909
|
||||
end
|
||||
|
||||
|
||||
|
||||
%% Aufgabe 16
|
||||
function Aufgabe16()
|
||||
% referenz f<>r tf=0.95
|
||||
ref = fAufgabe16Ref();
|
||||
|
||||
% startwert
|
||||
x0 = 1;
|
||||
t0 = 0;
|
||||
tf = 0.95;
|
||||
|
||||
% output buffer
|
||||
buffer = {};
|
||||
j = 1;
|
||||
|
||||
% schrittzahl, diskrete werte
|
||||
n = [20, 100, 200, 1000, 2000, 10000, 20000, 100000];
|
||||
|
||||
% draw table
|
||||
gui = table('Aufgabe 16');
|
||||
|
||||
% Verfahren anwenden
|
||||
for i=1:1:length(n)
|
||||
% schrittweite
|
||||
h = (tf-t0)/(n(i)-1);
|
||||
|
||||
% set table output
|
||||
buffer{j, 1} = n(i);
|
||||
buffer{j, 2} = sprintf('%d', h);
|
||||
|
||||
duration = 0;
|
||||
|
||||
% euler
|
||||
e = RungeKuttaMethod(@fAufgabe16, @fRKTEuler, t0, tf, h, x0);
|
||||
buffer{j, 3} = sprintf('%d', abs(ref-e.getResult())/ref);
|
||||
duration = duration + e.getDuration();
|
||||
|
||||
% heun
|
||||
e = RungeKuttaMethod(@fAufgabe16, @fRKTHeun, t0, tf, h, x0);
|
||||
buffer{j, 4} = sprintf('%d', abs(ref-e.getResult())/ref);
|
||||
duration = duration + e.getDuration();
|
||||
|
||||
% mod euler
|
||||
e = RungeKuttaMethod(@fAufgabe16, @fRKTMEuler, t0, tf, h, x0);
|
||||
buffer{j, 5} = sprintf('%d', abs(ref-e.getResult())/ref);
|
||||
duration = duration + e.getDuration();
|
||||
|
||||
% klassik RKV, just 4 fun ;)
|
||||
e = RungeKuttaMethod(@fAufgabe16, @fRKTClassicRKM, t0, tf, h, x0);
|
||||
buffer{j, 6} = sprintf('%d', abs(ref-e.getResult())/ref);
|
||||
duration = duration + e.getDuration();
|
||||
|
||||
% set duration
|
||||
buffer{j, 7} = sprintf('%d', duration);
|
||||
|
||||
% increment table row counter
|
||||
j=j+1;
|
||||
|
||||
% tabelle updaten
|
||||
gui.repaint(buffer);
|
||||
end
|
||||
|
||||
% OUTPUT
|
||||
% Result <h=5.000000e-002>: 6.460597267358655100
|
||||
% Result <h=5.000000e-002>: 12.511638996887264000
|
||||
% Result <h=5.000000e-002>: 12.048026035562726000
|
||||
% Result <h=5.000000e-002>: 14.271173509689078000
|
||||
% Result <h=9.595960e-003>: 17.964107899072395000
|
||||
% Result <h=9.595960e-003>: 32.643393403424028000
|
||||
% Result <h=9.595960e-003>: 32.155786064836953000
|
||||
% Result <h=9.595960e-003>: 33.992428065470925000
|
||||
% Result <h=4.773869e-003>: 25.392669207249959000
|
||||
% Result <h=4.773869e-003>: 40.020849205774859000
|
||||
% Result <h=4.773869e-003>: 39.753729672927300000
|
||||
% Result <h=4.773869e-003>: 40.667817564725581000
|
||||
% Result <h=9.509510e-004>: 41.312660057741127000
|
||||
% Result <h=9.509510e-004>: 48.111744657920021000
|
||||
% Result <h=9.509510e-004>: 48.088683279107258000
|
||||
% Result <h=9.509510e-004>: 48.159528454354081000
|
||||
% Result <h=4.752376e-004>: 45.338580595642853000
|
||||
% Result <h=4.752376e-004>: 49.276209783713618000
|
||||
% Result <h=4.752376e-004>: 49.269803171533532000
|
||||
% Result <h=4.752376e-004>: 49.289181554821702000
|
||||
% Result <h=9.500950e-005>: 49.333345578779792000
|
||||
% Result <h=9.500950e-005>: 50.230354244304941000
|
||||
% Result <h=9.500950e-005>: 50.230075076019553000
|
||||
% Result <h=9.500950e-005>: 50.230908884512381000
|
||||
% Result <h=4.750238e-005>: 49.894671915844583000
|
||||
% Result <h=4.750238e-005>: 50.350966085905696000
|
||||
% Result <h=4.750238e-005>: 50.350895538095877000
|
||||
% Result <h=4.750238e-005>: 50.351105912323895000
|
||||
% Result <h=9.500095e-006>: 50.355123772675057000
|
||||
% Result <h=9.500095e-006>: 50.447664014784309000
|
||||
% Result <h=9.500095e-006>: 50.447661168458090000
|
||||
% Result <h=9.500095e-006>: 50.447669645483884000
|
||||
end
|
||||
|
||||
%% Aufgabe 17
|
||||
function Aufgabe17()
|
||||
x0 = [
|
||||
1;
|
||||
0
|
||||
];
|
||||
|
||||
% startwerte
|
||||
t0 = 0;
|
||||
tf = 50;
|
||||
|
||||
% schrittzahl
|
||||
n = 1000;
|
||||
|
||||
% schrittweite
|
||||
h = (tf-t0)/(n-1);
|
||||
|
||||
% Classic RKM
|
||||
e = RungeKuttaMethod(@fAufgabe17, @fRKTClassicRKM, t0, tf, h, x0);
|
||||
|
||||
% cell array holen
|
||||
result = e.getResults();
|
||||
|
||||
% cell array in 2 lineare double arrays konvertieren
|
||||
x1 = [];
|
||||
x2 = [];
|
||||
|
||||
for i=1:1:length(result)
|
||||
x = result{i};
|
||||
x1(i) = x(1);
|
||||
x2(i) = x(2);
|
||||
end
|
||||
|
||||
% phasenraum zeichnen
|
||||
figure('Name', 'Aufgabe 17 - Phasenraum <20>ber x1, x2');
|
||||
plot(x1, x2);
|
||||
xlabel('x1');
|
||||
ylabel('x2');
|
||||
|
||||
% x1(t) zeichnen
|
||||
figure('Name', 'Aufgabe 17 - Abh<62>ngigkeiten von t');
|
||||
subplot(2,1,1);
|
||||
axis([0 50 -1 1]);
|
||||
plot(t0:h:tf, x1);
|
||||
xlabel('t');
|
||||
ylabel('x1');
|
||||
|
||||
% x2(t) zeichnen
|
||||
subplot(2,1,2);
|
||||
axis([0 50 -1 1]);
|
||||
plot(t0:h:tf, x2);
|
||||
xlabel('t');
|
||||
ylabel('x2');
|
||||
end
|
||||
|
||||
% END STATIC METHODS
|
||||
end
|
||||
|
||||
% END CLASS
|
||||
end
|
||||
|
||||
</pre>
|
31
EnlighterJS/Resources/TestcaseData/nohighlight.html
Normal file
31
EnlighterJS/Resources/TestcaseData/nohighlight.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<h2>Unhighlighted Code - <small>retains your page styles!</small></h2>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="no-highlight"><room number="123">Conference Room A</room></code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="no-highlight">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
|
||||
<group level="2">
|
||||
<room number="123">Conference Room A</room>
|
||||
<room number="124">Conference Room B</room>
|
||||
<room number="125">Conference Room C</room>
|
||||
<room number="126">Conference Room D</room>
|
||||
</group>
|
||||
<group level="2">
|
||||
<room number="17">John's Office</room>
|
||||
<room number="19">Eric's Office</room>
|
||||
</group>
|
||||
<group level="1">
|
||||
<room number="091">Mainframe Housing A</room>
|
||||
<room number="092">Mainframe Housing B</room>
|
||||
<room number="090">Mainframe Power Supply Station</room>
|
||||
<room number="089">Mainframe Backup Power Supply Station</room>
|
||||
</group>
|
||||
<group level="8">
|
||||
<room number="1717" role="cto">CTO Office</room>
|
||||
<room number="1819" role="ceo">CEO Office</room>
|
||||
<room number="1820" role="cfo">CFO Office</room>
|
||||
</group>
|
||||
</building>
|
||||
</pre>
|
56
EnlighterJS/Resources/TestcaseData/nsis.html
Normal file
56
EnlighterJS/Resources/TestcaseData/nsis.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="nsis">Name "installer_name"</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<!-- TESTCASE START -->
|
||||
<pre data-enlighter-language="nsis">
|
||||
/*
|
||||
Everybody
|
||||
needs a
|
||||
multi-line
|
||||
comment!
|
||||
*/
|
||||
|
||||
; Includes ---------------------------------
|
||||
!include MUI2.nsh
|
||||
|
||||
; Settings ---------------------------------
|
||||
Name "installer_name"
|
||||
OutFile "installer_name.exe"
|
||||
RequestExecutionLevel user
|
||||
CRCCheck on
|
||||
!ifdef x64
|
||||
InstallDir "$PROGRAMFILES64\installer_name"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES\installer_name"
|
||||
!endif
|
||||
|
||||
; Pages ------------------------------------
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Languages --------------------------------
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
; Sections ---------------------------------
|
||||
Section "section_name" section_index
|
||||
# your code here
|
||||
SectionEnd
|
||||
|
||||
; Descriptions -----------------------------
|
||||
LangString DESC_section_index ${LANG_English} "section_description"
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${section_index} $(DESC_section_index)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
; Functions --------------------------------
|
||||
Function .onInit
|
||||
StrCpy $0 "Notepad"
|
||||
MessageBox MB_YESNO "Do you want to run $0?" IDYES +2
|
||||
Quit
|
||||
nsExec:Exec "notepad.exe"
|
||||
FunctionEnd
|
||||
<!-- TESTCASE STOP -->
|
||||
</pre>
|
258
EnlighterJS/Resources/TestcaseData/php.html
Normal file
258
EnlighterJS/Resources/TestcaseData/php.html
Normal file
|
@ -0,0 +1,258 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="php">echo 'Arnold once said: "I\'ll be back"';</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="php">
|
||||
<?php
|
||||
// Comments
|
||||
|
||||
/*
|
||||
This is
|
||||
a comment
|
||||
block
|
||||
*/
|
||||
|
||||
/** Keywords */
|
||||
|
||||
die() echo() empty() exit() eval() include() include_once() isset() list() require() require_once() return() print() unset()
|
||||
|
||||
__CLASS__ __DIR__ __FILE__ __FUNCTION__ __METHOD__ __NAMESPACE__
|
||||
|
||||
abstract and array() as break case catch cfunction class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new old_function or private protected public static switch throw try use var while xor
|
||||
|
||||
/** String's */
|
||||
echo 'this is a simple string';
|
||||
|
||||
echo 'You can also have embedded newlines in
|
||||
strings this way as it is \'
|
||||
okay to do'; // Don't you agree
|
||||
|
||||
// Outputs: Arnold once said: "I'll be back"
|
||||
echo 'Arnold once said: "I\'ll be back"';
|
||||
|
||||
// Heredoc
|
||||
$str = <<<EOD
|
||||
Example of string
|
||||
spanning multiple lines
|
||||
using heredoc syntax.
|
||||
EOD;
|
||||
|
||||
// Nowdoc
|
||||
$str = <<<'EOD'
|
||||
Example of string
|
||||
spanning multiple lines
|
||||
using nowdoc syntax.
|
||||
EOD;
|
||||
|
||||
/** Numbers */
|
||||
|
||||
$a = 1234; // decimal number
|
||||
$a = -123; // a negative number
|
||||
$a = 0123; // octal number (equivalent to 83 decimal)
|
||||
$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
|
||||
$a = 1.234;
|
||||
$b = 1.2e3;
|
||||
$c = 7E-10;
|
||||
|
||||
|
||||
/**
|
||||
* Displays GitHub Style Buttons using GitHub API v3
|
||||
* @url http://github-buttons.andidittrich.de/
|
||||
* @see https://developer.github.com/v3/
|
||||
* @author Andi Dittrich $lt;http://andidittrich.de$gt;
|
||||
* @license Dual-Licensed under "The MIT License (X11)" and "Apache 2.0 License"
|
||||
* @version 1.2
|
||||
*
|
||||
*/
|
||||
class GitHubButtons{
|
||||
|
||||
// global cache dir
|
||||
private $_cacheDir;
|
||||
|
||||
function __construct($cacheDir = '.'){
|
||||
// store cache dir
|
||||
$this->_cacheDir = $cacheDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the default options -
|
||||
* @param array $options
|
||||
* @return multitype:
|
||||
*/
|
||||
private function mergeOptions($options){
|
||||
$defaults = array(
|
||||
// large or small button ?
|
||||
'large' => false,
|
||||
|
||||
// GitHub username
|
||||
'owner' => null,
|
||||
|
||||
// GitHub repository name
|
||||
'repo' => null,
|
||||
|
||||
// Button type (star, fork, watch, follow)
|
||||
'type' => 'star',
|
||||
|
||||
// custom button text
|
||||
'text' => null,
|
||||
|
||||
// enabled/disable counter - manual set the value
|
||||
'count' => true,
|
||||
|
||||
// enable caching by default
|
||||
'cache' => true,
|
||||
|
||||
// cache lifetime in seconds (2h default)
|
||||
'cacheLifetime' => 7200,
|
||||
|
||||
// text/count if GitHub API is unavailable
|
||||
'errorText' => 'NA'
|
||||
);
|
||||
return array_merge($defaults, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the HTML Output
|
||||
* @param array $options
|
||||
*/
|
||||
public function button($options){
|
||||
// set default options
|
||||
$options = $this->mergeOptions($options);
|
||||
|
||||
// vars
|
||||
$text = '';
|
||||
$count = null;
|
||||
$buttonLink = 'https://github.com/' . $options['owner'] . '/';
|
||||
$counterLink = 'https://github.com/' . $options['owner'] . '/';
|
||||
$apiUrl = '';
|
||||
$responseSelector = '';
|
||||
|
||||
// star, fork, follow, watch are supported
|
||||
switch ($options['type']){
|
||||
case 'star':
|
||||
$apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
|
||||
$text = 'Star';
|
||||
$buttonLink .= $options['repo'];
|
||||
$counterLink .= $options['repo'] . '/stargazers';
|
||||
$responseSelector = 'stargazers_count';
|
||||
break;
|
||||
|
||||
case 'fork':
|
||||
$apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
|
||||
$text = 'Fork';
|
||||
$buttonLink .= $options['repo'];
|
||||
$counterLink .= $options['repo'] . '/network';
|
||||
$responseSelector = 'forks_count';
|
||||
break;
|
||||
|
||||
case 'watch':
|
||||
$apiUrl = 'repos/' . $options['owner'] . '/' . $options['repo'];
|
||||
$text = 'Watchers';
|
||||
$buttonLink .= $options['repo'];
|
||||
$counterLink .= $options['repo'] . '/watchers';
|
||||
$responseSelector = 'subscribers_count';
|
||||
break;
|
||||
|
||||
case 'follow':
|
||||
$counterLink .= 'followers';
|
||||
$text = 'Follow @' . $options['owner'];
|
||||
$apiUrl = 'users/'.$options['owner'];
|
||||
$responseSelector = 'followers';
|
||||
break;
|
||||
}
|
||||
|
||||
// user defined text ?
|
||||
if ($options['text']!=null){
|
||||
$text = $options['text'];
|
||||
}
|
||||
|
||||
// user defined count ?
|
||||
if (is_numeric($options['count'])){
|
||||
$count = $options['count'];
|
||||
}else{
|
||||
// fetch count
|
||||
$response = $this->doApiRequest($apiUrl, $options['cache'], $options['cacheLifetime'], $responseSelector);
|
||||
|
||||
// valid ?
|
||||
if (is_numeric($response)){
|
||||
$count = $response;
|
||||
}else{
|
||||
$count = $options['errorText'];
|
||||
}
|
||||
}
|
||||
|
||||
// large button ?
|
||||
$large = ($options['large']===true ? ' github-btn-large' : '');
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Single HTTP GET Request including caching
|
||||
* @param unknown $url
|
||||
* @return string
|
||||
*/
|
||||
private function doApiRequest($url, $cacheEnabled, $cacheLifetime, $selector){
|
||||
// cache url
|
||||
$cachefilename = $this->_cacheDir . '/github.'.sha1($url.$selector).'.cache.json';
|
||||
|
||||
// 1h cachetime
|
||||
if ($cacheEnabled && file_exists($cachefilename) && filemtime($cachefilename) > (time()-$cacheLifetime)){
|
||||
return file_get_contents($cachefilename);
|
||||
}
|
||||
|
||||
$opts = array('http' =>
|
||||
array(
|
||||
'method' => 'GET',
|
||||
'protocol_version' => '1.1',
|
||||
'user_agent' => 'GitHubButtons/1.1',
|
||||
'header' => array(
|
||||
'Content-type: application/x-www-form-urlencoded;charset=UTF-8',
|
||||
'Connection: close',
|
||||
'Accept: application/vnd.github.v3+json'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// send request
|
||||
$data = false;
|
||||
try{
|
||||
$data = @file_get_contents('https://api.github.com/'.$url, false, stream_context_create($opts));
|
||||
}catch(Exception $error){}
|
||||
|
||||
// success ?
|
||||
if ($data===false){
|
||||
return false;
|
||||
}else{
|
||||
// decode data
|
||||
$jdata = json_decode($data, true);
|
||||
|
||||
// extract
|
||||
$cnt = $jdata[$selector];
|
||||
|
||||
if ($cacheEnabled){
|
||||
// cache data
|
||||
file_put_contents($cachefilename, $cnt);
|
||||
}
|
||||
|
||||
// return resposne data
|
||||
return $cnt;
|
||||
}
|
||||
}
|
||||
|
||||
// singleton instance
|
||||
private static $__instance;
|
||||
|
||||
// get singelton instance
|
||||
public static function getInstance($cacheDir=null){
|
||||
// check if singelton instance is avaible
|
||||
if (self::$__instance==null){
|
||||
// create new instance if not
|
||||
self::$__instance = new self($cacheDir);
|
||||
}
|
||||
return self::$__instance;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</pre>
|
68
EnlighterJS/Resources/TestcaseData/python.html
Normal file
68
EnlighterJS/Resources/TestcaseData/python.html
Normal file
|
@ -0,0 +1,68 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="python">links = [element for element in liste if element < pivotelement]</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="python">
|
||||
# SOURCE: http://de.wikipedia.org/wiki/Python_%28Programmiersprache%29
|
||||
def stack():
|
||||
l = []
|
||||
def pop(): return l.pop()
|
||||
def push(element): l.append(element)
|
||||
def isempty(): return len(l) == 0
|
||||
return pop, push, isempty
|
||||
|
||||
POP, PUSH, ISEMPTY = stack()
|
||||
|
||||
while True:
|
||||
try:
|
||||
num = raw_input("Eine Zahl eingeben: ")
|
||||
num = int(num)
|
||||
break
|
||||
except ValueError:
|
||||
print("Eine _Zahl_, bitte!")
|
||||
|
||||
'''
|
||||
Multiline String Comment Style1
|
||||
Hello
|
||||
'''
|
||||
|
||||
def curry(func, knownargument):
|
||||
return lambda unknownargument: func(unknownargument, knownargument)
|
||||
|
||||
"""
|
||||
Multiline String Comment Style2
|
||||
Hello
|
||||
"""
|
||||
|
||||
def quicksort(liste):
|
||||
if len(liste) <= 1:
|
||||
return liste
|
||||
pivotelement = liste.pop()
|
||||
links = [element for element in liste if element < pivotelement]
|
||||
rechts = [element for element in liste if element >= pivotelement]
|
||||
return quicksort(links) + [pivotelement] + quicksort(rechts)
|
||||
|
||||
using webapp.runner do (config):
|
||||
config.time_zone = 'UTC'
|
||||
config.log_level = 'debug'
|
||||
|
||||
# @SOURCE: http://docs.python.org/2/tutorial/classes.html
|
||||
class Mapping:
|
||||
def __init__(self, iterable):
|
||||
self.items_list = []
|
||||
self.__update(iterable)
|
||||
|
||||
def update(self, iterable):
|
||||
for item in iterable:
|
||||
self.items_list.append(item)
|
||||
|
||||
__update = update # private copy of original update() method
|
||||
|
||||
class MappingSubclass(Mapping):
|
||||
|
||||
def update(self, keys, values):
|
||||
# provides new signature for update()
|
||||
# but does not break __init__()
|
||||
for item in zip(keys, values):
|
||||
self.items_list.append(item)
|
||||
</pre>
|
31
EnlighterJS/Resources/TestcaseData/raw.html
Normal file
31
EnlighterJS/Resources/TestcaseData/raw.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<h2>Unhighlighted Code - <small>with EnlighterJS Container Styles!</small></h2>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="raw"><room number="123">Conference Room A</room></code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="raw">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B">
|
||||
<group level="2">
|
||||
<room number="123">Conference Room A</room>
|
||||
<room number="124">Conference Room B</room>
|
||||
<room number="125">Conference Room C</room>
|
||||
<room number="126">Conference Room D</room>
|
||||
</group>
|
||||
<group level="2">
|
||||
<room number="17">John's Office</room>
|
||||
<room number="19">Eric's Office</room>
|
||||
</group>
|
||||
<group level="1">
|
||||
<room number="091">Mainframe Housing A</room>
|
||||
<room number="092">Mainframe Housing B</room>
|
||||
<room number="090">Mainframe Power Supply Station</room>
|
||||
<room number="089">Mainframe Backup Power Supply Station</room>
|
||||
</group>
|
||||
<group level="8">
|
||||
<room number="1717" role="cto">CTO Office</room>
|
||||
<room number="1819" role="ceo">CEO Office</room>
|
||||
<room number="1820" role="cfo">CFO Office</room>
|
||||
</group>
|
||||
</building>
|
||||
</pre>
|
105
EnlighterJS/Resources/TestcaseData/ruby.html
Normal file
105
EnlighterJS/Resources/TestcaseData/ruby.html
Normal file
|
@ -0,0 +1,105 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="ruby">@users = User.find_all_by_logins(@changesets.collect(&:author).uniq).index_by(&:login)</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="ruby">
|
||||
=begin
|
||||
Multi-line comment test.
|
||||
Below are various syntax specific statements
|
||||
to test the parser with.
|
||||
=end
|
||||
|
||||
# Keywords
|
||||
alias and begin BEGIN
|
||||
break case class def defined? do
|
||||
else elsif END end ensure false
|
||||
for if in module next nil
|
||||
not or redo rescue retry return
|
||||
self super then true undef unless
|
||||
until when while yield
|
||||
|
||||
# String Tests
|
||||
'no interpolation, backslash notation not applied'
|
||||
"applied #{interpolation}, and backslashes\n"
|
||||
%q(no interpolation)
|
||||
%Q(applied #{interpolation} and backslashes)
|
||||
%(interpolation and backslashes)
|
||||
`echo command interpretation with interpolation and backslashes`
|
||||
%x(echo command interpretation with interpolation and backslashes)
|
||||
myString = <<DOC
|
||||
Multi line string in here doc form.
|
||||
Output will match format of heredoc.
|
||||
DOC
|
||||
|
||||
# Regular Expressions
|
||||
/pattern/
|
||||
/pattern/iomx
|
||||
%r{pattern}
|
||||
%r{pattern}iomx
|
||||
|
||||
#Symbols
|
||||
:Object
|
||||
:myVariable
|
||||
::notASymbol
|
||||
|
||||
# Number Tests
|
||||
123 # Fixnum
|
||||
-123 # Fixnum (signed)
|
||||
1_123 # Fixnum (underscore is ignored)
|
||||
-543 # Negative Fixnum
|
||||
123_456_789_123_456_789 # Bignum
|
||||
123.45 # Float
|
||||
1.2e-3 # Float
|
||||
0xaabb # (Hexadecimal) Fixnum
|
||||
0377 # (Octal) Fixnum
|
||||
-0b1010 # (Binary [negated]) Fixnum
|
||||
0b001_001 # (Binary) Fixnum
|
||||
?a # ASCII character code for 'a' (97)
|
||||
?\C-a # Control-a (1)
|
||||
?\M-a # Meta-a (225)
|
||||
?\M-\C-a # Meta-Control-a (129)
|
||||
|
||||
# Names
|
||||
fred anObject _x three_two_one # Local Variables
|
||||
@name @_ @Size # Instance Variables
|
||||
@@name @@_ @@Size # Class Variables
|
||||
def MyClass # Constants
|
||||
PI = 3.1415926
|
||||
class BigBlob
|
||||
$params $PROGRAM $! $_ $-a $-. #Global variables
|
||||
|
||||
# Example snippet
|
||||
class HistoryController < ApplicationController
|
||||
before_filter :find_node
|
||||
before_filter :repository_member_required
|
||||
|
||||
caches_action_content :index
|
||||
|
||||
# Single Line Comment
|
||||
def index
|
||||
@changesets = current_repository.changesets.paginate_by_path(@node.path, :page => params[:page])
|
||||
if api_format?
|
||||
render :layout => false
|
||||
else
|
||||
@users = User.find_all_by_logins(@changesets.collect(&:author).uniq).index_by(&:login)
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
def find_node
|
||||
full_path = if params[:paths].last.to_s =~ /\.atom$/
|
||||
request.format = :atom
|
||||
params[:paths].first(params[:paths].size - 1)
|
||||
else
|
||||
params[:paths]
|
||||
end
|
||||
@node = current_repository.node(full_path * "/")
|
||||
unless @node.accessible_by?(current_user)
|
||||
status_message :error, "You do not have access to this path."
|
||||
false
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
</pre>
|
157
EnlighterJS/Resources/TestcaseData/rust.html
Normal file
157
EnlighterJS/Resources/TestcaseData/rust.html
Normal file
|
@ -0,0 +1,157 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="rust">let y = match *x { 0 => "zero", _ => "some" };</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
|
||||
<pre data-enlighter-language="rust">
|
||||
#!Source: Rust Reference https://doc.rust-lang.org/stable/reference.html
|
||||
|
||||
/// string literal
|
||||
let a = "foobar";
|
||||
let b = "foo\
|
||||
bar";
|
||||
|
||||
assert_eq!(a,b);
|
||||
|
||||
"foo"; r"foo"; // foo
|
||||
"\"foo\""; r#""foo""#; // "foo"
|
||||
|
||||
"foo #\"# bar";
|
||||
r##"foo #"# bar"##; // foo #"# bar
|
||||
|
||||
"\x52"; "R"; r"R"; // R
|
||||
"\\x52"; r"\x52"; // \x52
|
||||
b"hello"; // byte string
|
||||
b'H'; // byte
|
||||
|
||||
/// integer literal
|
||||
123i32; // type i32
|
||||
123u32; // type u32
|
||||
123_u32; // type u32
|
||||
0xff_u8; // type u8
|
||||
0o70_i16; // type i16
|
||||
0b1111_1111_1001_0000_i32; // type i32
|
||||
0usize; // type usize
|
||||
|
||||
/// Floating-point literals
|
||||
123.0f64; // type f64
|
||||
0.1f64; // type f64
|
||||
0.1f32; // type f32
|
||||
12E+99_f64; // type f64
|
||||
1_234.0E+18f64 // type f64
|
||||
let x: f64 = 2.; // type f64
|
||||
|
||||
|
||||
/// lambda expression
|
||||
fn ten_times<F>(f: F) where F: Fn(i32) {
|
||||
let mut i = 0i32;
|
||||
while i < 10 {
|
||||
f(i);
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
ten_times(|j| println!("hello, {}", j));
|
||||
|
||||
|
||||
/// Directives
|
||||
// Specify the crate name.
|
||||
#![crate_name = "projx"]
|
||||
|
||||
// Specify the type of output artifact.
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// Turn on a warning.
|
||||
// This can be done in any module, not just the anonymous crate module.
|
||||
#![warn(non_camel_case_types)]
|
||||
|
||||
#![feature(rand, collections, std_misc, duration, duration_span)]
|
||||
|
||||
/// Match expressions
|
||||
let x = 1;
|
||||
|
||||
match x {
|
||||
1 => println!("one"),
|
||||
2 => println!("two"),
|
||||
3 => println!("three"),
|
||||
4 => println!("four"),
|
||||
5 => println!("five"),
|
||||
_ => println!("something else"),
|
||||
}
|
||||
|
||||
let x = 1;
|
||||
|
||||
match x {
|
||||
e @ 1 ... 5 => println!("got a range element {}", e),
|
||||
_ => println!("anything"),
|
||||
}
|
||||
|
||||
let y = match *x { 0 => "zero", _ => "some" };
|
||||
let z = match x { &0 => "zero", _ => "some" };
|
||||
|
||||
assert_eq!(y, z);
|
||||
|
||||
/// If let expressions
|
||||
let dish = ("Ham", "Eggs");
|
||||
|
||||
// this body will be skipped because the pattern is refuted
|
||||
if let ("Bacon", b) = dish {
|
||||
println!("Bacon is served with {}", b);
|
||||
}
|
||||
|
||||
// this body will execute
|
||||
if let ("Ham", b) = dish {
|
||||
println!("Ham is served with {}", b);
|
||||
}
|
||||
|
||||
/// Trait objects
|
||||
trait Printable {
|
||||
fn stringify(&self) -> String;
|
||||
}
|
||||
|
||||
impl Printable for i32 {
|
||||
fn stringify(&self) -> String { self.to_string() }
|
||||
}
|
||||
|
||||
fn print(a: Box<Printable>) {
|
||||
println!("{}", a.stringify());
|
||||
}
|
||||
|
||||
fn main() {
|
||||
print(Box::new(10) as Box<Printable>);
|
||||
}
|
||||
|
||||
fn to_vec<A: Clone>(xs: &[A]) -> Vec<A> {
|
||||
if xs.is_empty() {
|
||||
return vec![];
|
||||
}
|
||||
let first: A = xs[0].clone();
|
||||
let mut rest: Vec<A> = to_vec(&xs[1..]);
|
||||
rest.insert(0, first);
|
||||
rest
|
||||
}
|
||||
|
||||
/// Tuple types
|
||||
type Pair<'a> = (i32, &'a str);
|
||||
let p: Pair<'static> = (10, "hello");
|
||||
let (a, b) = p;
|
||||
assert!(b != "world");
|
||||
assert!(p.0 == 10);
|
||||
|
||||
/// Use declarations
|
||||
use std::option::Option::{Some, None};
|
||||
use std::collections::hash_map::{self, HashMap};
|
||||
|
||||
fn foo<T>(_: T){}
|
||||
fn bar(map1: HashMap<String, usize>, map2: hash_map::HashMap<String, usize>){}
|
||||
|
||||
fn main() {
|
||||
// Equivalent to 'foo(vec![std::option::Option::Some(1.0f64),
|
||||
// std::option::Option::None]);'
|
||||
foo(vec![Some(1.0f64), None]);
|
||||
|
||||
// Both `hash_map` and `HashMap` are in scope.
|
||||
let map1 = HashMap::new();
|
||||
let map2 = hash_map::HashMap::new();
|
||||
bar(map1, map2);
|
||||
}
|
||||
</pre>
|
67
EnlighterJS/Resources/TestcaseData/shell.html
Normal file
67
EnlighterJS/Resources/TestcaseData/shell.html
Normal file
|
@ -0,0 +1,67 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="shell">chmod 0775 /home/user1</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h3>Shell Script</h3>
|
||||
<pre data-enlighter-language="shell">
|
||||
#!/bin/sh
|
||||
|
||||
# Bin locations
|
||||
# ------------------------------------
|
||||
MYSQL_BIN=/usr/bin/mysql
|
||||
|
||||
# Config
|
||||
# ------------------------------------
|
||||
MYSQL_CONF="$HOME/.mysql.cnf"
|
||||
|
||||
# Uncompress Backup and run restore
|
||||
# ------------------------------------
|
||||
$MYSQL_BIN --defaults-extra-file=$MYSQL_CONF $1 < $2
|
||||
|
||||
# allow input
|
||||
# three arguments: PROTOCOL SRC-IP PORT
|
||||
firewall_allow_input() {
|
||||
if [ $# -eq 3 ]; then
|
||||
/sbin/iptables -A INPUT -p $1 -s $2 -d $IP_EXTERNAL --dport $3 -m state --state NEW -j ACCEPT
|
||||
return 0
|
||||
else
|
||||
echo "$0: syntax error for firewall_allow_input $1 $2 $3"
|
||||
echo "$0: arguments: PROTOCOL DST-IP PORT"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
firewall_start
|
||||
exit 0
|
||||
;;
|
||||
|
||||
stop)
|
||||
firewall_stop
|
||||
exit 0
|
||||
;;
|
||||
|
||||
test)
|
||||
firewall_test
|
||||
exit 0
|
||||
;;
|
||||
|
||||
restart)
|
||||
firewall_restart
|
||||
exit 0
|
||||
;;
|
||||
|
||||
status)
|
||||
firewall_status
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "$0: Iptables Firewall"
|
||||
echo "$0: { start | stop | restart | status | test }"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
</pre>
|
36
EnlighterJS/Resources/TestcaseData/sql.html
Normal file
36
EnlighterJS/Resources/TestcaseData/sql.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="sql">UPDATE Account SET amount=amount-200 WHERE account_number=1234;</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
|
||||
<!-- Source: http://en.wikipedia.org/wiki/SQL -->
|
||||
<pre data-enlighter-language="sql">
|
||||
/*Source: http://en.wikipedia.org/wiki/SQL*/
|
||||
|
||||
SELECT `Book.title` AS `Title`,
|
||||
COUNT(*) AS `Authors`
|
||||
FROM `Book` JOIN `Book_author`
|
||||
ON `Book`.`isbn` = `Book_author`.`isbn`
|
||||
GROUP BY `Book`.`title`;
|
||||
|
||||
DELETE FROM `My_table`
|
||||
WHERE `field2` = 'N';
|
||||
|
||||
|
||||
CREATE TABLE tbl_1(id INT);
|
||||
INSERT INTO tbl_1(id) VALUES(1);
|
||||
INSERT INTO tbl_1(id) VALUES(2);
|
||||
COMMIT;
|
||||
UPDATE tbl_1 SET id=200 WHERE id=1;
|
||||
SAVEPOINT id_1upd;
|
||||
UPDATE tbl_1 SET id=1000 WHERE id=2;
|
||||
ROLLBACK TO id_1upd;
|
||||
SELECT id FROM tbl_1;
|
||||
|
||||
START TRANSACTION;
|
||||
UPDATE Account SET amount=amount-200 WHERE account_number=1234;
|
||||
UPDATE Account SET amount=amount+200 WHERE account_number=2345;
|
||||
|
||||
IF ERRORS=0 COMMIT;
|
||||
IF ERRORS<>0 ROLLBACK;
|
||||
</pre>
|
111
EnlighterJS/Resources/TestcaseData/squirrel.html
Normal file
111
EnlighterJS/Resources/TestcaseData/squirrel.html
Normal file
|
@ -0,0 +1,111 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="squirrel">static num = 0;</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<pre data-enlighter-language="squirrel">
|
||||
// Squirrel support single-line comments
|
||||
# that use the pound/octothorpe and double-slashes
|
||||
/*
|
||||
As well as
|
||||
multi-line
|
||||
comments
|
||||
*/
|
||||
|
||||
// Sample code below from http://www.squirrel-lang.org/doc/squirrel3.html
|
||||
|
||||
local a = 123; //decimal
|
||||
local b = 0x0012; //hexadecimal
|
||||
local c = 075; //octal
|
||||
local d = 'w'; //char code
|
||||
|
||||
// Floats
|
||||
local a=1.0;
|
||||
local b=0.234;
|
||||
local c=1.521E-21
|
||||
local d=9891.214e32
|
||||
|
||||
// Array
|
||||
local a=["I","am","an","array"];
|
||||
|
||||
function testy(arg)
|
||||
{
|
||||
local a=10;
|
||||
print(a);
|
||||
return arg;
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(a<0) break;
|
||||
a-=1;
|
||||
}
|
||||
|
||||
local a=0;
|
||||
do
|
||||
{
|
||||
print(a+"\n");
|
||||
a+=1;
|
||||
} while(a>100)
|
||||
|
||||
local a=[10,23,33,41,589,56]
|
||||
foreach(val in a)
|
||||
print("value="+val+"\n");
|
||||
|
||||
// SOURCE: http://www.squirrel-lang.org/
|
||||
local table = {
|
||||
a = "10"
|
||||
subtable = {
|
||||
array = [1,2,3]
|
||||
},
|
||||
[10 + 123] = "expression index"
|
||||
}
|
||||
|
||||
local array=[ 1, 2, 3, { a = 10, b = "string" } ];
|
||||
|
||||
foreach (i,val in array)
|
||||
{
|
||||
::print("the type of val is"+typeof val);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
class Entity
|
||||
{
|
||||
constructor(etype,entityname)
|
||||
{
|
||||
name = entityname;
|
||||
type = etype;
|
||||
}
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
z = 0;
|
||||
name = null;
|
||||
type = null;
|
||||
}
|
||||
|
||||
function Entity::MoveTo(newx,newy,newz)
|
||||
{
|
||||
x = newx;
|
||||
y = newy;
|
||||
z = newz;
|
||||
}
|
||||
|
||||
class Player extends Entity {
|
||||
constructor(entityname)
|
||||
{
|
||||
base.constructor("Player",entityname)
|
||||
}
|
||||
function DoDomething()
|
||||
{
|
||||
::print("something");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
local newplayer = Player("da playar");
|
||||
|
||||
newplayer.MoveTo(100,200,300);
|
||||
print(newplayer.x + 1);
|
||||
|
||||
</pre>
|
181
EnlighterJS/Resources/TestcaseData/unit.html
Normal file
181
EnlighterJS/Resources/TestcaseData/unit.html
Normal file
|
@ -0,0 +1,181 @@
|
|||
<h4>Single Text Character Ending (; should be visible!)</h4>
|
||||
<pre data-enlighter-language="java" data-enlighter-lineoffset="4">int i=32; String k = "Hello World";</pre>
|
||||
|
||||
<h4>Line indentation of first line shouldn't removed</h4>
|
||||
<pre data-enlighter-language="javascript">
|
||||
alert('hello world');
|
||||
new FX.scroll(args);
|
||||
}
|
||||
|
||||
// other stuff
|
||||
</pre>
|
||||
|
||||
<h4>Line-Offset 4</h4>
|
||||
<pre data-enlighter-language="javascript" data-enlighter-lineoffset="4">alert('hello world');</pre>
|
||||
|
||||
<h4>Line-Offset 4; Force Linenumbers OFF</h4>
|
||||
<pre data-enlighter-language="javascript" data-enlighter-lineoffset="4" data-enlighter-linenumbers="false">alert('hello world');</pre>
|
||||
|
||||
<h4>Unknown Language - should be highlighted as standard</h4>
|
||||
<pre data-enlighter-language="UNKNOWN" >var x = "hello world";</pre>
|
||||
|
||||
<h4>RAW Code - should be rendered unhighlighted</h4>
|
||||
<pre data-enlighter-language="raw" >var x = "hello world";
|
||||
// don't highlight me!!!</pre>
|
||||
|
||||
<h4>UPPERCASE language name- should be rendered as javascript</h4>
|
||||
<pre data-enlighter-language="JS" >var x ={
|
||||
a: "hello world",
|
||||
b: 3
|
||||
};</pre>
|
||||
|
||||
<h4>Empty language attribute - should be rendered as standard</h4>
|
||||
<pre data-enlighter-language="" >var x ={
|
||||
a: "hello world",
|
||||
b: 3
|
||||
};</pre>
|
||||
|
||||
<h4>UPPERCASE theme name - should be rendered as git theme</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="GIT">
|
||||
if (this.options.editable) {
|
||||
lighter.set('contenteditable', 'true');
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h4>Overlapping Regex Matches</h4>
|
||||
<pre data-enlighter-language="php">
|
||||
echo 'You can also have embedded newlines in
|
||||
strings this way as it is
|
||||
okay to do';
|
||||
|
||||
// Outputs: Arnold once said: "I'll be back"
|
||||
echo 'Arnold once said: "I\'ll be back"';
|
||||
|
||||
// Outputs: You deleted C:\*.*?
|
||||
echo 'You deleted C:\\*.*?';
|
||||
|
||||
/** String's */
|
||||
echo 'this is a simple string';
|
||||
</pre>
|
||||
|
||||
<h4>Language Alias "mD" - should rendered as markdown</h4>
|
||||
<pre data-enlighter-language="mD">
|
||||
### Version 1.5.2 ###
|
||||
* Added Plugin section to readme file
|
||||
|
||||
### Version 1.5.1 ###
|
||||
* fixed YAML header within NSIS language support
|
||||
|
||||
### Version 1.5 ###
|
||||
* Added language support for NSIS (Nullsoft Scriptable Install System) provided by Jan T. Sott
|
||||
|
||||
### Version 1.4 ###
|
||||
* Added Quickstart Example
|
||||
* Renamed *Tests/* to *Examples/*
|
||||
|
||||
### Version 1.3 ###
|
||||
* Added odd/even classes to Compiler.List
|
||||
* Added Version+Build informations to css+js builds
|
||||
</pre>
|
||||
|
||||
<h4>No Code. Should render empty.</h4>
|
||||
<pre data-enlighter-language="js" ></pre>
|
||||
|
||||
<h4>Should rendered as full HTML comment - NOT &lt;!--</h4>
|
||||
<pre data-enlighter-language="html" data-enlighter-theme="git">
|
||||
<!-- <meta name="MetaTest" version="1.9.2" /> -->
|
||||
</pre>
|
||||
|
||||
<h4>Should also rendered as full HTML comment</h4>
|
||||
<pre data-enlighter-language="html" data-enlighter-theme="git">
|
||||
<!-- <meta name="MetaTest" version="1.9.2" /> -->
|
||||
</pre>
|
||||
|
||||
<h4>Double escaped HTML metacharacters &amp;lt; should rendered as <</h4>
|
||||
<pre data-enlighter-language="xml">
|
||||
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
|
||||
&lt;building name="GlobalDynamics Main Building" id="0xFA8A91C6617DFA1B"&gt;
|
||||
&lt;group level="2"&gt;
|
||||
</pre>
|
||||
|
||||
<h4>MooTools Theme</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="mooTOOLS">
|
||||
if (this.options.editable) {
|
||||
lighter.set('contenteditable', 'true');
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h4>Should be display in the style: comment,newline,code,newline,newline, comment</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="git">
|
||||
// should the element set to be editable ?
|
||||
if (this.options.editable) {
|
||||
|
||||
// test
|
||||
</pre>
|
||||
|
||||
<h4>No class - should render with default language/theme</h4>
|
||||
<pre>
|
||||
var myMootools = new Class({});
|
||||
</pre>
|
||||
|
||||
<h4>Should be unlighted - enlight(false) is called on the element</h4>
|
||||
<pre id="unlightMe" data-enlighter-language="js" data-enlighter-theme="git">
|
||||
compile: function(language, theme, tokens)
|
||||
{
|
||||
var lighter = this._compile(language, theme, tokens);
|
||||
|
||||
// Set class and id attributes.
|
||||
lighter.set('class', theme + 'Lighter');
|
||||
lighter.set('id', 'Lighter_' + Date.now());
|
||||
|
||||
if (this.options.editable) {
|
||||
lighter.set('contenteditable', 'true');
|
||||
}
|
||||
|
||||
return lighter;
|
||||
},
|
||||
</pre>
|
||||
|
||||
<h4>Should be lighted - enlight(false).enlight(true) is called on the element</h4>
|
||||
<pre id="relightMe" data-enlighter-language="js" data-enlighter-theme="git">
|
||||
compile: function(language, theme, tokens)
|
||||
{
|
||||
var lighter = this._compile(language, theme, tokens);
|
||||
return lighter;
|
||||
},
|
||||
</pre>
|
||||
|
||||
<h4>Should be grouped together - git theme</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="git" data-enlighter-group="helloworld" data-enlighter-title="Javascript">
|
||||
console.info("Hello World - I'am Javascript");
|
||||
</pre>
|
||||
<pre data-enlighter-language="java" data-enlighter-theme="twilight" data-enlighter-group="helloworld" data-enlighter-title="pure Java">
|
||||
System.out.println("Hello World - I'am Java");
|
||||
</pre>
|
||||
<pre data-enlighter-language="php" data-enlighter-theme="panic" data-enlighter-group="helloworld" data-enlighter-title="PHP Script">
|
||||
echo 'Hello World - I\'am PHP';
|
||||
</pre>
|
||||
|
||||
<h4>twilight theme - grouped (single element)</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="twilight" data-enlighter-group="single1" data-enlighter-title="Javascript">
|
||||
if (this.options.editable) {
|
||||
lighter.set('contenteditable', 'true');
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h4>mocha theme - grouped (single element, auto name)</h4>
|
||||
<pre data-enlighter-language="js" data-enlighter-theme="mocha" data-enlighter-group="single2">
|
||||
if (this.options.editable) {
|
||||
lighter.set('contenteditable', 'true');
|
||||
}
|
||||
</pre>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.addEvent('load', function() {
|
||||
// unlight element
|
||||
document.id('unlightMe').enlight(false);
|
||||
|
||||
// relight element
|
||||
document.id('relightMe').enlight(false).enlight(true);
|
||||
});
|
||||
</script>
|
66
EnlighterJS/Resources/TestcaseData/vhdl.html
Normal file
66
EnlighterJS/Resources/TestcaseData/vhdl.html
Normal file
|
@ -0,0 +1,66 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="vhdl">use IEEE.numeric_std.all; -- for the unsigned type</code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h3>Shell Script</h3>
|
||||
<pre data-enlighter-language="vhdl">
|
||||
-- Source: http://en.wikipedia.org/wiki/VHDL
|
||||
|
||||
library IEEE;
|
||||
use IEEE.std_logic_1164.all;
|
||||
use IEEE.numeric_std.all; -- for the unsigned type
|
||||
|
||||
entity COUNTER is
|
||||
generic (
|
||||
WIDTH : in natural := 32);
|
||||
port (
|
||||
RST : in std_logic;
|
||||
CLK : in std_logic;
|
||||
LOAD : in std_logic;
|
||||
DATA : in std_logic_vector(WIDTH-1 downto 0);
|
||||
Q : out std_logic_vector(WIDTH-1 downto 0));
|
||||
end entity COUNTER;
|
||||
|
||||
architecture RTL of COUNTER is
|
||||
signal CNT : unsigned(WIDTH-1 downto 0);
|
||||
begin
|
||||
process(RST, CLK) is
|
||||
begin
|
||||
if RST = '1' then
|
||||
CNT <= (others => '0');
|
||||
elsif rising_edge(CLK) then
|
||||
if LOAD = '1' then
|
||||
CNT <= unsigned(DATA); -- type is converted to unsigned
|
||||
else
|
||||
CNT <= CNT + 1;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
Q <= std_logic_vector(CNT); -- type is converted back to std_logic_vector
|
||||
end architecture RTL;
|
||||
|
||||
process
|
||||
begin
|
||||
wait until START = '1'; -- wait until START is high
|
||||
|
||||
for i in 1 to 10 loop -- then wait for a few clock periods...
|
||||
wait until rising_edge(CLK);
|
||||
end loop;
|
||||
|
||||
for i in 1 to 10 loop -- write numbers 1 to 10 to DATA, 1 every cycle
|
||||
DATA <= to_unsigned(i, 8);
|
||||
wait until rising_edge(CLK);
|
||||
end loop;
|
||||
|
||||
-- wait until the output changes
|
||||
wait on RESULT;
|
||||
|
||||
-- now raise ACK for clock period
|
||||
ACK <= '1';
|
||||
wait until rising_edge(CLK);
|
||||
ACK <= '0';
|
||||
|
||||
-- and so on...
|
||||
end process;
|
||||
</pre>
|
32
EnlighterJS/Resources/TestcaseData/xml.html
Normal file
32
EnlighterJS/Resources/TestcaseData/xml.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code data-enlighter-language="xml"><room number="123">Conference Room A</room></code> invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<!-- Source: http://de.wikipedia.org/wiki/Extensible_Markup_Language -->
|
||||
<pre data-enlighter-language="xml">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<building name="GlobalDynamics Main Building"
|
||||
core:id="0xFA8A91C6617DFA1B" core:uid="0898213-123123123-1230898123" xmlns:core="http://www.xmlnamespace.tld">
|
||||
<core:group core:level="2">
|
||||
<room number="123">Conference Room A</room>
|
||||
<room number="124">Conference Room B</room>
|
||||
<room number="125">Conference Room C</room>
|
||||
<room number="126">Conference Room D</room>
|
||||
</core:group>
|
||||
<core:group core:level="2">
|
||||
<room number="17">John's Office</room>
|
||||
<room number="19">Eric's Office</room>
|
||||
</core:group>
|
||||
<core:group core:level="1">
|
||||
<room number="091">Mainframe Housing A</room>
|
||||
<room number="092">Mainframe Housing B</room>
|
||||
<room number="090">Mainframe Power Supply Station</room>
|
||||
<room number="089">Mainframe Backup Power Supply Station</room>
|
||||
</core:group>
|
||||
<core:group core:level="8">
|
||||
<room number="1717" role="cto">CTO Office</room>
|
||||
<room number="1819" role="ceo">CEO Office</room>
|
||||
<room number="1820" role="cfo">CFO Office</room>
|
||||
</core:group>
|
||||
</building>
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue