Merge branch 'prism-examples'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814
diff --git a/examples/prism-bash.html b/examples/prism-bash.html
new file mode 100644
index 0000000..fddd875
--- /dev/null
+++ b/examples/prism-bash.html
@@ -0,0 +1,35 @@
+<h1>Bash</h1>
+<p>To use this language, use the class "language-bash".</p>
+
+<h2>Shebang</h2>
+<pre><code>#!/bin/bash</code></pre>
+
+<h2>Comments</h2>
+<pre><code># This is a comment</code></pre>
+
+<h2>Strings</h2>
+<pre><code>STRING="Hello World"
+'Single and
+multi-line strings are supported.'
+"Single and
+multi-line strings are supported."</code></pre>
+
+<h2>Variables</h2>
+<pre><code>echo $STRING
+args=("$@")
+echo ${args[0]} ${args[1]} ${args[2]}</code></pre>
+
+<h2>Keywords</h2>
+<pre><code>for (( i=0;i<$ELEMENTS;i++)); do
+ echo ${ARRAY[${i}]}
+done
+while read LINE; do
+ ARRAY[$count]=$LINE
+ ((count++))
+done
+if [ -d $directory ]; then
+ echo "Directory exists"
+else
+ echo "Directory does not exists"
+fi
+</code></pre>
\ No newline at end of file
diff --git a/examples/prism-coffeescript.html b/examples/prism-coffeescript.html
new file mode 100644
index 0000000..cd99ecb
--- /dev/null
+++ b/examples/prism-coffeescript.html
@@ -0,0 +1,74 @@
+<h1>CoffeeScript</h1>
+<p>To use this language, use the class "language-coffeescript".</p>
+
+<h2>Comments</h2>
+<pre><code># This is a comment
+### This is a
+multi-line comment###</code></pre>
+
+<h2>Strings</h2>
+<pre><code>'foo \'bar\' baz'
+"foo \"bar\" baz"
+'Multi-line
+strings are supported'
+"Multi-line
+strings are supported"
+''' 'Block strings'
+are supported too'''
+""" "Block strings"
+are supported too"""</code></pre>
+
+<h2>String interpolation</h2>
+<pre><code>"String #{interpolation} is supported"
+'This works #{only} between double-quoted strings'</code></pre>
+
+<h2>Object properties</h2>
+<pre><code>kids =
+ brother:
+ name: "Max"
+ age: 11
+ sister:
+ name: "Ida"
+ age: 9</code></pre>
+
+<h2>Regexps</h2>
+<pre><code>/normal [r]egexp?/;
+/// ^(
+ mul\t[i-l]ine
+ regexp # with embedded comment
+) ///</code></pre>
+
+<h2>Classes</h2>
+<pre><code>class Animal
+ constructor: (@name) ->
+ move: (meters) ->
+ alert @name + " moved #{meters}m."
+
+class Snake extends Animal
+ move: ->
+ alert "Slithering..."
+ super 5
+
+class Horse extends Animal
+ move: ->
+ alert "Galloping..."
+ super 45
+
+sam = new Snake "Sammy the Python"
+tom = new Horse "Tommy the Palomino"
+
+sam.move()
+tom.move()</code></pre>
+
+<h2>Inline JavaScript</h2>
+<pre><code>`alert("foo")`</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>Comment-like substrings</h3>
+<pre><code>"foo # bar";</code></pre>
\ No newline at end of file
diff --git a/examples/prism-git.html b/examples/prism-git.html
new file mode 100644
index 0000000..c705c9d
--- /dev/null
+++ b/examples/prism-git.html
@@ -0,0 +1,13 @@
+<h1>Git</h1>
+<p>To use this language, use the class "language-git".</p>
+
+<h2>Comments</h2>
+<pre><code># On branch prism-examples
+# Changes to be committed:
+# (use "git reset HEAD <file>..." to unstage)
+#
+# new file: examples/prism-git.html</code></pre>
+
+<h2>Inserted and deleted lines</h2>
+<pre><code>- Some deleted line
++ Some added line</code></pre>
diff --git a/examples/prism-http.html b/examples/prism-http.html
new file mode 100644
index 0000000..3841979
--- /dev/null
+++ b/examples/prism-http.html
@@ -0,0 +1,36 @@
+<h1>HTTP</h1>
+<p>To use this language, use the class "language-http".</p>
+
+<h2>Request header</h2>
+<pre><code>GET http://localhost:9999/foo.html HTTP/1.1
+Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
+Accept-Encoding: gzip, deflate</code></pre>
+
+<h2>Response header</h2>
+<pre><code>HTTP/1.1 200 OK
+Server: GitHub.com
+Date: Mon, 22 Dec 2014 18:25:30 GMT
+Content-Type: text/html; charset=utf-8</code></pre>
+
+<h2>Response body highlighted based on Content-Type</h2>
+<p>This currently supports the following content types :
+ "application/json",
+ "application/xml",
+ "text/xml" and
+ "text/html".</p>
+<pre><code>HTTP/1.1 200 OK
+Server: GitHub.com
+Date: Mon, 22 Dec 2014 18:25:30 GMT
+Content-Type: text/html; charset=utf-8
+Last-Modified: Sun, 21 Dec 2014 20:29:48 GMT
+Transfer-Encoding: chunked
+Expires: Mon, 22 Dec 2014 18:35:30 GMT
+Cache-Control: max-age=600
+Vary: Accept-Encoding
+Content-Encoding: gzip
+
+<!DOCTYPE html>
+<html lang="en">
+<head></head>
+<body></body>
+</html></code></pre>
\ No newline at end of file
diff --git a/examples/prism-jade.html b/examples/prism-jade.html
new file mode 100644
index 0000000..4b7661f
--- /dev/null
+++ b/examples/prism-jade.html
@@ -0,0 +1,88 @@
+<h1>Jade</h1>
+<p>To use this language, use the class "language-jade".</p>
+
+<h2>Comments</h2>
+<pre><code>// Some
+ multiline
+ comment !
+
+// This is a comment
+But this is not</code></pre>
+
+<h2>Doctype</h2>
+<pre><code>doctype html
+doctype 1.1
+doctype html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"</code></pre>
+
+<h2>Tags</h2>
+<pre><code>ul
+ li Item A
+ li Item B
+ li Item C
+foo(bar='baz')/
+input(type='checkbox', checked=true.toString())
+#content
+div#foo(data-bar="foo")&attributes({'data-foo': 'bar'})</code></pre>
+
+<h2>Markup</h2>
+<pre><code><div class="foo bar"></div></code></pre>
+
+<h2>Control flow</h2>
+<pre><code>#user
+ if user.description
+ p.description= user.description
+ else if authorised
+ p.description.
+ User has no description,
+ why not add one...
+ else
+ p.description User has no description
+ul
+ each val in [1, 2, 3, 4, 5]
+ li= val
+case friends
+ when 0
+ p you have no friends
+ when 1
+ p you have a friend
+ default
+ p you have #{friends} friends
+</code></pre>
+
+<h2>Inline JavaScript</h2>
+<pre><code>script alert('test');
+script(type="text/javascript").
+ alert('foo');
+ alert('bar');
+- var classes = ['foo', 'bar', 'baz']
+- for (var x = 0; x < 3; x++)
+ li item
+</code></pre>
+
+<h2>Keywords</h2>
+<pre><code>include ./includes/head.jade
+extends ./layout.jade
+block content
+append head</code></pre>
+
+<h2>Mixins</h2>
+<pre><code>mixin list
+ ul
+ li foo
+ li bar
+ li baz
++list
+mixin pet(name)
+ li.pet= name
+ul
+ +pet('cat')
+ +pet('dog')
+</code></pre>
+
+<h2>Filters</h2>
+<p>Filters require the desired language to be loaded.
+On this page, check CoffeeScript <strong>before</strong> checking Jade should make
+the example below work properly.</p>
+<pre><code>script
+ :coffee
+ console.log 'This is coffee script'</code></pre>
\ No newline at end of file
diff --git a/examples/prism-less.html b/examples/prism-less.html
new file mode 100644
index 0000000..c84bc68
--- /dev/null
+++ b/examples/prism-less.html
@@ -0,0 +1,73 @@
+<h1>Less</h1>
+<p>To use this language, use the class "language-less".</p>
+
+<h2>Comments</h2>
+<pre><code>// Single line comment
+/* Multi-line
+comment */</code></pre>
+
+<h2>Variables</h2>
+<pre><code>@nice-blue: #5B83AD;
+@light-blue: @nice-blue + #111;</code></pre>
+
+<h2>At-rules</h2>
+<pre><code>@media screen and (min-width: 320px) {}</code></pre>
+
+<h2>Mixins</h2>
+<pre><code>.bordered {
+ border-top: dotted 1px black;
+ border-bottom: solid 2px black;
+}
+#menu a {
+ .bordered;
+}
+#header a {
+ color: orange;
+ #bundle > .button;
+}</code></pre>
+
+<h2>Mixins with parameters</h2>
+<pre><code>.foo (@bg: #f5f5f5, @color: #900) {
+ background: @bg;
+ color: @color;
+}
+.bar {
+ .foo();
+}
+.class1 {
+ .mixin(@margin: 20px; @color: #33acfe);
+}
+.class2 {
+ .mixin(#efca44; @padding: 40px);
+}</code></pre>
+
+<h2>Interpolation</h2>
+<pre><code>@mySelector: banner;
+.@{mySelector} {
+ font-weight: bold;
+}
+@property: color;
+.widget {
+ @{property}: #0ee;
+ background-@{property}: #999;
+}</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>At-rules looking like variables</h3>
+<pre><code>@import "some file.less";</code></pre>
+
+<h3>At-rules containing interpolation</h3>
+<pre><code>@import "@{themes}/tidal-wave.less";</code></pre>
+
+<h3>extend is not highlighted consistently</h3>
+<pre><code>nav ul {
+ &:extend(.inline);
+ background: blue;
+}
+.a:extend(.b) {}</code></pre>
\ No newline at end of file
diff --git a/examples/prism-lolcode.html b/examples/prism-lolcode.html
new file mode 100644
index 0000000..e985546
--- /dev/null
+++ b/examples/prism-lolcode.html
@@ -0,0 +1,65 @@
+<h1>LOLCODE</h1>
+<p>To use this language, use the class "language-lolcode".</p>
+
+<h2>Comments</h2>
+<pre><code>BTW Single line comment
+OBTW Multi-line
+comment TLDR</code></pre>
+
+<h2>Strings and special characters</h2>
+<pre><code>"foo :"bar:" baz"
+"foo:)bar:>baz"
+"Interpolation :{works} too!"</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>42
+-42
+123.456</code></pre>
+
+<h2>Variable declaration</h2>
+<pre><code>I HAS A var
+var R "THREE"
+var R 3</code></pre>
+
+<h2>Types</h2>
+<pre><code>MAEK some_expr A YARN
+some_var IS NOW A NUMBR</code></pre>
+
+<h2>Full example</h2>
+<pre><code>OBTW Convert a number to hexadecimal. This
+ is returned as a string.
+TLDR
+HOW IZ I decimal_to_hex YR num
+ I HAS A i ITZ 0
+ I HAS A rem
+ I HAS A hex_num ITZ A BUKKIT
+ I HAS A decimal_num ITZ num
+ IM IN YR num_loop
+ rem R MOD OF decimal_num AN 16
+ I HAS A hex_digit
+ rem, WTF?
+ OMG 10, hex_digit R "A", GTFO
+ OMG 11, hex_digit R "B", GTFO
+ OMG 12, hex_digit R "C", GTFO
+ OMG 13, hex_digit R "D", GTFO
+ OMG 14, hex_digit R "E", GTFO
+ OMG 15, hex_digit R "F", GTFO
+ OMGWTF, hex_digit R rem
+ OIC
+ hex_num HAS A SRS i ITZ hex_digit
+ decimal_num R QUOSHUNT OF decimal_num AN 16
+ BOTH SAEM decimal_num AN 0, O RLY?
+ YA RLY, GTFO
+ NO WAI, i R SUM OF i AN 1
+ OIC
+ IM OUTTA YR num_loop
+ I HAS A hex_string ITZ A YARN
+ IM IN YR string_reverse
+ DIFFRINT i AN BIGGR OF i AN 0, O RLY?
+ YA RLY, GTFO
+ OIC
+ hex_string R SMOOSH hex_string AN hex_num'Z SRS i MKAY
+ i R DIFF OF i AN 1
+ IM OUTTA YR string_reverse
+ FOUND YR hex_string
+IF U SAY SO</code></pre>
\ No newline at end of file
diff --git a/examples/prism-matlab.html b/examples/prism-matlab.html
new file mode 100644
index 0000000..00e985d
--- /dev/null
+++ b/examples/prism-matlab.html
@@ -0,0 +1,66 @@
+<h1>MATLAB</h1>
+<p>To use this language, use the class "language-matlab".</p>
+
+<h2>Strings</h2>
+<pre><code>myString = 'Hello, world';
+otherString = 'You''re right';</code></pre>
+
+<h2>Comments</h2>
+<pre><code>% Single line comment
+%{ Multi-line
+comment }%</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>x = 325.499
+realmax + .0001e+308
+e = 1 - 3*(4/3 - 1)
+b = 1e-16 + 1 - 1e-16;
+x = 2 + 3i;
+z =
+ 4.7842 -1.0921i 0.8648 -1.5931i 1.2616 -2.2753i
+ 2.6130 -0.0941i 4.8987 -2.3898i 4.3787 -3.7538i
+ 4.4007 -7.1512i 1.3572 -5.2915i 3.6865 -0.5182i
+</code></pre>
+
+<h2>Control flow</h2>
+<pre><code>if rem(a, 2) == 0
+ disp('a is even')
+ b = a/2;
+end
+switch dayString
+ case 'Monday'
+ disp('Start of the work week')
+ case 'Tuesday'
+ disp('Day 2')
+ case 'Wednesday'
+ disp('Day 3')
+ case 'Thursday'
+ disp('Day 4')
+ case 'Friday'
+ disp('Last day of the work week')
+ otherwise
+ disp('Weekend!')
+end
+n = 1;
+nFactorial = 1;
+while nFactorial < 1e100
+ n = n + 1;
+ nFactorial = nFactorial * n;
+end</code></pre>
+
+<h2>Functions</h2>
+<pre><code>q = integral(sqr,0,1);
+y = parabola(x)
+mygrid = @(x,y) ndgrid((-x:x/c:x),(-y:y/c:y));
+[x,y] = mygrid(pi,2*pi);</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>String inside comment</h3>
+<pre><code>%{ 'test' }%
+% 'test'</code></pre>
\ No newline at end of file
diff --git a/examples/prism-perl.html b/examples/prism-perl.html
new file mode 100644
index 0000000..f8c4802
--- /dev/null
+++ b/examples/prism-perl.html
@@ -0,0 +1,90 @@
+<h1>Perl</h1>
+<p>To use this language, use the class "language-perl".</p>
+
+<h2>Comments</h2>
+<pre><code># Single line comment
+=head1 Here There
+ Be Pods!
+=cut</code></pre>
+
+<h2>Strings</h2>
+<pre><code>q/foo bar baz/;
+q awhy not ?a;
+qw(foo bar baz) q{foo bar baz}
+q[foo bar baz] qq<foo bar baz>
+"foo bar baz" 'foo bar baz' `foo bar baz`</code></pre>
+
+<h2>Regex</h2>
+<pre><code>m/foo/ s/foo/bar/
+m zfooz s zfoozbarz
+qr(foo) m{foo} s(foo)(bar) s{foo}{bar}
+m[foo] m<foo> tr[foo][bar] s<foo><bar>
+/foo/i
+</code></pre>
+
+<h2>Variables</h2>
+<pre><code>${^POSTMATCH}
+$^V
+$element_count = scalar(@whatever);
+keys(%users) = 1000;
+$1, $_, %!;</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>12345
+12345.67
+.23E-10 # a very small number
+3.14_15_92 # a very important number
+4_294_967_296 # underscore for legibility
+0xff # hex
+0xdead_beef # more hex
+0377 # octal (only numbers, begins with 0)
+0b011011 # binary</code></pre>
+
+<h2>Full example</h2>
+<pre><code>sub read_config_file {
+ my ($class, $filename) = @_;
+
+ unless (defined $filename) {
+ my $home = File::HomeDir->my_home || '.';
+ $filename = File::Spec->catfile($home, '.pause');
+
+ return {} unless -e $filename and -r _;
+ }
+
+ my %conf;
+ if ( eval { require Config::Identity } ) {
+ %conf = Config::Identity->load($filename);
+ $conf{user} = delete $conf{username} unless $conf{user};
+ }
+ else { # Process .pause manually
+ open my $pauserc, '<', $filename
+ or die "can't open $filename for reading: $!";
+
+ while (<$pauserc>) {
+ chomp;
+ next unless $_ and $_ !~ /^\s*#/;
+
+ my ($k, $v) = /^\s*(\w+)\s+(.+)$/;
+ Carp::croak "multiple enties for $k" if $conf{$k};
+ $conf{$k} = $v;
+ }
+ }
+
+ return \%conf;
+}</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>Comment-like substring</h3>
+<pre><code>"test # test";</code></pre>
+
+<h3>Comment symbol in regexp</h3>
+<pre><code>/test#test/;</code></pre>
+
+<h3>Two quotes of the same type (i.e. both single or both double) inside a regex</h3>
+<pre><code>/"foo"/;</code></pre>
\ No newline at end of file
diff --git a/examples/prism-python.html b/examples/prism-python.html
new file mode 100644
index 0000000..26cd46c
--- /dev/null
+++ b/examples/prism-python.html
@@ -0,0 +1,64 @@
+<h1>Python</h1>
+<p>To use this language, use the class "language-python".</p>
+
+<h2>Comments</h2>
+<pre><code># This is a comment
+# -*- coding: <encoding-name> -*-</code></pre>
+
+<h2>Strings</h2>
+<pre><code>"foo \"bar\" baz"
+'foo \'bar\' baz'
+""" "Multi-line" strings
+are supported."""
+''' 'Multi-line' strings
+are supported.'''</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>7
+2147483647
+0o177
+0b100110111
+3
+79228162514264337593543950336
+0o377
+0x100000000
+0xdeadbeef
+3.14
+10.
+.001
+1e100
+3.14e-10
+0e0
+3.14j
+10.j
+10j
+.001j
+1e100j
+3.14e-10j
+</code></pre>
+
+<h2>Full example</h2>
+<pre><code>def median(pool):
+ '''Statistical median to demonstrate doctest.
+ >>> median([2, 9, 9, 7, 9, 2, 4, 5, 8])
+ 7
+ '''
+ copy = sorted(pool)
+ size = len(copy)
+ if size % 2 == 1:
+ return copy[(size - 1) / 2]
+ else:
+ return (copy[size/2 - 1] + copy[size/2]) / 2
+if __name__ == '__main__':
+ import doctest
+ doctest.testmod()</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>Comment-like substrings</h3>
+<pre><code>"foo # bar";</code></pre>
\ No newline at end of file
diff --git a/examples/prism-ruby.html b/examples/prism-ruby.html
new file mode 100644
index 0000000..8d724c9
--- /dev/null
+++ b/examples/prism-ruby.html
@@ -0,0 +1,46 @@
+<h1>Ruby</h1>
+<p>To use this language, use the class "language-ruby".</p>
+
+<h2>Single-line comments</h2>
+<pre><code># This is a comment</code></pre>
+
+<h2>Strings</h2>
+<pre><code>"foo \"bar\" baz"
+'foo \'bar\' baz'</code></pre>
+
+<h2>Regular expressions</h2>
+<pre><code>/foo?[ ]*bar/</code></pre>
+
+<h2>Variables</h2>
+<pre><code>$foo = 5;
+class InstTest
+ def set_foo(n)
+ @foo = n
+ end
+ def set_bar(n)
+ @bar = n
+ end
+end</code></pre>
+
+<h2>Symbols</h2>
+<pre><code>mystring = :steveT;</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>Comment-like substrings</h3>
+<pre><code>"foo # bar";</code></pre>
+
+<h3>Two quotes of the same type (i.e. both single or both double) inside a regex</h3>
+<pre><code>/"foo"/;</code></pre>
+
+<h3>Multi-line comments are not supported</h3>
+<pre><code>=begin
+************************
+This is a comment block
+************************
+=end</code></pre>
\ No newline at end of file
diff --git a/examples/prism-sql.html b/examples/prism-sql.html
new file mode 100644
index 0000000..5de3387
--- /dev/null
+++ b/examples/prism-sql.html
@@ -0,0 +1,37 @@
+<h1>SQL</h1>
+<p>To use this language, use the class "language-sql".</p>
+
+<h2>Comments</h2>
+<pre><code># Single line comment
+-- Single line comment
+// Single line comment
+/* Multi-line
+comment */</code></pre>
+
+<h2>Strings</h2>
+<pre><code>"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings
+are supported"
+'Multi-line strings
+are supported'</code></pre>
+
+<h2>Variables</h2>
+<pre><code>SET @variable = 1;
+SET @$_ = 2;
+SET @"quoted-variable" = 3;
+SET @'quoted-variable' = 3;
+SET @`quoted-variable` = 3;</code></pre>
+
+<h2>Operators</h2>
+<pre><code>SELECT 1 && 1;
+SELECT 1 OR NULL;
+SELECT 5 & 2*3;
+SELECT 2 BETWEEN 1 AND 3;</code></pre>
+
+<h2>Functions and keywords</h2>
+<pre><code>SELECT COUNT(*) AS cpt, MAX(t.pos) AS max_pos
+FROM `my_table`
+LEFT JOIN `other_table` AS t
+WHERE `somecol` IS NOT NULL
+ORDER BY t.other_col DESC</code></pre>
diff --git a/examples/prism-twig.html b/examples/prism-twig.html
new file mode 100644
index 0000000..22528c7
--- /dev/null
+++ b/examples/prism-twig.html
@@ -0,0 +1,38 @@
+<h1>Twig</h1>
+<p>To use this language, use the class "language-twig".</p>
+
+<h2>Comments</h2>
+<pre><code>{# Some comment
+on multiple lines
+with <html></html>
+inside #}</code></pre>
+
+<h2>Keywords</h2>
+<pre><code>{% if foo %} bar {% endif %}
+{% for key, value in arr if value %} {{ do_something() }} {% endfor %}
+{% include 'header.html' %}
+{% include 'template.html' with {'foo': 'bar'} %}</code></pre>
+
+<h2>Operators</h2>
+<pre><code>{{ not a }}
+{{ 20 // 7 }}
+{{ b b-and c }}
+{% if phone matches '/^[\\d\\.]+$/' %} ... {% endif %}</code></pre>
+
+<h2>Twig embedded in HTML</h2>
+<pre><code><div>
+{% if foo %}
+ <p>Foo!</p>
+{% else %}
+ <p>Not foo...</p>
+{% endif %}</code></pre>
+
+<h2>Known failures</h2>
+<p>There are certain edge cases where Prism will fail.
+ There are always such cases in every regex-based syntax highlighter.
+ However, Prism dares to be open and honest about them.
+ If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
+</p>
+
+<h3>Tag containing Twig is not highlighted</h3>
+<pre><code><div{% if foo %} class="bar"{% endif %}></div></code></pre>
\ No newline at end of file