| 1 |
<pre class="example"> |
| 2 |
some results without a block |
| 3 |
</pre> |
| 4 |
<figure> |
| 5 |
<div class="src src-bash"> |
| 6 |
<div class="highlight"> |
| 7 |
<pre> |
| 8 |
echo "a bash source block" |
| 9 |
|
| 10 |
function hello { |
| 11 |
echo Hello World! |
| 12 |
} |
| 13 |
|
| 14 |
hello |
| 15 |
</pre> |
| 16 |
</div> |
| 17 |
</div> |
| 18 |
<figcaption> |
| 19 |
block caption |
| 20 |
</figcaption> |
| 21 |
</figure> |
| 22 |
<div class="src src-text"> |
| 23 |
<div class="highlight"> |
| 24 |
<pre> |
| 25 |
a source block with leading newline, trailing newline characters |
| 26 |
and a line started |
| 27 |
with leading space |
| 28 |
and line leading tab. |
| 29 |
</pre> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
<div class="src src-text"> |
| 33 |
<div class="highlight"> |
| 34 |
<pre> |
| 35 |
a source block without a language |
| 36 |
</pre> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
<div class="src src-bash"> |
| 40 |
<div class="highlight"> |
| 41 |
<pre> |
| 42 |
echo a source block with results |
| 43 |
</pre> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
<pre class="example"> |
| 47 |
a source block with results |
| 48 |
</pre> |
| 49 |
<pre class="example"> |
| 50 |
a source block that only exports results |
| 51 |
</pre> |
| 52 |
<pre class="example"> |
| 53 |
but the result block is |
| 54 |
</pre> |
| 55 |
<pre class="example"> |
| 56 |
an example block with |
| 57 |
multiple lines including |
| 58 |
|
| 59 |
|
| 60 |
empty lines! |
| 61 |
|
| 62 |
it also has multiple parameters |
| 63 |
|
| 64 |
src, example & export blocks treat their content as raw text |
| 65 |
/inline/ *markup* is ignored |
| 66 |
and whitespace is honored and not removed |
| 67 |
|
| 68 |
content of example blocks is still html escaped - see <script>alert("escaped")</script> |
| 69 |
</pre> |
| 70 |
<pre class="example"> |
| 71 |
examples like this |
| 72 |
are also supported |
| 73 |
|
| 74 |
note that /inline/ *markup* ignored |
| 75 |
</pre> |
| 76 |
<blockquote> |
| 77 |
<p>Mongodb is <strong>webscale</strong>. (source: <a href="http://www.mongodb-is-web-scale.com/">mongodb-is-web-scale</a>)</p> |
| 78 |
<p> |
| 79 |
blocks like the quote block parse their content and can contain</p> |
| 80 |
<ul> |
| 81 |
<li>lists</li> |
| 82 |
<li>inline <em>markup</em></li> |
| 83 |
<li> |
| 84 |
<p>tables</p> |
| 85 |
<table> |
| 86 |
<tbody> |
| 87 |
<tr> |
| 88 |
<td>foo</td> |
| 89 |
</tr> |
| 90 |
<tr> |
| 91 |
<td>bar</td> |
| 92 |
</tr> |
| 93 |
<tr> |
| 94 |
<td>baz</td> |
| 95 |
</tr> |
| 96 |
</tbody> |
| 97 |
</table> |
| 98 |
</li> |
| 99 |
<li>paragraphs</li> |
| 100 |
<li>… |
| 101 |
|
| 102 |
whitespace is honored and not removed (but is not displayed because that's how html works by default) |
| 103 |
it can be made visible using css (e.g. <code class="verbatim">white-space: pre</code>).</li> |
| 104 |
</ul> |
| 105 |
</blockquote> |
| 106 |
<div class="src src-org"> |
| 107 |
<div class="highlight"> |
| 108 |
<pre> |
| 109 |
#+BEGIN_SRC bash |
| 110 |
echo src (with language org) and example blocks support escaping using commata |
| 111 |
#+END_SRC |
| 112 |
|
| 113 |
,* I am not a real headline - commata escape characters aren't renderered |
| 114 |
</pre> |
| 115 |
</div> |
| 116 |
</div> |
| 117 |
<pre class="example"> |
| 118 |
#+BEGIN_SRC bash |
| 119 |
echo src (with language org) and example blocks support escaping using commata |
| 120 |
#+END_SRC |
| 121 |
|
| 122 |
,* I am not a real headline - commata escape characters aren't renderered |
| 123 |
</pre> |
| 124 |
<script> |
| 125 |
console.log("Hello World!") |
| 126 |
</script> |
| 127 |
<ul> |
| 128 |
<li> |
| 129 |
<p>list item 1 |
| 130 |
blocks can contain unindented lines that would normally end a list item</p> |
| 131 |
<pre class="example"> |
| 132 |
this line is not indented - if it was outside of a block the list item would end |
| 133 |
</pre> |
| 134 |
<blockquote> |
| 135 |
<p>this line is not indented - if it was outside of a block the list item would end</p> |
| 136 |
</blockquote> |
| 137 |
<p>now we're outside the block again and the following unindented line will be outside of the list item</p> |
| 138 |
</li> |
| 139 |
</ul> |
| 140 |
<p>this unindented line is outside of the list item</p> |
| 141 |
<ul> |
| 142 |
<li> |
| 143 |
<p>list item 2</p> |
| 144 |
<div class="src src-text"> |
| 145 |
<div class="highlight"> |
| 146 |
<pre> |
| 147 |
#+BEGIN_EXAMPLE |
| 148 |
</pre> |
| 149 |
</div> |
| 150 |
</div> |
| 151 |
<p>#+END_EXAMPLE</p> |
| 152 |
<blockquote> |
| 153 |
<pre class="example"> |
| 154 |
#+END_QUOTE |
| 155 |
</pre> |
| 156 |
</blockquote> |
| 157 |
</li> |
| 158 |
<li> |
| 159 |
<p>verse blocks</p> |
| 160 |
<ul> |
| 161 |
<li> |
| 162 |
<p>emacs / ox-hugo rendering</p> |
| 163 |
<p class="verse"> |
| 164 |
Great clouds overhead<br /> |
| 165 |
Tiny black birds rise and fall<br /> |
| 166 |
Snow covers Emacs<br /> |
| 167 |
<br /> |
| 168 |
---AlexSchroeder<br /> |
| 169 |
</p> |
| 170 |
</li> |
| 171 |
<li> |
| 172 |
<p>go-org rendering</p> |
| 173 |
<div class="src src-html"> |
| 174 |
<div class="highlight"> |
| 175 |
<pre> |
| 176 |
<style> |
| 177 |
.verse-block p { white-space: pre; } |
| 178 |
.verse-block p + p { margin: 0; } |
| 179 |
</style> |
| 180 |
</pre> |
| 181 |
</div> |
| 182 |
</div> |
| 183 |
<style> |
| 184 |
.verse-block p { white-space: pre; } |
| 185 |
.verse-block p + p { margin: 0; } |
| 186 |
</style> |
| 187 |
<div class="verse-block"> |
| 188 |
<p>Great clouds overhead |
| 189 |
Tiny black birds rise and fall |
| 190 |
Snow covers Emacs</p> |
| 191 |
<p> |
| 192 |
—AlexSchroeder</p> |
| 193 |
</div> |
| 194 |
</li> |
| 195 |
</ul> |
| 196 |
</li> |
| 197 |
</ul> |
| 198 |
<div class="src src-raku"> |
| 199 |
<div class="highlight"> |
| 200 |
<pre> |
| 201 |
describe <a b c>; |
| 202 |
</pre> |
| 203 |
</div> |
| 204 |
</div> |