Changeset View
Changeset View
Standalone View
Standalone View
autotests/folding/test.markdown.fold
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 *; <beginfold id='5'>do</beginfold id='5'> | ||||
49 | echo "$f" | ||||
50 | <endfold id='5'>done</endfold id='5'> | ||||
51 | ``` | ||||
52 | | ||||
53 | ## C++ | ||||
54 | | ||||
55 | ```cpp | ||||
56 | #include <QtCore/QObject> | ||||
57 | | ||||
58 | class Q : public QObject <beginfold id='11'>{</beginfold id='11'> | ||||
59 | Q_OBJECT | ||||
60 | public: | ||||
61 | Q(); | ||||
62 | <endfold id='11'>}</endfold id='11'> | ||||
63 | | ||||
64 | Q::Q() :QObject(NULL) <beginfold id='11'>{</beginfold id='11'> | ||||
65 | <endfold id='11'>}</endfold id='11'> | ||||
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 <beginfold id='23'>{</beginfold id='23'> | ||||
82 | font-size: 100; | ||||
83 | color: green; | ||||
84 | <endfold id='23'>}</endfold id='23'> | ||||
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 | <beginfold id='68'>[</beginfold id='68'><beginfold id='67'>{</beginfold id='67'> | ||||
118 | "hello": "world", | ||||
119 | "count": 1, | ||||
120 | "bool": true | ||||
121 | <endfold id='67'>}</endfold id='67'><endfold id='68'>]</endfold id='68'> | ||||
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 | <beginfold id='6'>{</beginfold id='6'> | 140 | <beginfold id='80'>{</beginfold id='80'> | ||
52 | <endfold id='6'>}</endfold id='6'> | 141 | <endfold id='80'>}</endfold id='80'> | ||
53 | ``` | 142 | ``` | ||
54 | 143 | | |||
55 | ## Python | 144 | ## Python | ||
56 | 145 | | |||
57 | ```python | 146 | ```python | ||
58 | def addXToY<beginfold id='64'>(</beginfold id='64'>x, y<endfold id='64'>)</endfold id='64'>: | 147 | def addXToY<beginfold id='84'>(</beginfold id='84'>x, y<endfold id='84'>)</endfold id='84'>: | ||
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 <beginfold id='87'>{</beginfold id='87'> | ||||
156 | id: hello | ||||
157 | width: 100 | ||||
158 | text: "Hello world!" | ||||
159 | <endfold id='87'>}</endfold id='87'> | ||||
160 | ``` | ||||
161 | | ||||
162 | ## Rust | ||||
163 | | ||||
164 | ```rust | ||||
165 | fn main() <beginfold id='90'>{</beginfold id='90'> | ||||
166 | println!("Hello world!"); | ||||
167 | <endfold id='90'>}</endfold id='90'> | ||||
168 | ``` | ||||
169 | | ||||
170 | ## XML | ||||
171 | | ||||
172 | ```xml | ||||
173 | <beginfold id='96'><tag</beginfold id='96'> attribute="3"> | ||||
174 | <beginfold id='96'><nested</beginfold id='96'><endfold id='96'>/></endfold id='96'> | ||||
175 | </tag<endfold id='96'>></endfold id='96'> | ||||
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 | ``` |