Changeset View
Changeset View
Standalone View
Standalone View
autotests/input/test.markdown
Show All 34 Lines | |||||
35 | normal text | 35 | normal text | ||
36 | 36 | | |||
37 | Title: some text | 37 | Title: some text | ||
38 | 38 | | |||
39 | normal text | 39 | normal text | ||
40 | 40 | | |||
41 | # Fenced code blocks (bug 356974) | 41 | # Fenced code blocks (bug 356974) | ||
42 | 42 | | |||
43 | ## Bash | ||||
44 | | ||||
45 | ```bash | ||||
46 | #!/usr/bin/env bash | ||||
47 | | ||||
48 | for f in *; do | ||||
49 | echo "$f" | ||||
50 | done | ||||
51 | ``` | ||||
52 | | ||||
53 | ## C++ | ||||
54 | | ||||
55 | ```cpp | ||||
56 | #include <QtCore/QObject> | ||||
57 | | ||||
58 | class Q : public QObject { | ||||
59 | Q_OBJECT | ||||
60 | public: | ||||
61 | Q(); | ||||
62 | } | ||||
63 | | ||||
64 | Q::Q() :QObject(NULL) { | ||||
65 | } | ||||
66 | ``` | ||||
67 | | ||||
68 | ## CMake | ||||
69 | | ||||
70 | ```cmake | ||||
71 | cmake_minimum_required(VERSION 3.10 FATAL_ERROR) | ||||
72 | | ||||
73 | project (hello_world) | ||||
74 | | ||||
75 | set(QT_MIN_VERSION "5.6.0") | ||||
76 | ``` | ||||
77 | | ||||
78 | ## CSS | ||||
79 | | ||||
80 | ```css | ||||
81 | h1.main::hover { | ||||
82 | font-size: 100; | ||||
83 | color: green; | ||||
84 | } | ||||
85 | ``` | ||||
86 | | ||||
87 | |||||
88 | | ||||
89 | |||||
90 | From: Konqi Dragon <konqi@kde.org> | ||||
91 | To: All <all@kde.og> | ||||
92 | Subject: highlights | ||||
93 | ``` | ||||
94 | | ||||
95 | ## Haskell | ||||
96 | | ||||
97 | ```haskell | ||||
98 | module Main (main) where | ||||
99 | | ||||
100 | main :: IO () | ||||
101 | main = putStrLn "Hello, World!" | ||||
102 | ``` | ||||
103 | | ||||
104 | ## HTML | ||||
105 | | ||||
106 | ```html | ||||
107 | <html> | ||||
108 | <body> | ||||
109 | <p class="main">Hello world!</p> | ||||
110 | </body> | ||||
111 | </html> | ||||
112 | ``` | ||||
113 | | ||||
114 | ## JSON | ||||
115 | | ||||
116 | ```json | ||||
117 | [{ | ||||
118 | "hello": "world", | ||||
119 | "count": 1, | ||||
120 | "bool": true | ||||
121 | }] | ||||
122 | ``` | ||||
123 | | ||||
124 | ## KConfig | ||||
125 | | ||||
126 | ```kconfig | ||||
127 | [General] | ||||
128 | Toggle=true | ||||
129 | Count=1 | ||||
130 | ``` | ||||
131 | | ||||
43 | ## PHP | 132 | ## PHP | ||
44 | 133 | | |||
45 | ```php | 134 | ```php | ||
46 | namespace Application\Controller; | 135 | namespace Application\Controller; | ||
47 | 136 | | |||
48 | use Zend\Mvc\Controller\AbstractActionController; | 137 | use Zend\Mvc\Controller\AbstractActionController; | ||
49 | 138 | | |||
50 | class IndexController extends AbstractActionController | 139 | class IndexController extends AbstractActionController | ||
51 | { | 140 | { | ||
52 | } | 141 | } | ||
53 | ``` | 142 | ``` | ||
54 | 143 | | |||
55 | ## Python | 144 | ## Python | ||
56 | 145 | | |||
57 | ```python | 146 | ```python | ||
58 | def addXToY(x, y): | 147 | def addXToY(x, y): | ||
59 | total = x + y | 148 | total = x + y | ||
60 | print total | 149 | print total | ||
61 | ``` | 150 | ``` | ||
62 | 151 | | |||
152 | ## QML | ||||
153 | | ||||
154 | ```qml | ||||
155 | Text { | ||||
156 | id: hello | ||||
157 | width: 100 | ||||
158 | text: "Hello world!" | ||||
159 | } | ||||
160 | ``` | ||||
161 | | ||||
162 | ## Rust | ||||
163 | | ||||
164 | ```rust | ||||
165 | fn main() { | ||||
166 | println!("Hello world!"); | ||||
167 | } | ||||
168 | ``` | ||||
169 | | ||||
170 | ## XML | ||||
171 | | ||||
172 | ```xml | ||||
173 | <tag attribute="3"> | ||||
174 | <nested/> | ||||
175 | </tag> | ||||
176 | ``` | ||||
177 | | ||||
63 | ## No language specified | 178 | ## No language specified | ||
64 | 179 | | |||
65 | ``` | 180 | ``` | ||
66 | No language is specified, but it should be still rendered as code block. | 181 | No language is specified, but it should be still rendered as code block. | ||
67 | ``` | 182 | ``` |