From 404c1bbd4e1ab2ddbfd69a26377a3b2f986cd175 Mon Sep 17 00:00:00 2001 From: Shan Carter Date: Wed, 4 Jan 2017 09:36:42 -0800 Subject: [PATCH] Updating code block examples --- examples/tutorial.html | 43 ++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/examples/tutorial.html b/examples/tutorial.html index 2bf1d7f..bda58e2 100644 --- a/examples/tutorial.html +++ b/examples/tutorial.html @@ -39,31 +39,40 @@

The final layout is for marginalia, asides, and footnotes. It does not interrupt the normal flow of .l-body sized text except on mobile screen sizes.


Markdown

-
- Any element with a `dt-markdown` attribute will be rendered with it's contents replaced with a markdown processed version. We use [marked](https://github.com/chjj/marked), with [github flavored markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/) and [smartypants](https://daringfireball.net/projects/smartypants/). +
+
Any element with a `dt-markdown` attribute will be rendered with its contents replaced with a markdown processed version. We use [marked](https://github.com/chjj/marked), with [github flavored markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/) and [smartypants](https://daringfireball.net/projects/smartypants/).
+

+  <div dt-markdown>
+  ###This markdown will be rendered as HTML
 
-  This section has been written in markdown, so if you view source on this page and look at this section you can use it as a reference.
+  For more about markdown, read this [tutorial](https://help.github.com/articles/basic-writing-and-formatting-syntax/).
+  </div>
 
+  

Code Blocks

-

-    var x = 25;
-    function(x){
-      return x * x;
-    }
+  

Syntax highlighting is provided within <code> tags. Just wrap the source with this: <code class="language-html">let x = 10;</code>. For larger blocks of code, add a <pre> tag:

+

+    <pre><code class="language-javascript">
+      var x = 25;
+      function(x){
+        return x * x;
+      }
+    </code></pre>
+  
+

You can also use code blocks within markdown blocks. For instance:

+

+    <div dt-markdown>
+    ```javascript
+    let x = 25;
+    ```
+    </div>
   
-

You can also use code blocks within markdown blocks

-
- ```javascript - let x = 25; - ``` -

Citation

- Take a look at this paper gregor2015draw which - is about X. + Take a look at this paper gregor2015draw which is about X.

Why do we reason mercier2011humans @@ -72,6 +81,8 @@

Math


Footnotes

+

This is a

+

Contributions