--------- beginning of system02-29 16:51:18.810 188 188 V test : When he woke up, the dinosaur was still there
02-29 16:51:18.811 188 188 V test : When he woke up, the dinosaur was still there
02-29 16:51:18.821 188 188 I test : When he woke up, the dinosaur was still there02-29 16:51:18.849 188 191 I test : When he woke up, the dinosaur was still there02-29 16:51:18.850 188 191 D test : When he woke up, the dinosaur was still there02-29 16:51:18.850 188 191 D test : When he woke up, the dinosaur was still there02-29 16:51:18.854 188 193 W test : When he woke up, the dinosaur was still there02-29 16:51:18.854 188 193 W test : When he woke up, the dinosaur was still there02-29 16:51:18.854 188 193 E test : When he woke up, the dinosaur was still there02-29 16:51:18.854 188 193 E test : When he woke up, the dinosaur was still there02-29 16:51:18.857 188 193 A test : When he woke up, the dinosaur was still there02-29 16:51:18.857 188 193 A test : When he woke up, the dinosaur was still there
-02-29 16:51:18.857 188 193 S test : When he woke up, the dinosaur was still there
-02-29 16:51:29.154 580 580 S test : When he woke up, the dinosaur was still there
+02-29 16:51:18.857 188 193 S test : When he woke up, the dinosaur was still there
+02-29 16:51:29.154 580 580 S test : When he woke up, the dinosaur was still there02-29 16:51:30.423 580 580 F test : When he woke up, the dinosaur was still there02-29 16:51:30.468 580 580 F test : When he woke up, the dinosaur was still there--------- beginning of brief formatV/test ( 119): When he woke up, the dinosaur was still there
V/test ( 119): When he woke up, the dinosaur was still there
--------- beginning of year format2018-02-29 16:51:40.899 1362 1365 I test : When he woke up, the dinosaur was still there2018-02-29 16:51:40.899 1362 1365 I test : When he woke up, the dinosaur was still there--------- beginning of color format[38;5;166m03-20 16:51:40.898 1664 1770 F test : When he woke up, the dinosaur was still there[0m[38;5;166m03-20 16:51:40.899 1664 1779 D test : When he woke up, the dinosaur was still there[0m[38;5;166m03-20 16:51:40.899 1664 1755 D test : When he woke up, the dinosaur was still there[0m--------- beginning of epoch format1521575578.229 188 191 W test : When he woke up, the dinosaur was still there1521575578.246 188 191 W test : When he woke up, the dinosaur was still there--------- beginning of monotonic format13.418 188 193 E test : When he woke up, the dinosaur was still there13.419 188 193 E test : When he woke up, the dinosaur was still there--------- beginning of process formatA( 148) When he woke up, the dinosaur was still thereA( 148) When he woke up, the dinosaur was still there--------- beginning of tag format
-S/test : When he woke up, the dinosaur was still there
-S/test : When he woke up, the dinosaur was still there
+S/test : When he woke up, the dinosaur was still there
+S/test : When he woke up, the dinosaur was still there--------- beginning of thread formatF( 1664: 1664) When he woke up, the dinosaur was still thereF( 1664: 2268) When he woke up, the dinosaur was still thereE( 1664: 2269) When he woke up, the dinosaur was still thereE( 1664: 2270) When he woke up, the dinosaur was still there--------- beginning of time format02-29 19:33:50.940 V/test ( 188): When he woke up, the dinosaur was still there
02-29 19:33:50.940 V/test ( 188): When he woke up, the dinosaur was still there
--------- beginning of uid format02-29 19:33:50.950 root 188 193 I/test : When he woke up, the dinosaur was still there02-29 19:33:51.049 1000 229 229 I/test : When he woke up, the dinosaur was still there--------- beginning of usec format02-29 19:33:51.850400 229 229 D/test : When he woke up, the dinosaur was still there02-29 19:33:51.854069 229 242 D/test : When he woke up, the dinosaur was still there--------- beginning of utc/zone format02-29 19:33:51.050 -0300 580 688 W/test : When he woke up, the dinosaur was still there02-29 19:33:51.067 +0000 580 688 W/test : When he woke up, the dinosaur was still there--------- beginning of long format
[ 02-29 16:51:18.810 188: 188 V/vold ]
When he woke up, the dinosaur was still there
[ 02-29 16:51:18.811 188: 188 I/vold ]
When he woke up, the dinosaur was still there
[ 02-29 16:51:18.821 188: 188 D/Vold ]
When he woke up, the dinosaur was still there
[ 02-29 16:51:18.849 188: 191 W/vold ]
Whenhe woke up,the dinosaur was still there
[ 02-29 16:51:18.850 188: 191 E/MessageQueue ]
When he woke up,the dinosaur was still there
[ 02-29 16:51:18.854 188: 193 A/vold ]
When he woke up, the dinosaur was still there
-[ 02-29 16:51:18.859 188: 193 S/vold ]
-When he woke up, the dinosaur was still there
+[ 02-29 16:51:18.859 188: 193 S/vold ]
+When he woke up, the dinosaur was still there
[ 02-29 16:51:18.902 188: 199 F/libc ]
When he woke up, the dinosaur was still there--------- error (different formats)02-30 20:00:00.123 188 193 E error line : When he woke up, the dinosaur was still there02-30 20:00:01.112 188 193 E error line : When he woke up, the dinosaur was still there13.418 188 193 E test : When he woke up, the dinosaur was still thereE( 148) When he woke up, the dinosaur was still thereE/test : When he woke up, the dinosaur was still thereE( 1664: 2269) When he woke up, the dinosaur was still there02-30 20:00:03.240 E/test ( 188): When he woke up, the dinosaur was still there
[ 02-30 20:00:04.001 188: 195 E/Error ]
When he woke up, the dinosaur was still there
/// <reference types="node"/>// TypeScript Testclass Student {
fullName: string;
constructor(public firstName: string, public middleInitial: string, public lastName: string) {
this.fullName = firstName + " " + middleInitial + " " + lastName;
}
}
interface Person {
firstName: string;
lastName: string;
}
functiongreeter(person : Person) {
return"Hello, " + person.firstName + " " + person.lastName;
}
let user = newStudent("Jane", "M.", "User");
document.body.innerHTML = greeter(user);
JSON.stringify()
console.log("Hello world");
import http = require("http");
import path = require("path");
import URL = url.URL;
import { Readable, Writable } from"stream";
import { isBuffer, isString, isObject } from"util";
const port = 8__88___8;
const baseUrl = newURL(`http://localhost:${port}/`);
const rootDir = path.dirname(__dirname);
const defaultBrowser = os.platform() === "win32" ? "edge" : "chrome";
let browser: "edge" | "chrome" | "none" = defaultBrowser;
let grep: string | undefined;
interface FileBasedTestConfiguration {
[setting: string]: string;
}
functionswapCase(s: string): string {
returns.replace(/\w/g, (ch) => {
const up = ch.toUpperCase();
return ch === up ? ch.toLowerCase() : up;
});
}
for (var i in pieces) {
switch (true) {
case/^\"?Accession\"?/.test(pieces[i]):
numeration[0] = i;
break;
}
}
constenum ResponseCode {
Success = 200,
BadRequest = 400
}
// SubstitutionsexportfunctionisInOpenInterval(start: number, end: number) {
returntersible(a => a > start && a < end, () =>`(${start}...${end})`)
}
const bar = `${x}${y}`;
// readonlyfunctionf1(mt: [number, number], rt: readonly [number, number]) {
}
functionf2(ma: string[], ra: readonlystring[], mt: [string, string], rt: readonly [string, string]) {
}
type ReadWrite<T> = { -readonly [P inkeyof T] : T[P] };
// const assertionlet obj = { x: 10, y: [20, 30], z: { a: { b: 42 } } } asconst;
let r2 = { x: 20, y: 10 } asconst;
let r2 = {...p} asconst;
let p1 = { x: 10, y: 20asconst };
let p2 = { 10asconst, 'foo'asconst };
// Definite assignment operatorclass Cl {
- one?: string;
+ one?: string;
two!: string;
}
let x! = 1;
// Function with multiple argumentsconst children = [].map<Set<Map<number, string>>>(element => {
if (!this.identityProvider) {
return element;
}
return element;
});
// Numericsvar a = 0xA;
var b = 0b1;
var c = 0o7;
var d = 1.1E+3;
var e = 1.E+3;
var f = .1E+3;
var g = 1E+3;
var h = 1.1;
var i = 1.;
var j = .1;
var k = 1;
var l = 1__.e+3_22 | .2____e2 | 0o1_23 | 11__. ;
// Bigintconst binBig = 0b101n;
const octBig = 0o567n;
const hexBig = 0xC0Bn;
const decBig = 123n;
// Typeslet a: null = null;
let b: number = 123;
let c: number = 123.456;
let d: string = `Geeks`;
let e: undefined = undefined;
let f: boolean = true;
let g: number = 0b111001; // Binarylet h: number = 0o436; // Octallet i: number = 0xadf0d; // Hexa-Decimal const query = query<[number], number>(` SELECT * FROM statistics WHERE unit_id = $1`)
functionrunQuery() {
const query = createQuery<[number[]], Table<Columns>>(` some SQL here `)
returndatabase.execute(query)
}
aa: <sdf/> string ?<ssd/> string
string // Don't highlight
aa: string assa |
string
string ;
string
aa: { string
string } // Don't highlight
aa: [ stringstring ]
aa: ( string
string ) // Don't highlight
aa: string <string>
interface a {
aa: /* comment */string,
bb: /* comment */number,
cc: // commentvoid,
dd:
any,
}
null, <{[key]: () =>any}> nullnull, <{[key]: () =>{a: number}}> null// Correctly highlighting regular expressions
dt = ((dt[0] * 1e9 + dt[1]) / 1e6).toFixed(3).replace(/\.?0+$/, '') + 'ms';
(a[0] / 2) / (2)
// Type guardsfunctionisNumber(x: any): x isnumber {
returntypeof x === "number";
}
// Conditional expressions (highlight keywords before ":")class C {
w = () =>this.a() ? true : this.b() ? false : true;
z = () =>this.b() ? hello : k;
}
diff --git a/autotests/reference/test.markdown.ref b/autotests/reference/test.markdown.ref
index 10c0843..3fef013 100644
--- a/autotests/reference/test.markdown.ref
+++ b/autotests/reference/test.markdown.ref
@@ -1,582 +1,582 @@
--- Title: A Sample Markdown Document Author: Fletcher T. Penney Date: February 9, 2011 Comment: This is a comment intended to demonstrate metadata that spans multiple lines. --- # H1 ## H2 ### H3 Multi-line paragraph bla bla bla bla bla bla. Intentional line break via two spaces at line. Formats: _italic_, **bold**, `monospace`, ~~strikeout~~ Bullet list: * item1 * item2 Numbered list: 1. item 1 2. item 2 Task list: - [x] Finish my changes - [ ] Push my commits - [ ] Open a pull request A link as normal text: http://example.com [link](http://kde.org) Auto-link: <http://kate-editor.org> Mail: mark@kde.org> This is [an example](http://example.com/ "Title") inline link. See my [About](/about/) page for details. This is [an example] [id] reference-style link. [id]: http://example.com/ "Optional Title Here" [foo]: http://example.com/ 'Optional Title Here' [bar]: http://example.com/ (Optional Title Here) [id2]: <http://example.com/> "Optional Title Here" ![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title") [![Alt text](https://url/to/img.svg)](https://link.com/example/) code 1 code 2 normal text
>
block quote _italic_
>
more block quote normal text Title: some text normal text # Lists 1. item * This is a list item with multiple lines. ``` code ```
>
This is a blockquote This is a new paragraph, which is part of the item in the previous list. indented code block Other paragraph. * subitem * subitem with multiple lines. New paragraph of the previous subitem. code block ----------------------- Other paragraph of the subitem. 30. numlist item 31. numlist item New paragraph of the previous item.
normal text *italic* # Code `simple code` ``simple ` code`` ```simple `` ` code ``` ````simple`code```` normal text normal text normal text normal text code blocks are only allowed after an empty line. * list list normal text 1. num-list num-list normal text
>
quote quote code block normal code normal code # Fenced code blocks (bug 356974) ## Bash ```bash #!/usr/bin/env bash forf *;do echo"$f" done ``` ## C++ ```cpp #include class Q :publicQObject{ Q_OBJECT public: Q(); } Q::Q():QObject(NULL){ } ``` ## C ```c #include #include "stdint.h" #define SOME_VAR 1
staticuint64_t intWithSuffix =42ull+~1233L;
staticint octNum =07232; ``` ## C# ## ```csharp
var arr =new[]{0,1,2,3,4};
var anon =new{ Country ="Germany", Inhabitants =80000000}; ``` ## CMake ```cmake cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project (hello_world) set(QT_MIN_VERSION"5.6.0") ``` ## CSS ```css h1.main::hover { font-size: 100; color: green; } ``` ## Email ```email From: Konqi Dragon To: All Subject: highlights ``` ## Go ```go package main import"fmt" func main(){ fmt.Println("Hola, mundo.") } ``` ## Haskell ```haskell moduleMain (main) where main ::IO () main=putStrLn"Hello, World!" ``` ## HTML ```html
class="main">Hello world!
``` ## Java ```java package fibsandlies; import java.util.HashMap; /** * This is an example of a Javadoc comment; Javadoc can compile documentation * from this text. Javadoc comments must immediately precede the class, method, or field being documented. */ publicclass FibCalculator extends Fibonacci implements Calculator { privatestaticMap<Integer,Integer> memoized =newHashMap<Integer,Integer>(); publicstaticvoidmain(String[] args){ memoized.put(1,1); memoized.put(2,1); System.out.println(fibonacci(12)); } } ``` ## JavaScript ```js function(n) { if (n ===0) { return1;// 0! = 1 } return n *(n -1); } ``` ## JavaScript React (JSX) ```jsx /> function(props) { constSpecificStory =components[props.]; return story={props.}attr2="&ref;"attr3="Hello\n"/>; } ``` ## JSON ```json [{ "hello":"world", "count":1, "bool":true }] ``` ## Matlab ```matlab % Numbers _____________________________________________ 5,5.5,.1,0.1,0.4e5,1.2e-5,5i,5.3i,6j,.345+3i 5',5.5',.1',0.1',0.4e5',1.2e-5',5i',5.3i',6j',.345+3i' ``` ## Markdown ```markdown
-**bold** `code`
-> quote
+**bold**`code`
+
{{/movie}} ``` ## Perl ```perl my$var = shift;
$var =~ s/bla/foo/igs;
$var =~ s!bla!foo!igs;
$var =~ s#bla#foo#igs; ``` ## PHP ```php namespace Application\Controller; use Zend\Mvc\Controller\AbstractActionController; class IndexController extends AbstractActionController { } ``` ## Python ```python def addXToY(x, y): total = x + y print total ``` ## QML ```qml Text { id:hello width:100 text:"Hello world!" } ``` ## R ```r # Declare function “f” with parameters “x”, “y“ # that returns a linear combination of x and y. f <-function(x, y){ z <-3*x +4*y return(z) } ``` ## Ruby ```ruby require'Config' defCGI::escape(string) string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do '%'+$1.unpack('H2'*$1.size).join('%').upcase end.tr(' ', '+') end ``` ## Rust ```rust fn main() { println!("Hello world!"); } ``` ## MySQL ```mysql -- comment CREATETABLE stuff COLUMNS(col1 INT, col2 Varchar); SELECT*FROM stuff WHERE id ='string'; select*from stuff where id <0.42; Select col1, col2 From stuff Where stuff.col1 ISNOTNuLL; ``` ## TypeScript ```ts classStudent { fullName:string; constructor(publicfirstName:string,publicmiddleInitial:string,publiclastName:string) { this.=firstName +" "+middleInitial +" "+lastName; } } ``` ## XML ```xml attribute="3"> ``` ## reStructuredText ```rst Section Header ============== .. image:: /path/to/image.jpg - A bullet list item ``` ## Doxygen ```doxygen a normal member taking two arguments and returning an integer value. @parama an integer argument. @params a constant character pointer. @see Javadoc_Test() @see publicVar() @return The test results ``` ## No language specified ``` No language is specified, but it should be still rendered as code block. ``` # Fenced code blocks with more than 3 backticks or tildes ~~~ Fenced code block with 3 tildes. ~~~ ````````` Some implementations of Markdown/MultiMarkdown support more than 3 backticks or tildes. ``` The block ends with the same amount of backticks. ````````` ~~~~~~~~~~~~ Fenced code block with more tildes. ~~~~~~~~~~~~ ## With languages ```````html
class="main">Hello world!
``` ``````` ~~~bash forf *;do echo"$f" done ~~~ ~~~~~~~~~python def addXToY(x, y): total = x + y print total ~~~# <= doesn't end here ~~~~~~~~~ # Italic and bold text **b***i*__b___i_ ***ib***___ib___ **_ib_**__*ib*__ * _italic_**bold*****ib***~~strikeout~~