|
@@ -49,7 +49,7 @@ Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est
|
|
|
|
|
|
### Code
|
|
### Code
|
|
|
|
|
|
-Cum sociis natoque penatibus et magnis dis `code element` montes, nascetur ridiculus mus.
|
|
|
|
|
|
+Inline code is available with the `<code>` element. Snippets of multiple lines of code are supported through Pygments. Longer lines will automatically scroll horizontally when needed.
|
|
|
|
|
|
{% highlight js %}
|
|
{% highlight js %}
|
|
// Example can be run directly in your JavaScript console
|
|
// Example can be run directly in your JavaScript console
|
|
@@ -62,6 +62,19 @@ adder(2, 6);
|
|
// > 8
|
|
// > 8
|
|
{% endhighlight %}
|
|
{% endhighlight %}
|
|
|
|
|
|
|
|
+You may also optionally show code snippets with line numbers. Add `linenos` to the Pygments tags.
|
|
|
|
+
|
|
|
|
+{% highlight js linenos %}
|
|
|
|
+// Example can be run directly in your JavaScript console
|
|
|
|
+
|
|
|
|
+// Create a function that takes two arguments and returns the sum of those arguments
|
|
|
|
+var adder = new Function("a", "b", "return a + b");
|
|
|
|
+
|
|
|
|
+// Call the function
|
|
|
|
+adder(2, 6);
|
|
|
|
+// > 8
|
|
|
|
+{% endhighlight %}
|
|
|
|
+
|
|
Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.
|
|
Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.
|
|
|
|
|
|
### Gists via GitHub Pages
|
|
### Gists via GitHub Pages
|