Welcome to little lamb

Code » qmdoc » commit e96ffdb

Fix code blocks in base.htm

author Olivier Brunel
2022-12-24 15:53:05 UTC
committer Olivier Brunel
2022-12-24 15:53:05 UTC
parent 8c2f72413cbc18fd77dc1ddd54ee2a0ab48b4af8

Fix code blocks in base.htm

base.htm +6 -5

diff --git a/base.htm b/base.htm
index d99229a..4f595ed 100644
--- a/base.htm
+++ b/base.htm
@@ -110,11 +110,11 @@ main u {
 main s {
     text-decoration: line-through;
 }
-main pre, main tt, main kbd {
+main pre, main code, main tt, main kbd {
     font-family: Monaco,Consolas,Liberation Mono,Courier,monospace;
     white-space: pre;
 }
-main pre {
+main pre, main code {
     line-height: 16px;
     overflow: auto;
 }
@@ -127,7 +127,8 @@ main pre.lineno {
     float: left;
     overflow: hidden;
 }
-main pre.code {
+main code {
+    display: block;
     padding: 0;
     margin: 12px 12px 0px 2px;
     background: url(data:type/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAgCAYAAADT5RIaAAAAFklEQVQI12NgYGDgZWJgYGCgDkFtAAAWnAAsyj4TxgAAAABJRU5ErkJggg==) 0 0 repeat;
@@ -586,7 +587,7 @@ multiple lines</span>. Yep.
                     <p>Oh yeah, we might wanna have "code blocks". Those would
                     be like <tt>pre</tt> ones, only a bit more styled :
 <pre class="lineno">1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10</pre>
-<pre class="code">#include &lt;stdlib.h&gt;
+<code>#include &lt;stdlib.h&gt;
 int main(int argc, char **argv)
 {
     int nb = 3;
@@ -595,7 +596,7 @@ int main(int argc, char **argv)
         printf("%d... ", i<span class="highlighted">, nb</span>);
 
     printf("Hello World!\n");
-}</pre></p>
+}</code></p>
                     <p>Looking good? And yes, the <tt>highlighted</tt> effect
                     works in there too.</p>
                 </section>