Resolved conflict
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 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952
diff --git a/.travis.yml b/.travis.yml
index 47adfc5..8dbeab5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
language: node_js
node_js:
-- '6'
- '8'
- '10'
- 'node'
diff --git a/README.md b/README.md
index 6afe7ec..08a8087 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# [Prism](http://prismjs.com/)
[![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism)
+[![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs)
Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](http://dabblet.com/).
diff --git a/components.js b/components.js
index 04b6666..3a5e71c 100644
--- a/components.js
+++ b/components.js
@@ -1,2 +1,2 @@
-var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
+var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
\ No newline at end of file
diff --git a/components.json b/components.json
index 2f8c5a6..13df40a 100644
--- a/components.json
+++ b/components.json
@@ -240,6 +240,11 @@
"alias": "jinja2",
"owner": "romanvm"
},
+ "dns-zone-file": {
+ "title": "DNS zone file",
+ "owner": "RunDevelopment",
+ "alias": "dns-zone"
+ },
"docker": {
"title": "Docker",
"alias": "dockerfile",
@@ -502,6 +507,12 @@
"require": "css",
"owner": "Golmote"
},
+ "lilypond": {
+ "title": "LilyPond",
+ "require": "scheme",
+ "alias": "ly",
+ "owner": "RunDevelopment"
+ },
"liquid": {
"title": "Liquid",
"owner": "cinhtau"
@@ -632,6 +643,15 @@
},
"owner": "Golmote"
},
+ "pascaligo": {
+ "title": "Pascaligo",
+ "owner": "DefinitelyNotAGoat"
+ },
+ "pcaxis": {
+ "title": "PC-Axis",
+ "alias": "px",
+ "owner": "RunDevelopment"
+ },
"perl": {
"title": "Perl",
"owner": "Golmote"
@@ -818,15 +838,19 @@
"require": "markup-templating",
"owner": "Golmote"
},
- "sql": {
- "title": "SQL",
- "owner": "multipetros"
- },
"soy": {
"title": "Soy (Closure Template)",
"require": "markup-templating",
"owner": "Golmote"
},
+ "splunk-spl": {
+ "title": "Splunk SPL",
+ "owner": "RunDevelopment"
+ },
+ "sql": {
+ "title": "SQL",
+ "owner": "multipetros"
+ },
"stylus": {
"title": "Stylus",
"owner": "vkbansal"
diff --git a/components/prism-core.js b/components/prism-core.js
index 18961e7..d4566d5 100644
--- a/components/prism-core.js
+++ b/components/prism-core.js
@@ -178,9 +178,9 @@ var _ = {
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
};
- _.hooks.run("before-highlightall", env);
+ _.hooks.run('before-highlightall', env);
- var elements = env.elements || container.querySelectorAll(env.selector);
+ var elements = container.querySelectorAll(env.selector);
for (var i=0, element; element = elements[i++];) {
_.highlightElement(element, async === true, env.callback);
diff --git a/components/prism-core.min.js b/components/prism-core.min.js
index 3cb415e..9b65d45 100644
--- a/components/prism-core.min.js
+++ b/components/prism-core.min.js
@@ -1 +1 @@
-var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function n(e,t){var r,a,i=C.util.type(e);switch(t=t||{},i){case"Object":if(a=C.util.objId(e),t[a])return t[a];for(var l in r={},t[a]=r,e)e.hasOwnProperty(l)&&(r[l]=n(e[l],t));return r;case"Array":return a=C.util.objId(e),t[a]?t[a]:(r=[],t[a]=r,e.forEach(function(e,a){r[a]=n(e,t)}),r);default:return e}}},languages:{extend:function(e,a){var n=C.util.clone(C.languages[e]);for(var t in a)n[t]=a[t];return n},insertBefore:function(n,e,a,t){var r=(t=t||C.languages)[n],i={};for(var l in r)if(r.hasOwnProperty(l)){if(l==e)for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);a.hasOwnProperty(l)||(i[l]=r[l])}var s=t[n];return t[n]=i,C.languages.DFS(C.languages,function(e,a){a===s&&e!=n&&(this[e]=i)}),i},DFS:function e(a,n,t,r){r=r||{};var i=C.util.objId;for(var l in a)if(a.hasOwnProperty(l)){n.call(a,l,a[l],t||l);var o=a[l],s=C.util.type(o);"Object"!==s||r[i(o)]?"Array"!==s||r[i(o)]||(r[i(o)]=!0,e(o,n,l,r)):(r[i(o)]=!0,e(o,n,null,r))}}},plugins:{},highlightAll:function(e,a){C.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,n){var t={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",t);for(var r,i=t.elements||e.querySelectorAll(t.selector),l=0;r=i[l++];)C.highlightElement(r,!0===a,t.callback)},highlightElement:function(e,a,n){for(var t,r="none",i=e;i&&!c.test(i.className);)i=i.parentNode;i&&(r=(i.className.match(c)||[,"none"])[1].toLowerCase(),t=C.languages[r]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r,e.parentNode&&(i=e.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+r));var l={element:e,language:r,grammar:t,code:e.textContent},o=function(e){l.highlightedCode=e,C.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,C.hooks.run("after-highlight",l),C.hooks.run("complete",l),n&&n.call(l.element)};if(C.hooks.run("before-sanity-check",l),l.code)if(C.hooks.run("before-highlight",l),l.grammar)if(a&&g.Worker){var s=new Worker(C.filename);s.onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else o(C.highlight(l.code,l.grammar,l.language));else o(C.util.encode(l.code));else C.hooks.run("complete",l)},highlight:function(e,a,n){var t={code:e,grammar:a,language:n};return C.hooks.run("before-tokenize",t),t.tokens=C.tokenize(t.code,t.grammar),C.hooks.run("after-tokenize",t),M.stringify(C.util.encode(t.tokens),t.language)},matchGrammar:function(e,a,n,t,r,i,l){for(var o in n)if(n.hasOwnProperty(o)&&n[o]){if(o==l)return;var s=n[o];s="Array"===C.util.type(s)?s:[s];for(var g=0;g<s.length;++g){var c=s[g],u=c.inside,h=!!c.lookbehind,f=!!c.greedy,d=0,m=c.alias;if(f&&!c.pattern.global){var p=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+"g")}c=c.pattern||c;for(var y=t,v=r;y<a.length;v+=a[y].length,++y){var k=a[y];if(a.length>e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A<O&&(P<w||!a[A].type&&!a[A-1].greedy);++A)(P+=a[A].length)<=b&&(++y,v=P);if(a[y]instanceof M)continue;N=A-y,k=e.slice(v,P),x.index-=v}else{c.lastIndex=0;var x=c.exec(k),N=1}if(x){h&&(d=x[1]?x[1].length:0);w=(b=x.index+d)+(x=x[0].slice(d)).length;var j=k.slice(0,b),S=k.slice(w),E=[y,N];j&&(++y,v+=j.length,E.push(j));var _=new M(o,u?C.tokenize(x,u):x,m,x,f);if(E.push(_),S&&E.push(S),Array.prototype.splice.apply(a,E),1!=N&&C.matchGrammar(e,a,n,y,v,!0,o),i)break}else if(i)break}}}}},tokenize:function(e,a){var n=[e],t=a.rest;if(t){for(var r in t)a[r]=t[r];delete a.rest}return C.matchGrammar(e,n,a,0,0,!1),n},hooks:{all:{},add:function(e,a){var n=C.hooks.all;n[e]=n[e]||[],n[e].push(a)},run:function(e,a){var n=C.hooks.all[e];if(n&&n.length)for(var t,r=0;t=n[r++];)t(a)}},Token:M};function M(e,a,n,t,r){this.type=e,this.content=a,this.alias=n,this.length=0|(t||"").length,this.greedy=!!r}if(g.Prism=C,M.stringify=function(e,a){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return M.stringify(e,a)}).join("");var n={type:e.type,content:M.stringify(e.content,a),tag:"span",classes:["token",e.type],attributes:{},language:a};if(e.alias){var t=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(n.classes,t)}C.hooks.run("wrap",n);var r=Object.keys(n.attributes).map(function(e){return e+'="'+(n.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+(r?" "+r:"")+">"+n.content+"</"+n.tag+">"},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,t=a.code,r=a.immediateClose;g.postMessage(C.highlight(t,C.languages[n],n)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
\ No newline at end of file
+var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function n(e,t){var r,a,i=C.util.type(e);switch(t=t||{},i){case"Object":if(a=C.util.objId(e),t[a])return t[a];for(var o in r={},t[a]=r,e)e.hasOwnProperty(o)&&(r[o]=n(e[o],t));return r;case"Array":return a=C.util.objId(e),t[a]?t[a]:(r=[],t[a]=r,e.forEach(function(e,a){r[a]=n(e,t)}),r);default:return e}}},languages:{extend:function(e,a){var n=C.util.clone(C.languages[e]);for(var t in a)n[t]=a[t];return n},insertBefore:function(n,e,a,t){var r=(t=t||C.languages)[n],i={};for(var o in r)if(r.hasOwnProperty(o)){if(o==e)for(var l in a)a.hasOwnProperty(l)&&(i[l]=a[l]);a.hasOwnProperty(o)||(i[o]=r[o])}var s=t[n];return t[n]=i,C.languages.DFS(C.languages,function(e,a){a===s&&e!=n&&(this[e]=i)}),i},DFS:function e(a,n,t,r){r=r||{};var i=C.util.objId;for(var o in a)if(a.hasOwnProperty(o)){n.call(a,o,a[o],t||o);var l=a[o],s=C.util.type(l);"Object"!==s||r[i(l)]?"Array"!==s||r[i(l)]||(r[i(l)]=!0,e(l,n,o,r)):(r[i(l)]=!0,e(l,n,null,r))}}},plugins:{},highlightAll:function(e,a){C.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,n){var t={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",t);for(var r,i=e.querySelectorAll(t.selector),o=0;r=i[o++];)C.highlightElement(r,!0===a,t.callback)},highlightElement:function(e,a,n){for(var t,r="none",i=e;i&&!c.test(i.className);)i=i.parentNode;i&&(r=(i.className.match(c)||[,"none"])[1].toLowerCase(),t=C.languages[r]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r,e.parentNode&&(i=e.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+r));var o={element:e,language:r,grammar:t,code:e.textContent},l=function(e){o.highlightedCode=e,C.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,C.hooks.run("after-highlight",o),C.hooks.run("complete",o),n&&n.call(o.element)};if(C.hooks.run("before-sanity-check",o),o.code)if(C.hooks.run("before-highlight",o),o.grammar)if(a&&g.Worker){var s=new Worker(C.filename);s.onmessage=function(e){l(e.data)},s.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))}else l(C.highlight(o.code,o.grammar,o.language));else l(C.util.encode(o.code));else C.hooks.run("complete",o)},highlight:function(e,a,n){var t={code:e,grammar:a,language:n};return C.hooks.run("before-tokenize",t),t.tokens=C.tokenize(t.code,t.grammar),C.hooks.run("after-tokenize",t),M.stringify(C.util.encode(t.tokens),t.language)},matchGrammar:function(e,a,n,t,r,i,o){for(var l in n)if(n.hasOwnProperty(l)&&n[l]){if(l==o)return;var s=n[l];s="Array"===C.util.type(s)?s:[s];for(var g=0;g<s.length;++g){var c=s[g],u=c.inside,h=!!c.lookbehind,f=!!c.greedy,d=0,m=c.alias;if(f&&!c.pattern.global){var p=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+"g")}c=c.pattern||c;for(var y=t,v=r;y<a.length;v+=a[y].length,++y){var k=a[y];if(a.length>e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A<O&&(P<w||!a[A].type&&!a[A-1].greedy);++A)(P+=a[A].length)<=b&&(++y,v=P);if(a[y]instanceof M)continue;N=A-y,k=e.slice(v,P),x.index-=v}else{c.lastIndex=0;var x=c.exec(k),N=1}if(x){h&&(d=x[1]?x[1].length:0);w=(b=x.index+d)+(x=x[0].slice(d)).length;var j=k.slice(0,b),S=k.slice(w),E=[y,N];j&&(++y,v+=j.length,E.push(j));var _=new M(l,u?C.tokenize(x,u):x,m,x,f);if(E.push(_),S&&E.push(S),Array.prototype.splice.apply(a,E),1!=N&&C.matchGrammar(e,a,n,y,v,!0,l),i)break}else if(i)break}}}}},tokenize:function(e,a){var n=[e],t=a.rest;if(t){for(var r in t)a[r]=t[r];delete a.rest}return C.matchGrammar(e,n,a,0,0,!1),n},hooks:{all:{},add:function(e,a){var n=C.hooks.all;n[e]=n[e]||[],n[e].push(a)},run:function(e,a){var n=C.hooks.all[e];if(n&&n.length)for(var t,r=0;t=n[r++];)t(a)}},Token:M};function M(e,a,n,t,r){this.type=e,this.content=a,this.alias=n,this.length=0|(t||"").length,this.greedy=!!r}if(g.Prism=C,M.stringify=function(e,a){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return M.stringify(e,a)}).join("");var n={type:e.type,content:M.stringify(e.content,a),tag:"span",classes:["token",e.type],attributes:{},language:a};if(e.alias){var t=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(n.classes,t)}C.hooks.run("wrap",n);var r=Object.keys(n.attributes).map(function(e){return e+'="'+(n.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+(r?" "+r:"")+">"+n.content+"</"+n.tag+">"},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,t=a.code,r=a.immediateClose;g.postMessage(C.highlight(t,C.languages[n],n)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
\ No newline at end of file
diff --git a/components/prism-dns-zone-file.js b/components/prism-dns-zone-file.js
new file mode 100644
index 0000000..e2518ca
--- /dev/null
+++ b/components/prism-dns-zone-file.js
@@ -0,0 +1,33 @@
+Prism.languages['dns-zone-file'] = {
+ 'comment': /;.*/,
+ 'string': {
+ pattern: /"(?:\\.|[^"\\\r\n])*"/,
+ greedy: true
+ },
+ 'variable': [
+ {
+ pattern: /(^\$ORIGIN[ \t]+)\S+/m,
+ lookbehind: true,
+ },
+ {
+ pattern: /(^|\s)@(?=\s|$)/,
+ lookbehind: true,
+ }
+ ],
+ 'keyword': /^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m,
+ 'class': {
+ // https://tools.ietf.org/html/rfc1035#page-13
+ pattern: /(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/,
+ lookbehind: true,
+ alias: 'keyword'
+ },
+ 'type': {
+ // https://en.wikipedia.org/wiki/List_of_DNS_record_types
+ pattern: /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
+ lookbehind: true,
+ alias: 'keyword'
+ },
+ 'punctuation': /[()]/
+};
+
+Prism.languages['dns-zone'] = Prism.languages['dns-zone-file']
diff --git a/components/prism-dns-zone-file.min.js b/components/prism-dns-zone-file.min.js
new file mode 100644
index 0000000..434c1f6
--- /dev/null
+++ b/components/prism-dns-zone-file.min.js
@@ -0,0 +1 @@
+Prism.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},Prism.languages["dns-zone"]=Prism.languages["dns-zone-file"];
\ No newline at end of file
diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js
index f6bce8d..4215622 100644
--- a/components/prism-fsharp.js
+++ b/components/prism-fsharp.js
@@ -10,7 +10,7 @@ Prism.languages.fsharp = Prism.languages.extend('clike', {
}
],
'string': {
- pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,
+ pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
greedy: true
},
'class-name': {
diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js
index f4ea280..144653e 100644
--- a/components/prism-fsharp.min.js
+++ b/components/prism-fsharp.min.js
@@ -1 +1 @@
-Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}});
\ No newline at end of file
+Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}});
\ No newline at end of file
diff --git a/components/prism-javascript.js b/components/prism-javascript.js
index 9f19f34..9880c4a 100644
--- a/components/prism-javascript.js
+++ b/components/prism-javascript.js
@@ -18,7 +18,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', {
],
'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
- 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
+ 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
'operator': /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/
});
@@ -32,7 +32,7 @@ Prism.languages.insertBefore('javascript', 'keyword', {
},
// This must be declared before keyword because we use "function" inside the look-forward
'function-variable': {
- pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
+ pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
alias: 'function'
},
'parameter': [
diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js
index f25037d..ca3012a 100644
--- a/components/prism-javascript.min.js
+++ b/components/prism-javascript.min.js
@@ -1 +1 @@
-Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
\ No newline at end of file
+Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
\ No newline at end of file
diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js
index 80034cf..2b8a77e 100644
--- a/components/prism-js-extras.js
+++ b/components/prism-js-extras.js
@@ -60,7 +60,7 @@
Prism.languages.insertBefore('javascript', 'punctuation', {
'property-access': {
- pattern: /(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,
+ pattern: /(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,
lookbehind: true
},
'maybe-class-name': {
diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js
index 1174f06..7a5aa0f 100644
--- a/components/prism-js-extras.min.js
+++ b/components/prism-js-extras.min.js
@@ -1 +1 @@
-!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t<e.length;t++){var n=e[t],r=a.languages.javascript[n];"RegExp"===a.util.type(r)&&(r=a.languages.javascript[n]={pattern:r});var s=r.inside||{};(r.inside=s)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(Prism);
\ No newline at end of file
+!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t<e.length;t++){var n=e[t],r=a.languages.javascript[n];"RegExp"===a.util.type(r)&&(r=a.languages.javascript[n]={pattern:r});var s=r.inside||{};(r.inside=s)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(Prism);
\ No newline at end of file
diff --git a/components/prism-lilypond.js b/components/prism-lilypond.js
new file mode 100644
index 0000000..0e02fd0
--- /dev/null
+++ b/components/prism-lilypond.js
@@ -0,0 +1,69 @@
+(function (Prism) {
+
+ var schemeExpression = /\((?:[^();"#\\]|\\[\s\S]|;.*|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source;
+ // allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions
+ // For some reason, this can't be 4
+ var recursivenessLog2 = 5;
+ for (var i = 0; i < recursivenessLog2; i++) {
+ schemeExpression = schemeExpression.replace(/<expr>/g, schemeExpression);
+ }
+ schemeExpression = schemeExpression.replace(/<expr>/g, /[^\s\S]/.source);
+
+
+ var lilypond = Prism.languages.lilypond = {
+ 'comment': /%(?:(?!\{).*|\{[\s\S]*?%\})/,
+ 'embedded-scheme': {
+ pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g, schemeExpression), 'm'),
+ lookbehind: true,
+ greedy: true,
+ inside: {
+ 'scheme': {
+ pattern: /^(#)[\s\S]+$/,
+ lookbehind: true,
+ alias: 'language-scheme',
+ inside: {
+ 'embedded-lilypond': {
+ pattern: /#\{[\s\S]*?#\}/,
+ greedy: true,
+ inside: {
+ 'punctuation': /^#\{|#\}$/,
+ 'lilypond': {
+ pattern: /[\s\S]+/,
+ alias: 'language-lilypond',
+ inside: null // see below
+ }
+ }
+ },
+ rest: Prism.languages.scheme
+ }
+ },
+ 'punctuation': /#/
+ }
+ },
+ 'string': {
+ pattern: /"(?:[^"\\]|\\.)*"/,
+ greedy: true
+ },
+ 'class-name': {
+ pattern: /(\\new\s+)[\w-]+/,
+ lookbehind: true
+ },
+ 'keyword': {
+ pattern: /\\[a-z][-\w]*/i,
+ inside: {
+ 'punctuation': /^\\/
+ }
+ },
+ 'operator': /[=|]|<<|>>/,
+ 'punctuation': {
+ pattern: /(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,
+ lookbehind: true
+ },
+ 'number': /\b\d+(?:\/\d+)?\b/
+ };
+
+ lilypond['embedded-scheme'].inside['scheme'].inside['embedded-lilypond'].inside['lilypond'].inside = lilypond;
+
+ Prism.languages.ly = lilypond;
+
+}(Prism));
diff --git a/components/prism-lilypond.min.js b/components/prism-lilypond.min.js
new file mode 100644
index 0000000..72bb5ba
--- /dev/null
+++ b/components/prism-lilypond.min.js
@@ -0,0 +1 @@
+!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[\\s\\S]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[\\s\\S])*#\\}|[^{])|<expr>)*\\)',d=0;d<5;d++)n=n.replace(/<expr>/g,n);n=n.replace(/<expr>/g,"[^\\s\\S]");var i=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|<expr>))'.replace(/<expr>/g,n),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};i["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=i,e.languages.ly=i}(Prism);
\ No newline at end of file
diff --git a/components/prism-markdown.js b/components/prism-markdown.js
index 6fc2da7..1f53483 100644
--- a/components/prism-markdown.js
+++ b/components/prism-markdown.js
@@ -1,7 +1,7 @@
(function (Prism) {
// Allow only one line break
- var inner = /\\.|[^\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)/.source;
+ var inner = /(?:\\.|[^\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))/.source;
/**
* This function is intended for the creation of the bold or italic pattern.
@@ -164,7 +164,7 @@
// __strong__
// allow one nested instance of italic text using the same delimiter
- pattern: createInline(/__(?:<inner>|_(?:<inner>)+_)+__/.source, true),
+ pattern: createInline(/__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__/.source, true),
lookbehind: true,
greedy: true,
inside: {
@@ -181,7 +181,7 @@
// _em_
// allow one nested instance of bold text using the same delimiter
- pattern: createInline(/_(?:<inner>|__(?:<inner>)+__)+_/.source, true),
+ pattern: createInline(/_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_/.source, true),
lookbehind: true,
greedy: true,
inside: {
@@ -196,9 +196,7 @@
'strike': {
// ~~strike through~~
// ~strike~
-
- // extra _ is because the inner pattern intentionally doesn't include it because of bold and italic
- pattern: createInline(/(~~?)(?:<inner>|_)+?\2/.source, false),
+ pattern: createInline(/(~~?)(?:(?!~)<inner>)+?\2/.source, false),
lookbehind: true,
greedy: true,
inside: {
@@ -212,13 +210,21 @@
},
'url': {
// [example](http://example.com "Optional title")
+ // [example][id]
// [example] [id]
- pattern: /!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,
+ pattern: createInline(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\])<inner>)+\])/.source, false),
+ lookbehind: true,
+ greedy: true,
inside: {
'variable': {
- pattern: /(!?\[)[^\]]+(?=\]$)/,
+ pattern: /(\[)[^\]]+(?=\]$)/,
lookbehind: true
},
+ 'content': {
+ pattern: /(^!?\[)[^\]]+(?=\])/,
+ lookbehind: true,
+ inside: {} // see below
+ },
'string': {
pattern: /"(?:\\.|[^"\\])*"(?=\)$)/
}
@@ -226,7 +232,7 @@
}
});
- ['bold', 'italic', 'strike'].forEach(function (token) {
+ ['url', 'bold', 'italic', 'strike'].forEach(function (token) {
['url', 'bold', 'italic', 'strike'].forEach(function (inside) {
if (token !== inside) {
Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js
index 95ea27f..5eae518 100644
--- a/components/prism-markdown.min.js
+++ b/components/prism-markdown.min.js
@@ -1 +1 @@
-!function(s){function n(n,e){return n=n.replace(/<inner>/g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:<inner>|_(?:<inner>)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:<inner>|__(?:<inner>)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:<inner>|_)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t<a;t++){var i=e[t];if("code"===i.type){var r=i.content[1],o=i.content[3];if(r&&o&&"code-language"===r.type&&"code-block"===o.type&&"string"==typeof r.content){var l="language-"+r.content.trim().split(/\s+/)[0].toLowerCase();o.alias?"string"==typeof o.alias?o.alias=[o.alias,l]:o.alias.push(l):o.alias=[l]}}else n(i.content)}}(n.tokens)}),s.hooks.add("wrap",function(n){if("code-block"===n.type){for(var e="",t=0,a=n.classes.length;t<a;t++){var i=n.classes[t],r=/language-(.+)/.exec(i);if(r){e=r[1];break}}var o=s.languages[e];if(o){var l=n.content.replace(/</g,"<").replace(/&/g,"&");n.content=s.highlight(l,o,e)}}}),s.languages.md=s.languages.markdown}(Prism);
\ No newline at end of file
+!function(s){function n(n,e){return n=n.replace(/<inner>/g,"(?:\\\\.|[^\\\\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~)<inner>)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\])<inner>)+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t<a;t++){var i=e[t];if("code"===i.type){var r=i.content[1],o=i.content[3];if(r&&o&&"code-language"===r.type&&"code-block"===o.type&&"string"==typeof r.content){var l="language-"+r.content.trim().split(/\s+/)[0].toLowerCase();o.alias?"string"==typeof o.alias?o.alias=[o.alias,l]:o.alias.push(l):o.alias=[l]}}else n(i.content)}}(n.tokens)}),s.hooks.add("wrap",function(n){if("code-block"===n.type){for(var e="",t=0,a=n.classes.length;t<a;t++){var i=n.classes[t],r=/language-(.+)/.exec(i);if(r){e=r[1];break}}var o=s.languages[e];if(o){var l=n.content.replace(/</g,"<").replace(/&/g,"&");n.content=s.highlight(l,o,e)}}}),s.languages.md=s.languages.markdown}(Prism);
\ No newline at end of file
diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js
new file mode 100644
index 0000000..689743b
--- /dev/null
+++ b/components/prism-pascaligo.js
@@ -0,0 +1,62 @@
+(function (Prism) {
+
+ // Pascaligo is a layer 2 smart contract language for the tezos blockchain
+
+ var braces = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source;
+ var type = /(?:\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g, braces);
+
+ var pascaligo = Prism.languages.pascaligo = {
+ 'comment': /\(\*[\s\S]+?\*\)|\/\/.*/,
+ 'string': {
+ pattern: /(["'`])(\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,
+ greedy: true
+ },
+ 'class-name': [
+ {
+ pattern: RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g, type), 'i'),
+ lookbehind: true,
+ inside: null // see below
+ },
+ {
+ pattern: RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g, type), 'i'),
+ inside: null // see below
+ },
+ {
+ pattern: RegExp(/(:\s*)<type>/.source.replace(/<type>/g, type)),
+ lookbehind: true,
+ inside: null // see below
+ }
+ ],
+ 'keyword': {
+ pattern: /(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,
+ lookbehind: true
+ },
+ 'boolean': {
+ pattern: /(^|[^&])\b(?:True|False)\b/i,
+ lookbehind: true
+ },
+ 'builtin': {
+ pattern: /(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,
+ lookbehind: true
+ },
+ 'function': /\w+(?=\s*\()/i,
+ 'number': [
+ // Hexadecimal, octal and binary
+ /%[01]+|&[0-7]+|\$[a-f\d]+/i,
+ // Decimal
+ /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i
+ ],
+ 'operator': /->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,
+ 'punctuation': /\(\.|\.\)|[()\[\]:;,.{}]/
+ };
+
+ var classNameInside = ['comment', 'keyword', 'builtin', 'operator', 'punctuation'].reduce(function (accum, key) {
+ accum[key] = pascaligo[key];
+ return accum;
+ }, {});
+
+ pascaligo["class-name"].forEach(function (p) {
+ p.inside = classNameInside;
+ });
+
+}(Prism));
diff --git a/components/prism-pascaligo.min.js b/components/prism-pascaligo.min.js
new file mode 100644
index 0000000..cea982f
--- /dev/null
+++ b/components/prism-pascaligo.min.js
@@ -0,0 +1 @@
+!function(e){var n="(?:\\w+(?:<braces>)?|<braces>)".replace(/<braces>/g,"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"),i=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)<type>".replace(/<type>/g,n),"i"),lookbehind:!0,inside:null},{pattern:RegExp("<type>(?=\\s+is\\b)".replace(/<type>/g,n),"i"),inside:null},{pattern:RegExp("(:\\s*)<type>".replace(/<type>/g,n)),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:True|False)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},t=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=i[n],e},{});i["class-name"].forEach(function(e){e.inside=t})}(Prism);
\ No newline at end of file
diff --git a/components/prism-pcaxis.js b/components/prism-pcaxis.js
new file mode 100644
index 0000000..1ce0ba1
--- /dev/null
+++ b/components/prism-pcaxis.js
@@ -0,0 +1,53 @@
+Prism.languages.pcaxis = {
+ 'string': /"[^"]*"/,
+ 'keyword': {
+ pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
+ lookbehind: true,
+ greedy: true,
+ inside: {
+ 'keyword': /^[-A-Z\d]+/,
+ 'language': {
+ pattern: /^(\s*)\[[-\w]+\]/,
+ lookbehind: true,
+ inside: {
+ 'punctuation': /^\[|\]$/,
+ 'property': /[-\w]+/
+ }
+ },
+ 'sub-key': {
+ pattern: /^(\s*)[\s\S]+/,
+ lookbehind: true,
+ inside: {
+ 'parameter': {
+ pattern: /"[^"]*"/,
+ alias: 'property'
+ },
+ 'punctuation': /^\(|\)$|,/
+ }
+ }
+ }
+ },
+ 'operator': /=/,
+ 'tlist': {
+ pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
+ greedy: true,
+ inside: {
+ 'function': /^TLIST/,
+ 'property': {
+ pattern: /^(\s*\(\s*)\w+/,
+ lookbehind: true
+ },
+ 'string': /"[^"]*"/,
+ 'punctuation': /[(),]/,
+ 'operator': /-/
+ }
+ },
+ 'punctuation': /[;,]/,
+ 'number': {
+ pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
+ lookbehind: true
+ },
+ 'boolean': /YES|NO/,
+};
+
+Prism.languages.px = Prism.languages.pcaxis;
diff --git a/components/prism-pcaxis.min.js b/components/prism-pcaxis.min.js
new file mode 100644
index 0000000..89ef448
--- /dev/null
+++ b/components/prism-pcaxis.min.js
@@ -0,0 +1 @@
+Prism.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)[\s\S]+/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/YES|NO/},Prism.languages.px=Prism.languages.pcaxis;
\ No newline at end of file
diff --git a/components/prism-protobuf.js b/components/prism-protobuf.js
index 44e6cd5..4e369f8 100644
--- a/components/prism-protobuf.js
+++ b/components/prism-protobuf.js
@@ -1,8 +1,36 @@
-Prism.languages.protobuf = Prism.languages.extend('clike', {
- keyword: /\b(?:package|import|message|enum)\b/,
- builtin: /\b(?:required|repeated|optional|reserved)\b/,
- primitive: {
- pattern: /\b(?:double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/,
- alias: 'symbol'
- }
-});
+(function (Prism) {
+
+ var builtinTypes = /\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;
+
+ Prism.languages.protobuf = Prism.languages.extend('clike', {
+ 'class-name': {
+ pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,
+ lookbehind: true
+ },
+ 'keyword': /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/
+ });
+
+ Prism.languages.insertBefore('protobuf', 'operator', {
+ 'map': {
+ pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/,
+ alias: 'class-name',
+ inside: {
+ 'punctuation': /[<>.,]/,
+ 'builtin': builtinTypes
+ }
+ },
+ 'builtin': builtinTypes,
+ 'positional-class-name': {
+ pattern: /(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/,
+ alias: 'class-name',
+ inside: {
+ 'punctuation': /\./
+ }
+ },
+ 'annotation': {
+ pattern: /(\[\s*)[A-Za-z_]\w*(?=\s*=)/,
+ lookbehind: true
+ }
+ });
+
+}(Prism));
diff --git a/components/prism-protobuf.min.js b/components/prism-protobuf.min.js
index a55dbe2..ffbdaee 100644
--- a/components/prism-protobuf.min.js
+++ b/components/prism-protobuf.min.js
@@ -1 +1 @@
-Prism.languages.protobuf=Prism.languages.extend("clike",{keyword:/\b(?:package|import|message|enum)\b/,builtin:/\b(?:required|repeated|optional|reserved)\b/,primitive:{pattern:/\b(?:double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/,alias:"symbol"}});
\ No newline at end of file
+!function(e){var a=/\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:a}},builtin:a,"positional-class-name":{pattern:/(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[A-Za-z_]\w*(?=\s*=)/,lookbehind:!0}})}(Prism);
\ No newline at end of file
diff --git a/components/prism-rest.js b/components/prism-rest.js
index 645de66..d49d11f 100644
--- a/components/prism-rest.js
+++ b/components/prism-rest.js
@@ -186,7 +186,7 @@ Prism.languages.rest = {
}
},
{
- pattern: /(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
+ pattern: /(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
alias: 'string',
inside: {
'punctuation': /^_?`|`$|`?_?_$/
@@ -202,4 +202,4 @@ Prism.languages.rest = {
pattern: /(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,
lookbehind: true
}
-};
\ No newline at end of file
+};
diff --git a/components/prism-rest.min.js b/components/prism-rest.min.js
index 92b620f..4052f5a 100644
--- a/components/prism-rest.min.js
+++ b/components/prism-rest.min.js
@@ -1 +1 @@
-Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}};
\ No newline at end of file
+Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}};
\ No newline at end of file
diff --git a/components/prism-scheme.js b/components/prism-scheme.js
index da12d76..13a0f6d 100644
--- a/components/prism-scheme.js
+++ b/components/prism-scheme.js
@@ -17,7 +17,7 @@ Prism.languages.scheme = {
lookbehind: true
},
'number': {
- pattern: /([\s()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,
+ pattern: /([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/,
lookbehind: true
},
'boolean': /#[tf]/,
diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js
index b27a920..04bc6c1 100644
--- a/components/prism-scheme.min.js
+++ b/components/prism-scheme.min.js
@@ -1 +1 @@
-Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/};
\ No newline at end of file
+Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/};
\ No newline at end of file
diff --git a/components/prism-splunk-spl.js b/components/prism-splunk-spl.js
new file mode 100644
index 0000000..b9ec3fc
--- /dev/null
+++ b/components/prism-splunk-spl.js
@@ -0,0 +1,24 @@
+Prism.languages['splunk-spl'] = {
+ 'comment': /`comment\("(?:\\.|[^\\"])*"\)`/,
+ 'string': {
+ pattern: /"(?:\\.|[^\\"])*"/,
+ greedy: true
+ },
+ // https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/ListOfSearchCommands
+ 'keyword': /\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,
+ 'operator-word': {
+ pattern: /\b(?:and|as|by|not|or|xor)\b/i,
+ alias: 'operator'
+ },
+ 'function': /\w+(?=\s*\()/,
+ 'property': /\w+(?=\s*=(?!=))/,
+ 'date': {
+ // MM/DD/YYYY(:HH:MM:SS)?
+ pattern: /\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,
+ alias: 'number'
+ },
+ 'number': /\b\d+(?:\.\d+)?\b/,
+ 'boolean': /\b(?:f|false|t|true)\b/i,
+ 'operator': /[<>=]=?|[-+*/%|]/,
+ 'punctuation': /[()[\],]/
+}
diff --git a/components/prism-splunk-spl.min.js b/components/prism-splunk-spl.min.js
new file mode 100644
index 0000000..35c43b8
--- /dev/null
+++ b/components/prism-splunk-spl.min.js
@@ -0,0 +1 @@
+Prism.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\w+(?=\s*\()/,property:/\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/};
\ No newline at end of file
diff --git a/components/prism-visual-basic.js b/components/prism-visual-basic.js
index f58ccec..0c4cd61 100644
--- a/components/prism-visual-basic.js
+++ b/components/prism-visual-basic.js
@@ -11,7 +11,7 @@ Prism.languages['visual-basic'] = {
greedy: true
},
'string': {
- pattern: /["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,
+ pattern: /\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,
greedy: true
},
'date': {
diff --git a/components/prism-visual-basic.min.js b/components/prism-visual-basic.min.js
index fd07466..3518d8c 100644
--- a/components/prism-visual-basic.min.js
+++ b/components/prism-visual-basic.min.js
@@ -1 +1 @@
-Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b).*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"];
\ No newline at end of file
+Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b).*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"];
\ No newline at end of file
diff --git a/download.html b/download.html
index abd58ca..c8e0bf9 100644
--- a/download.html
+++ b/download.html
@@ -107,7 +107,6 @@ section.download {
}
#download pre {
height: 20em;
- word-wrap: break-word;
}
#download .download-button {
cursor: pointer;
diff --git a/examples/prism-actionscript.html b/examples/prism-actionscript.html
index abb5804..9ef3987 100644
--- a/examples/prism-actionscript.html
+++ b/examples/prism-actionscript.html
@@ -93,7 +93,7 @@ class B extends A {}</code></pre>
var gradientBmp:BitmapData = new BitmapData(256, 10, false, 0);
gradientBmp.draw(gradient);
RLUT = new Array(); GLUT = new Array(); BLUT = new Array();
- for (var i:int = 0; i < 256; i++) {
+ for (var i:int = 0; i < 256; i++) {
var pixelColor:uint = gradientBmp.getPixel(i, 0);
//I drew the gradient backwards, so sue me
RLUT[256-i] = pixelColor & 0xff0000;
@@ -130,4 +130,4 @@ class B extends A {}</code></pre>
colorBmp.paletteMap(sourceBmp, sourceBmp.rect, O, RLUT, GLUT, BLUT, null);
}
}
-}</code></pre>
\ No newline at end of file
+}</code></pre>
diff --git a/examples/prism-applescript.html b/examples/prism-applescript.html
index c88390e..9567b87 100644
--- a/examples/prism-applescript.html
+++ b/examples/prism-applescript.html
@@ -24,18 +24,3 @@ text 1 thru 5 of "Bring me the mouse."
set averageTemp to 63 as degrees Fahrenheit
set circleArea to (pi * 7 * 7) as square yards
</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>Comments only support one level of nesting</h3>
-<pre><code>(* Nested block
- (* comments
- (* on more than
- 2 levels *)
- are *)
-not supported *)</code></pre>
\ No newline at end of file
diff --git a/examples/prism-arduino.html b/examples/prism-arduino.html
index 915f700..cc96f26 100644
--- a/examples/prism-arduino.html
+++ b/examples/prism-arduino.html
@@ -14,7 +14,7 @@ are supported too."</code></pre>
false;</code></pre>
<h2>Operators</h2>
-<pre><code>a < b;
+<pre><code>a < b;
c && d;</code></pre>
<h2>Full example</h2>
@@ -28,7 +28,7 @@ int piezo = 8;
* runs once before everyhing else
*/
void setup() {
- pinMode(piezo, OUTPUT);
+ pinMode(piezo, OUTPUT);
}
/**
diff --git a/examples/prism-asciidoc.html b/examples/prism-asciidoc.html
index d6df302..bd2aedf 100644
--- a/examples/prism-asciidoc.html
+++ b/examples/prism-asciidoc.html
@@ -88,7 +88,7 @@ Dolor::
<pre><code>[cols="e,m,^,>s",width="25%"]
|============================
|1 >s|2 |3 |4
-^|5 2.2+^.^|6 .3+<.>m|7
+^|5 2.2+^.^|6 .3+<.>m|7
^|8
|9 2+>|10
|============================</code></pre>
@@ -101,4 +101,4 @@ This is an _emphasis_
<h2>Attribute entries</h2>
<pre><code>:Author Initials: JB
{authorinitials}
-:Author Initials!:</code></pre>
\ No newline at end of file
+:Author Initials!:</code></pre>
diff --git a/examples/prism-aspnet.html b/examples/prism-aspnet.html
index d9c30fc..d65a84d 100644
--- a/examples/prism-aspnet.html
+++ b/examples/prism-aspnet.html
@@ -1,17 +1,17 @@
<h2>Comments</h2>
-<pre><code><%-- This is a comment --%>
-<%-- This is a
+<pre><code><%-- This is a comment --%>
+<%-- This is a
multi-line comment --%></code></pre>
<h2>Page directives</h2>
-<pre><code><%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
+<pre><code><%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
</code></pre>
<h2>Directive tag</h2>
-<pre><code><%: Page.Title %>
-<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
+<pre><code><%: Page.Title %>
+<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
<span>
- <%#:Item.ProductName%>
+ <%#:Item.ProductName%>
</span></code></pre>
<h2>Highlighted C# inside scripts</h2>
@@ -19,18 +19,18 @@ multi-line comment --%></code></pre>
On this page, check C# <strong>before</strong> checking ASP.NET should make
the example below work properly.</p>
<pre><code><script runat="server">
- // The following variables are visible to all procedures
- // within the script block.
- String str;
- int i;
- int i2;
+ // The following variables are visible to all procedures
+ // within the script block.
+ String str;
+ int i;
+ int i2;
- int DoubleIt(int inpt)
- {
- // The following variable is visible only within
- // the DoubleIt procedure.
- int factor = 2;
+ int DoubleIt(int inpt)
+ {
+ // The following variable is visible only within
+ // the DoubleIt procedure.
+ int factor = 2;
- return inpt * factor;
- }
-</script></code></pre>
\ No newline at end of file
+ return inpt * factor;
+ }
+</script></code></pre>
diff --git a/examples/prism-autohotkey.html b/examples/prism-autohotkey.html
index 620edb2..3e7ced7 100644
--- a/examples/prism-autohotkey.html
+++ b/examples/prism-autohotkey.html
@@ -19,7 +19,7 @@ if f_path =
return
if f_class = #32770 ; It's a dialog.
{
- if f_Edit1Pos <> ; And it has an Edit1 control.
+ if f_Edit1Pos <> ; And it has an Edit1 control.
{
; Activate the window so that if the user is middle-clicking
; outside the dialog, subsequent clicks will also work:
@@ -37,7 +37,7 @@ if f_class = #32770 ; It's a dialog.
}
else if f_class in ExploreWClass,CabinetWClass ; In Explorer, switch folders.
{
- if f_Edit1Pos <> ; And it has an Edit1 control.
+ if f_Edit1Pos <> ; And it has an Edit1 control.
{
ControlSetText, Edit1, %f_path%, ahk_id %f_window_id%
; Tekl reported the following: "If I want to change to Folder L:\folder
@@ -65,4 +65,4 @@ else if f_class = ConsoleWindowClass ; In a console window, CD to that directory
; 2) It's a supported type but it lacks an Edit1 control to facilitate the custom
; action, so instead do the default action below.
Run, Explorer %f_path% ; Might work on more systems without double quotes.
-return</code></pre>
\ No newline at end of file
+return</code></pre>
diff --git a/examples/prism-autoit.html b/examples/prism-autoit.html
index 51220b4..be283a4 100644
--- a/examples/prism-autoit.html
+++ b/examples/prism-autoit.html
@@ -36,17 +36,3 @@ For $i = 1 To 10
EndIf
MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i)
Next</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>Nested block comments</h3>
-<pre><code>#cs
- #cs
- foo()
- #ce
-#ce</code></pre>
\ No newline at end of file
diff --git a/examples/prism-bash.html b/examples/prism-bash.html
index 3e0febf..5cf56d1 100644
--- a/examples/prism-bash.html
+++ b/examples/prism-bash.html
@@ -21,7 +21,7 @@ args=("$@")
echo ${args[0]} ${args[1]} ${args[2]}</code></pre>
<h2>Keywords</h2>
-<pre><code>for (( i=0;i<$ELEMENTS;i++)); do
+<pre><code>for (( i=0;i<$ELEMENTS;i++)); do
echo ${ARRAY[${i}]}
done
while read LINE; do
@@ -46,4 +46,4 @@ sudo dpkg -i vagrant_1.7.2_x86_64.deb
git pull origin master
-sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update</code></pre>
\ No newline at end of file
+sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update</code></pre>
diff --git a/examples/prism-basic.html b/examples/prism-basic.html
index 3630a8a..241a057 100644
--- a/examples/prism-basic.html
+++ b/examples/prism-basic.html
@@ -57,7 +57,7 @@ DO
CALL PrintSomeStars(NumStars)
DO
INPUT "Do you want more stars? ", Answer$
- LOOP UNTIL Answer$ <> ""
+ LOOP UNTIL Answer$ <> ""
Answer$ = LEFT$(Answer$, 1)
LOOP WHILE UCASE$(Answer$) = "Y"
PRINT "Goodbye "; UserName$
@@ -66,4 +66,4 @@ SUB PrintSomeStars (StarCount)
REM This procedure uses a local variable called Stars$
Stars$ = STRING$(StarCount, "*")
PRINT Stars$
-END SUB</code></pre>
\ No newline at end of file
+END SUB</code></pre>
diff --git a/examples/prism-bison.html b/examples/prism-bison.html
index 9c7edeb..a4ccf8d 100644
--- a/examples/prism-bison.html
+++ b/examples/prism-bison.html
@@ -50,7 +50,7 @@ int yylex(void);
string* op_val;
}
-%start input
+%start input
%token <int_val> INTEGER_LITERAL
%type <int_val> exp
@@ -74,7 +74,7 @@ int yyerror(string s)
{
extern int yylineno; // defined and maintained in lex.c
extern char *yytext; // defined and maintained in lex.c
-
+
cerr << "ERROR: " << s << " at symbol \"" << yytext;
cerr << "\" on line " << yylineno << endl;
exit(1);
@@ -84,21 +84,3 @@ int yyerror(char *s)
{
return yyerror(string(s));
}</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>Two levels of nesting inside C section</h3>
-<pre><code>{
- if($1) {
- if($2) {
-
- }
- }
-} // <- Broken
-%%
-%%</code></pre>
\ No newline at end of file
diff --git a/examples/prism-brainfuck.html b/examples/prism-brainfuck.html
index 89a435c..d47a974 100644
--- a/examples/prism-brainfuck.html
+++ b/examples/prism-brainfuck.html
@@ -7,15 +7,15 @@
>+++ Add 3 to Cell #3
>+++ Add 3 to Cell #4
>+ Add 1 to Cell #5
- <<<<- Decrement the loop counter in Cell #1
+ <<<<- Decrement the loop counter in Cell #1
] Loop till Cell #1 is zero; number of iterations is 4
>+ Add 1 to Cell #2
>+ Add 1 to Cell #3
>- Subtract 1 from Cell #4
>>+ Add 1 to Cell #6
- [<] Move back to the first zero cell you find; this will
+ [<] Move back to the first zero cell you find; this will
be Cell #1 which was cleared by the previous loop
- <- Decrement the loop Counter in Cell #0
+ <- Decrement the loop Counter in Cell #0
] Loop till Cell #0 is zero; number of iterations is 8
The result of this is:
@@ -27,11 +27,11 @@ Pointer : ^
>---. Subtract 3 from Cell #3 to get 101 which is 'e'
+++++++..+++. Likewise for 'llo' from Cell #3
>>. Cell #5 is 32 for the space
-<-. Subtract 1 from Cell #4 for 87 to give a 'W'
-<. Cell #3 was set to 'o' from the end of 'Hello'
+<-. Subtract 1 from Cell #4 for 87 to give a 'W'
+<. Cell #3 was set to 'o' from the end of 'Hello'
+++.------.--------. Cell #3 for 'rl' and 'd'
>>+. Add 1 to Cell #5 gives us an exclamation point
>++. And finally a newline from Cell #6</code></pre>
<h2>One-line example</h2>
-<pre><code>++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.</code></pre>
+<pre><code>++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.</code></pre>
diff --git a/examples/prism-bro.html b/examples/prism-bro.html
index 83d6374..d7645c6 100644
--- a/examples/prism-bro.html
+++ b/examples/prism-bro.html
@@ -300,7 +300,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
# because c might not correspond to an active connection (which
# causes the function to fail).
if ( suppress_UDP_scan_checks &&
- service >= 0/udp && service <= 65535/udp )
+ service >= 0/udp && service <= 65535/udp )
return F;
if ( service in skip_services && ! outbound )
@@ -343,8 +343,8 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
empty_bs_table;
}
- if ( ++distinct_backscatter_peers[orig][resp] <= 2 &&
- # The test is <= 2 because we get two check_scan()
+ if ( ++distinct_backscatter_peers[orig][resp] <= 2 &&
+ # The test is <= 2 because we get two check_scan()
# calls, once on connection attempt and once on
# tear-down.
@@ -380,7 +380,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
pre_distinct_peers[orig] = set();
add pre_distinct_peers[orig][resp];
- if ( |pre_distinct_peers[orig]| < addr_scan_trigger )
+ if ( |pre_distinct_peers[orig]| < addr_scan_trigger )
ignore = T;
}
@@ -462,7 +462,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
}
# Check for low ports.
- if ( activate_priv_port_check && ! outbound && service < 1024/tcp &&
+ if ( activate_priv_port_check && ! outbound && service < 1024/tcp &&
service !in troll_skip_service )
{
if ( orig !in distinct_low_ports ||
@@ -559,7 +559,7 @@ function thresh_check(v: vector of count, idx: table[addr] of count,
return F;
}
- if ( idx[orig] <= |v| && n >= v[idx[orig]] )
+ if ( idx[orig] <= |v| && n >= v[idx[orig]] )
{
++idx[orig];
return T;
@@ -578,7 +578,7 @@ function thresh_check_2(v: vector of count, idx: table[addr, addr] of count,
return F;
}
- if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] )
+ if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] )
{
++idx[orig,resp];
return T;
@@ -642,4 +642,4 @@ event bro_done()
for ( orig in distinct_low_ports )
lowport_summary(distinct_low_ports, orig);
}
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/examples/prism-c.html b/examples/prism-c.html
index aee1c06..635b01f 100644
--- a/examples/prism-c.html
+++ b/examples/prism-c.html
@@ -16,7 +16,7 @@ main(int argc, char *argv[])
{
int c;
printf("Number of command line arguments passed: %d\n", argc);
- for ( c = 0 ; c < argc ; c++)
+ for ( c = 0 ; c < argc ; c++)
printf("%d. Command line argument passed is %s\n", c+1, argv[c]);
return 0;
-}</code></pre>
\ No newline at end of file
+}</code></pre>
diff --git a/examples/prism-clojure.html b/examples/prism-clojure.html
index abc5019..4dd5118 100644
--- a/examples/prism-clojure.html
+++ b/examples/prism-clojure.html
@@ -255,8 +255,8 @@ keymap ; => {:a 1, :b 2, :c 3}
; The "Thread-first" macro (->) inserts into each form the result of
; the previous, as the first argument (second item)
-(->
- {:a 1 :b 2}
+(->
+ {:a 1 :b 2}
(assoc :c 3) ;=> (assoc {:a 1 :b 2} :c 3)
(dissoc :b)) ;=> (dissoc (assoc {:a 1 :b 2} :c 3) :b)
@@ -275,7 +275,7 @@ keymap ; => {:a 1, :b 2, :c 3}
; Result: [1 3 5 7 9]
; When you are in a situation where you want more freedom as where to
-; put the result of previous data transformations in an
+; put the result of previous data transformations in an
; expression, you can use the as-> macro. With it, you can assign a
; specific name to transformations' output and use it as a
; placeholder in your chained expressions:
@@ -365,7 +365,7 @@ keymap ; => {:a 1, :b 2, :c 3}
(swap! my-atom assoc :b 2) ; Sets my-atom to the result of (assoc {:a 1} :b 2)
; Use '@' to dereference the atom and get the value
-my-atom ;=> Atom<#...> (Returns the Atom object)
+my-atom ;=> Atom<#...> (Returns the Atom object)
@my-atom ; => {:a 1 :b 2}
; Here's a simple counter using an atom
@@ -383,4 +383,4 @@ my-atom ;=> Atom<#...> (Returns the Atom object)
; Other STM constructs are refs and agents.
; Refs: http://clojure.org/refs
-; Agents: http://clojure.org/agents</code></pre>
\ No newline at end of file
+; Agents: http://clojure.org/agents</code></pre>
diff --git a/examples/prism-cpp.html b/examples/prism-cpp.html
index 32bdcbd..f0fa1d3 100644
--- a/examples/prism-cpp.html
+++ b/examples/prism-cpp.html
@@ -32,7 +32,7 @@ vector<int> pick_vector_with_biggest_fifth_element(
vector<int> left,
vector<int> right
){
- if( (left[5]) < (right[5]) ){
+ if( (left[5]) < (right[5]) ){
return( right );
};
// else
@@ -40,18 +40,18 @@ vector<int> pick_vector_with_biggest_fifth_element(
}
int vector_demo(void){
- cout << "vector demo" << endl;
+ cout << "vector demo" << endl;
vector<int> left(7);
vector<int> right(7);
left[5] = 7;
right[5] = 8;
- cout << left[5] << endl;
- cout << right[5] << endl;
+ cout << left[5] << endl;
+ cout << right[5] << endl;
vector<int> biggest(
pick_vector_with_biggest_fifth_element( left, right )
);
- cout << biggest[5] << endl;
+ cout << biggest[5] << endl;
return 0;
}
diff --git a/examples/prism-d.html b/examples/prism-d.html
index d4bf34c..9ef1d6c 100644
--- a/examples/prism-d.html
+++ b/examples/prism-d.html
@@ -252,16 +252,3 @@ void main(char[][] args) // 'void' here means return 0 by default.
assert(_totalc >= _argc);
}
}</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>Comments only support one level of nesting</h3>
-<pre><code>/+ /+ /+ this does not work +/ +/ +/</code></pre>
-
-<h3>Token strings only support one level of nesting</h3>
-<pre><code>q{ q{ q{ this does not work } } }</code></pre>
\ No newline at end of file
diff --git a/examples/prism-dns-zone-file.html b/examples/prism-dns-zone-file.html
new file mode 100644
index 0000000..00f5a04
--- /dev/null
+++ b/examples/prism-dns-zone-file.html
@@ -0,0 +1,14 @@
+<h2>Full example</h2>
+<pre><code>$TTL 3d
+@ IN SOA root.localhost. root.sneaky.net. (
+ 2015050503 ; serial
+ 12h ; refresh
+ 15m ; retry
+ 3w ; expire
+ 3h ; negative response TTL
+ )
+ IN NS root.localhost.
+ IN NS localhost. ; secondary name server is preferably externally maintained
+
+www IN A 3.141.59.26
+ww1 IN CNAME www</code></pre>
diff --git a/examples/prism-elixir.html b/examples/prism-elixir.html
index 7112fbc..df4426b 100644
--- a/examples/prism-elixir.html
+++ b/examples/prism-elixir.html
@@ -450,13 +450,3 @@ send pid, {:circle, 2}
# The shell is also a process, you can use `self` to get the current pid
self() #=> #PID<0.27.0></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 interpolation in single-quoted strings</h3>
-<pre><code>'#{:atom} <- this should not be highligted'</code></pre>
\ No newline at end of file
diff --git a/examples/prism-fsharp.html b/examples/prism-fsharp.html
index 6a4330b..c0b9921 100644
--- a/examples/prism-fsharp.html
+++ b/examples/prism-fsharp.html
@@ -5,7 +5,6 @@ comment *)</code></pre>
<h2>Strings</h2>
<pre><code>"foo \"bar\" baz"
-'foo \'bar\' baz'
@"Verbatim strings"
"""Alternate "verbatim" strings"""
</code></pre>
@@ -58,32 +57,32 @@ comment *)</code></pre>
</code></pre>
<h2>Full example</h2>
-<pre><code>// The declaration creates a constructor that takes two values, name and age.
+<pre><code>// The declaration creates a constructor that takes two values, name and age.
type Person(name:string, age:int) =
- // A Person object's age can be changed. The mutable keyword in the
- // declaration makes that possible.
+ // A Person object's age can be changed. The mutable keyword in the
+ // declaration makes that possible.
let mutable internalAge = age
- // Declare a second constructor that takes only one argument, a name.
- // This constructor calls the constructor that requires two arguments,
- // sending 0 as the value for age.
+ // Declare a second constructor that takes only one argument, a name.
+ // This constructor calls the constructor that requires two arguments,
+ // sending 0 as the value for age.
new(name:string) = Person(name, 0)
- // A read-only property.
+ // A read-only property.
member this.Name = name
- // A read/write property.
+ // A read/write property.
member this.Age
with get() = internalAge
and set(value) = internalAge <- value
- // Instance methods.
- // Increment the person's age.
+ // Instance methods.
+ // Increment the person's age.
member this.HasABirthday () = internalAge <- internalAge + 1
- // Check current age against some threshold.
+ // Check current age against some threshold.
member this.IsOfAge targetAge = internalAge >= targetAge
- // Display the person's name and age.
- override this.ToString () =
+ // Display the person's name and age.
+ override this.ToString () =
"Name: " + name + "\n" + "Age: " + (string)internalAge
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/examples/prism-gml.html b/examples/prism-gml.html
index a1649f6..5526c5c 100644
--- a/examples/prism-gml.html
+++ b/examples/prism-gml.html
@@ -8,7 +8,7 @@ on multiple lines */</code></pre>
<h2>Full example</h2>
<pre><code>if(instance_exists(_inst) || _inst==global){
- if(_delay<=0){
+ if(_delay<=0){
_time+=1;
if(_time<_duration){
event_user(0);
diff --git a/examples/prism-go.html b/examples/prism-go.html
index 205a1a7..da2bc7f 100644
--- a/examples/prism-go.html
+++ b/examples/prism-go.html
@@ -41,7 +41,7 @@ string`
string"</code></pre>
<h2>Functions</h2>
-<pre><code>func(a, b int, z float64) bool { return a*b < int(z) }</code></pre>
+<pre><code>func(a, b int, z float64) bool { return a*b < int(z) }</code></pre>
<h2>Full example</h2>
<pre><code>package main
@@ -52,7 +52,7 @@ func sum(a []int, c chan int) {
for _, v := range a {
sum += v
}
- c <- sum // send sum to c
+ c <- sum // send sum to c
}
func main() {
@@ -61,8 +61,8 @@ func main() {
c := make(chan int)
go sum(a[:len(a)/2], c)
go sum(a[len(a)/2:], c)
- x, y := <-c, <-c // receive from c
+ x, y := <-c, <-c // receive from c
fmt.Println(x, y, x+y)
}
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/examples/prism-groovy.html b/examples/prism-groovy.html
index 3ec1d6d..ac36cf7 100644
--- a/examples/prism-groovy.html
+++ b/examples/prism-groovy.html
@@ -81,13 +81,3 @@ class Distribution implements Distributable {
assert 4 / 2 == 2
}
}</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>Two divisions on the same line</h3>
-<pre><code>2 / 3 / 4</code></pre>
\ No newline at end of file
diff --git a/examples/prism-haml.html b/examples/prism-haml.html
index c2cc670..364595a 100644
--- a/examples/prism-haml.html
+++ b/examples/prism-haml.html
@@ -21,7 +21,7 @@ but this is not
%html{html_attrs('fr-fr')}
%div[@user, :greeting]
%img
-%pre><
+%pre><
foo
bar
%img
@@ -76,4 +76,4 @@ On this page, check CoffeeScript <strong>before</strong> checking Haml should ma
the example below work properly.</p>
<pre><code>%script
:coffee
- console.log 'This is coffee script'</code></pre>
\ No newline at end of file
+ console.log 'This is coffee script'</code></pre>
diff --git a/examples/prism-handlebars.html b/examples/prism-handlebars.html
index c39c8b7..8e07329 100644
--- a/examples/prism-handlebars.html
+++ b/examples/prism-handlebars.html
@@ -29,13 +29,3 @@
This should probably work...
{{/block-with-hyphens}}
</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>Handlebars tag in the middle of an HTML tag</h3>
-<pre><code><div{{#if test}} class="test"{{/if}}></div></code></pre>
diff --git a/examples/prism-haskell.html b/examples/prism-haskell.html
index de58eb7..799bbdf 100644
--- a/examples/prism-haskell.html
+++ b/examples/prism-haskell.html
@@ -28,7 +28,7 @@ comment -}</code></pre>
wantReadableHandle_ "Data.ByteString.hGetLine" h $
\ h_@Handle__{haByteBuffer} -> do
flushCharReadBuffer h_
- buf <- readIORef haByteBuffer
+ buf <- readIORef haByteBuffer
if isEmptyBuffer buf
then fill h_ buf 0 []
else haveBuf h_ buf 0 []
@@ -36,7 +36,7 @@ comment -}</code></pre>
fill h_@Handle__{haByteBuffer,haDevice} buf len xss =
len `seq` do
- (r,buf') <- Buffered.fillReadBuffer haDevice buf
+ (r,buf') <- Buffered.fillReadBuffer haDevice buf
if r == 0
then do writeIORef haByteBuffer buf{ bufR=0, bufL=0 }
if len > 0
@@ -48,9 +48,9 @@ comment -}</code></pre>
buf@Buffer{ bufRaw=raw, bufR=w, bufL=r }
len xss =
do
- off <- findEOL r w raw
+ off <- findEOL r w raw
let new_len = len + off - r
- xs <- mkPS raw r off
+ xs <- mkPS raw r off
-- if eol == True, then off is the offset of the '\n'
-- otherwise off == w and the buffer is now empty.
@@ -66,7 +66,7 @@ comment -}</code></pre>
findEOL r w raw
| r == w = return w
| otherwise = do
- c <- readWord8Buf raw r
+ c <- readWord8Buf raw r
if c == fromIntegral (ord '\n')
then return r -- NB. not r+1: don't include the '\n'
else findEOL (r+1) w raw
@@ -77,4 +77,4 @@ mkPS buf start end =
withRawBuffer buf $ \pbuf -> do
copyBytes p (pbuf `plusPtr` start) len
where
- len = end - start</code></pre>
\ No newline at end of file
+ len = end - start</code></pre>
diff --git a/examples/prism-inform7.html b/examples/prism-inform7.html
index 9e2214f..d4c3b74 100644
--- a/examples/prism-inform7.html
+++ b/examples/prism-inform7.html
@@ -159,13 +159,3 @@ The player wears a bathing outfit. The description of the bathing outfit is "Sty
Instead of taking off the outfit: say "What odd ideas come into your head sometimes!"
Test me with "fill glass / empty absinthe into lake / fill glass / swim / drink lake / drink / x water / x lake". </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>Names starting with a number</h3>
-<pre><code>The box 1A is a container</code></pre>
\ No newline at end of file
diff --git a/examples/prism-j.html b/examples/prism-j.html
index cf4c109..0227e31 100644
--- a/examples/prism-j.html
+++ b/examples/prism-j.html
@@ -34,7 +34,7 @@ NB. interchange two rows of a matrix,
NB. multiply a row by a constant,
NB. and add a multiple of one row to another:
-E1=: <@] C. [
+E1=: <@] C. [
E2=: f`g`[}
E3=: F`g`[}
f=: {:@] * {.@] { [
@@ -56,4 +56,4 @@ quicksort=: verb define
<pre><code>NB. Implementation of quicksort (tacit programming)
-quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)</code></pre>
\ No newline at end of file
+quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)</code></pre>
diff --git a/examples/prism-java.html b/examples/prism-java.html
index 691a6b1..277a1ab 100644
--- a/examples/prism-java.html
+++ b/examples/prism-java.html
@@ -39,8 +39,8 @@ public class Life {
public static boolean[][] gen(){
boolean[][] grid = new boolean[10][10];
- for(int r = 0; r < 10; r++)
- for(int c = 0; c < 10; c++)
+ for(int r = 0; r < 10; r++)
+ for(int c = 0; c < 10; c++)
if( Math.random() > 0.7 )
grid[r][c] = true;
return grid;
diff --git a/examples/prism-javascript.html b/examples/prism-javascript.html
index 35ccf7d..f073b65 100644
--- a/examples/prism-javascript.html
+++ b/examples/prism-javascript.html
@@ -64,17 +64,3 @@ import { foo as bar } from "file.js"
multiple lines.`
`40 + 2 = ${ 40 + 2 }`
`The squares of the first 3 natural integers are ${[for (x of [1,2,3]) x*x].join(', ')}`</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 interpolation containing a closing brace</h3>
-<pre><code>`${ /* } */ a + b }`
-`${ '}' }`</code></pre>
-
-<h3>String interpolation with deeply nested braces</h3>
-<pre><code>`${foo({ a: { b: { c: true } } })}`</code></pre>
diff --git a/examples/prism-jolie.html b/examples/prism-jolie.html
index 8d23d99..9a35b00 100644
--- a/examples/prism-jolie.html
+++ b/examples/prism-jolie.html
@@ -60,7 +60,7 @@ interface extender AuthInterfaceExtender {
OneWay: *(AuthenticationData)
}
-service SubService
+service SubService
{
Interfaces: NetInterface
@@ -92,9 +92,9 @@ inputPort In {
.debug.showContent = true
}
Interfaces: NetInterface
- Aggregates: SubService,
+ Aggregates: SubService,
LoggerService
- Redirects: A => SubService,
+ Redirects: A => SubService,
B => SubService
}
@@ -105,11 +105,11 @@ cset {
execution{ concurrent }
define netmodule {
- if( request.load == 0 || request.load < 1 &&
- request.load <= 2 || request.load >= 3 &&
+ if( request.load == 0 || request.load < 1 &&
+ request.load <= 2 || request.load >= 3 &&
request.load > 4 || request.load%4 == 2
) {
- scope( scopeName ) {
+ scope( scopeName ) {
// inline comment
install( MyFault => println@Console( "Something \"Went\" Wrong" + ' but it\'s ok' )() );
/*
@@ -127,9 +127,9 @@ define netmodule {
with( node ){
while( .load != 100 ) {
.load++
- }
+ }
}
- }
+ }
}
}
@@ -159,4 +159,4 @@ main
}
until
[ quit() ]{ exit }
-}</code></pre>
\ No newline at end of file
+}</code></pre>
diff --git a/examples/prism-less.html b/examples/prism-less.html
index db8a5e6..56f0562 100644
--- a/examples/prism-less.html
+++ b/examples/prism-less.html
@@ -48,23 +48,3 @@ comment */</code></pre>
@{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-lua.html b/examples/prism-lua.html
index 288b767..9c18b9d 100644
--- a/examples/prism-lua.html
+++ b/examples/prism-lua.html
@@ -77,13 +77,3 @@ function song(n)
io.write(line1(i), line2(i), line3(i - 1), "\n")
end
end</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>Functions with a single string parameter not using parentheses are not highlighted</h3>
-<pre><code>foobar"param";</code></pre>
diff --git a/examples/prism-makefile.html b/examples/prism-makefile.html
index 45f6f42..fd74713 100644
--- a/examples/prism-makefile.html
+++ b/examples/prism-makefile.html
@@ -19,7 +19,7 @@ edit : $(objects)
$(objects) : defs.h
-%oo: $$< $$^ $$+ $$*
+%oo: $$< $$^ $$+ $$*
foo : bar/lose
cd $(@D) && gobble $(@F) > ../$@</code></pre>
@@ -260,4 +260,4 @@ tar.zoo: $(SRCS) $(AUX)
> tmp.dir/$$X ; done
cd tmp.dir ; zoo aM ../tar.zoo *
-rm -rf tmp.dir
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/examples/prism-markdown.html b/examples/prism-markdown.html
index a57eaea..ea44fea 100644
--- a/examples/prism-markdown.html
+++ b/examples/prism-markdown.html
@@ -67,20 +67,3 @@ is not allowed__
> Containing <strong>raw HTML</strong>
<p>*Italic text inside HTML tag*</p></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>Nesting of elements is not fully supported</h3>
-<pre><code>_ **bold** inside italic DOESN'T work _
-__ but *italic* inside bold DOES work __
-
-[Link partially *italic* DOESN'T work](http://example.com)
-_ [But link inside italic DOES work](http://example.com) _
-
-[Link partially **bold** DOESN'T work](http://example.com)
-__ [But link inside bold DOES work](http://example.com) __</code></pre>
\ No newline at end of file
diff --git a/examples/prism-matlab.html b/examples/prism-matlab.html
index e78abe3..790d71c 100644
--- a/examples/prism-matlab.html
+++ b/examples/prism-matlab.html
@@ -40,7 +40,7 @@ switch dayString
end
n = 1;
nFactorial = 1;
-while nFactorial < 1e100
+while nFactorial < 1e100
n = n + 1;
nFactorial = nFactorial * n;
end</code></pre>
@@ -49,4 +49,4 @@ end</code></pre>
<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>
\ No newline at end of file
+[x,y] = mygrid(pi,2*pi);</code></pre>
diff --git a/examples/prism-mel.html b/examples/prism-mel.html
index e887975..eaf3ba5 100644
--- a/examples/prism-mel.html
+++ b/examples/prism-mel.html
@@ -28,14 +28,14 @@ print($array[0]); // Prints "first\n"
print($array[1]); // Prints "second\n"
print($array[2]); // Prints "third\n"
-vector $roger = <<3.0, 7.7, 9.1>>;
-vector $more = <<4.5, 6.789, 9.12356>>;
+vector $roger = <<3.0, 7.7, 9.1>>;
+vector $more = <<4.5, 6.789, 9.12356>>;
// Assign a vector to variable $test:
-vector $test = <<3.0, 7.7, 9.1>>;
-$test = <<$test.x, 5.5, $test.z>>
-// $test is now <<3.0, 5.5, 9.1>>
+vector $test = <<3.0, 7.7, 9.1>>;
+$test = <<$test.x, 5.5, $test.z>>
+// $test is now <<3.0, 5.5, 9.1>>
-matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05;
+matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05;
1.12, 1.3, 9.5, 5.2;
7.23, 6.006, 2.34, 4.67>></code></pre>
@@ -82,7 +82,7 @@ global proc float dynTimePlayback( float $frames )
// Check for negative $frames. This indicates
// $silent mode.
//
- if ($frames < 0)
+ if ($frames < 0)
{
$silent = 1;
$frames = -$frames;
@@ -102,7 +102,7 @@ global proc float dynTimePlayback( float $frames )
$startTime = `timerX`;
// play -wait;
int $i;
- for ($i = 1; $i < $frames; $i++ )
+ for ($i = 1; $i < $frames; $i++ )
{
// Set time
//
@@ -110,7 +110,7 @@ global proc float dynTimePlayback( float $frames )
int $obj;
// Request count for every particle object.
//
- for ($obj = 0; $obj < $particleCount; $obj++)
+ for ($obj = 0; $obj < $particleCount; $obj++)
{
string $cmd = "getAttr " + $particleObjects[$obj]+".count";
eval( $cmd );
@@ -118,7 +118,7 @@ global proc float dynTimePlayback( float $frames )
// Request position for every transform
// (includes every rigid body).
//
- for ($obj = 0; $obj < $trCount; $obj++)
+ for ($obj = 0; $obj < $trCount; $obj++)
{
string $cmd = "getAttr " + $transforms[$obj]+".translate";
eval ($cmd);
@@ -134,4 +134,4 @@ global proc float dynTimePlayback( float $frames )
print( "Playback $rate: " + $rate + " $frames/sec\n" );
}
return ( $rate );
-} // timePlayback //</code></pre>
\ No newline at end of file
+} // timePlayback //</code></pre>
diff --git a/examples/prism-mizar.html b/examples/prism-mizar.html
index 98d626c..044c5c3 100644
--- a/examples/prism-mizar.html
+++ b/examples/prism-mizar.html
@@ -11,14 +11,14 @@ schemes NAT_1;
begin
P: for k being Nat
- st for n being Nat st n < k holds Fib (n+1) ≥ n
+ st for n being Nat st n < k holds Fib (n+1) ≥ n
holds Fib (k+1) ≥ k
proof let k be Nat; assume
-IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
+IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
per cases;
suppose k ≤ 1; then k = 0 or k = 0+1 by CQC_THE1:2;
hence Fib (k+1) ≥ k by PRE_FF:1;
- suppose 1 < k; then
+ suppose 1 < k; then
1+1 ≤ k by NAT_1:38; then
consider m being Nat such that
A: k = 1+1+m by NAT_1:28;
@@ -33,8 +33,8 @@ IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
m ≥ 1 by NAT_1:38; then
B: m+(m+1) ≥ m+1+1 by REAL_1:49;
C: k = m+1+1 by A, AXIOMS:13;
- m < m+1 & m+1 < m+1+1 by REAL_1:69; then
- m < k & m+1 < k by C, AXIOMS:22; then
+ m < m+1 & m+1 < m+1+1 by REAL_1:69; then
+ m < k & m+1 < k by C, AXIOMS:22; then
D: Fib (m+1) ≥ m & Fib (m+1+1) ≥ m+1 by IH;
Fib (m+1+1+1) = Fib (m+1) + Fib (m+1+1) by PRE_FF:1; then
Fib (m+1+1+1) ≥ m+(m+1) by D, REAL_1:55;
@@ -42,4 +42,4 @@ IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
end;
end;
-for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P);</code></pre>
\ No newline at end of file
+for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P);</code></pre>
diff --git a/examples/prism-nasm.html b/examples/prism-nasm.html
index c1b7c92..e76146d 100644
--- a/examples/prism-nasm.html
+++ b/examples/prism-nasm.html
@@ -57,18 +57,3 @@ dq 1.e-10 ; 0.000 000 000 1
dt 3.141592653589793238462 ; pi
do 1.e+4000 ; IEEE 754r quad precision
</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>Numbers with underscores</h3>
-<pre><code>mov ax,1100_1000b
-mov ax,1100_1000y
-mov ax,0b1100_1000
-mov ax,0y1100_1000
-
-dd 1.222_222_222</code></pre>
\ No newline at end of file
diff --git a/examples/prism-nim.html b/examples/prism-nim.html
index c661125..80296fb 100644
--- a/examples/prism-nim.html
+++ b/examples/prism-nim.html
@@ -176,7 +176,7 @@ macro class*(head: expr, body: stmt): stmt {.immediate.} =
# Empty
# OfInherit
# Ident !"RootObj"
- # Empty <= We want to replace this
+ # Empty <= We want to replace this
# MethodDef
# ...
@@ -219,4 +219,4 @@ animals.add(Cat(name: "Mitten", age: 10))
for a in animals:
echo a.vocalize()
- echo a.age_human_yrs()</code></pre>
\ No newline at end of file
+ echo a.age_human_yrs()</code></pre>
diff --git a/examples/prism-ocaml.html b/examples/prism-ocaml.html
index 0534b1d..46ee6dc 100644
--- a/examples/prism-ocaml.html
+++ b/examples/prism-ocaml.html
@@ -44,16 +44,16 @@ comment *)</code></pre>
match t with
| Empty -> false
| Interval (l,h) ->
- Endpoint.compare x l >= 0 && Endpoint.compare x h <= 0
+ Endpoint.compare x l >= 0 && Endpoint.compare x h <= 0
(** [intersect t1 t2] returns the intersection of the two input
intervals *)
let intersect t1 t2 =
- let min x y = if Endpoint.compare x y <= 0 then x else y in
+ let min x y = if Endpoint.compare x y <= 0 then x else y in
let max x y = if Endpoint.compare x y >= 0 then x else y in
match t1,t2 with
| Empty, _ | _, Empty -> Empty
| Interval (l1,h1), Interval (l2,h2) ->
create (max l1 l2) (min h1 h2)
- end ;;</code></pre>
\ No newline at end of file
+ end ;;</code></pre>
diff --git a/examples/prism-opencl.html b/examples/prism-opencl.html
index f901230..8431fb9 100644
--- a/examples/prism-opencl.html
+++ b/examples/prism-opencl.html
@@ -52,11 +52,11 @@ type_single filter_sum_single_3x3(read_only image2d_t imgIn,
// Image patch is row-wise accessed
// Filter kernel is centred in the middle
#pragma unroll
- for (int y = -ROWS_HALF_3x3; y <= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter
+ for (int y = -ROWS_HALF_3x3; y <= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter
{
coordCurrent.y = coordBase.y + y;
#pragma unroll
- for (int x = -COLS_HALF_3x3; x <= COLS_HALF_3x3; ++x) // And end at the bottom right corner
+ for (int x = -COLS_HALF_3x3; x <= COLS_HALF_3x3; ++x) // And end at the bottom right corner
{
coordCurrent.x = coordBase.x + x;
coordBorder = borderCoordinate(coordCurrent, rows, cols, border);
diff --git a/examples/prism-parser.html b/examples/prism-parser.html
index 4b4e9c0..c2fc79e 100644
--- a/examples/prism-parser.html
+++ b/examples/prism-parser.html
@@ -67,22 +67,4 @@ $result[$t.$sName]
# new functionality
@remove[iOffset;iLimit]
$iLimit(^iLimit.int(0))
-$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)]</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>Code block starting with a comment</h3>
-<pre><code># Doesn't work
-# Does work</code></pre>
-<pre><code> # Does work when prefixed with a space</code></pre>
-
-<h3>Comments inside expressions break literals and operators</h3>
-<pre><code>^if(
- $age>=4 # not too young
- && $age<=80 # and not too old
-)</code></pre>
\ No newline at end of file
+$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)]</code></pre>
diff --git a/examples/prism-pascaligo.html b/examples/prism-pascaligo.html
new file mode 100644
index 0000000..4562c50
--- /dev/null
+++ b/examples/prism-pascaligo.html
@@ -0,0 +1,63 @@
+<h2>Comments</h2>
+<pre><code>// Single line comment
+(* Multi-line
+comment *)</code></pre>
+
+<h2>Strings</h2>
+<pre><code>"foo \"bar\" baz";
+'foo \'bar\' baz';</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>123
+123.456
+-123.456
+1e-23
+123.456E789
+0xaf
+0xAF
+</code></pre>
+
+<h2>Functions</h2>
+<pre><code>foo()
+Bar()
+_456()
+</code></pre>
+
+<h2>Full Example</h2>
+<pre><code>
+function pop (const h : heap) : (heap * heap_element * nat) is
+ begin
+ const result : heap_element = get_top (h) ;
+ var s : nat := size(h) ;
+ const last : heap_element = get_force(s, h) ;
+ remove s from map h ;
+ h[1n] := last ;
+ s := size(h) ;
+ var i : nat := 0n ;
+ var largest : nat := 1n ;
+ var left : nat := 0n ;
+ var right : nat := 0n ;
+ var c : nat := 0n ;
+ while (largest =/= i) block {
+ c := c + 1n ;
+ i := largest ;
+ left := 2n * i ;
+ right := left + 1n ;
+ if (left <= s) then begin
+ if (heap_element_lt(get_force(left , h) , get_force(i , h))) then begin
+ largest := left ;
+ const tmp : heap_element = get_force(i , h) ;
+ h[i] := get_force(left , h) ;
+ h[left] := tmp ;
+ end else skip ;
+ end else if (right <= s) then begin
+ if (heap_element_lt(get_force(right , h) , get_force(i , h))) then begin
+ largest := right ;
+ const tmp : heap_element = get_force(i , h) ;
+ h[i] := get_force(right , h) ;
+ h[left] := tmp ;
+ end else skip ;
+ end else skip ;
+ }
+ end with (h , result , c)
+</code></pre>
diff --git a/examples/prism-pcaxis.html b/examples/prism-pcaxis.html
new file mode 100644
index 0000000..59ab311
--- /dev/null
+++ b/examples/prism-pcaxis.html
@@ -0,0 +1,35 @@
+<h2>Full example</h2>
+<pre><code>CHARSET="ANSI";
+AXIS-VERSION="2000";
+LANGUAGE="en";
+CREATION-DATE="20170406 11:08";
+TIMEVAL("time")=TLIST(A1, "1994"-"1996");
+SUBJECT-AREA="";
+UNITS="Number";
+
+STUB="County","Sex";
+VALUES("County")="State","Carlow","Dublin","Kildare","Kilkenny","Laois","Longford","Louth","Meath","Offaly","Westmeath","Wexford",
+"Wicklow","Clare","Cork","Kerry","Limerick","Tipperary","Waterford","Galway","Leitrim","Mayo","Roscommon","Sligo","Cavan",
+"Donegal","Monaghan";
+VALUES("Sex")="Both sexes","Male","Female";
+VALUES[de]("Sex")="Beide Geschlechter","Mann","Frau";
+CODES("County")="-","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26";
+CODES("Sex")="-","1","2";
+
+DATA=
+47163 87913 70192 84531 93120 343 5911 47038 51126 47870 95976 5643 66043 38987 63125 46882
+57422 89992 11661 35817 92686 21781 37230 80669 14129 56688 81300 20184 88680 52135 17148 28192
+92218 99175 76054 79907 90207 50547 31522 4244 91079 58776 83402 54109 21254 42946 83519 31242
+10925 37377 45279 19704 96633 51732 34458 9746 91761 42687 51681 54409 61058 74227 70802 34546
+64862 12022 29896 23616 50371 89808 57186 63895 94767 76388 66475 56716 50133 6604 52853 40763
+70558 74672 58190 40909 6869 49937 9271 28067 99656 25674 69442 20608 28046 73287 60416 77515
+51639 15516 40968 95524 6694 12956 83150 77099 45687 27241 6492 94966 36856 60693 720 74671
+17309 4831 69376 67757 67499 69029 5209 50738 86947 77747 10996 9167 69176 98856 29531 5865
+27654 52277 62293 30179 85049 76961 92772 65142 16252 6768 55784 20556 26088 97219 97245 44060
+64577 91018 75157 42780 96186 62948 73288 74597 2145 16047 1671 2690 2275 45398 71478 53720
+94832 91800 10398 84830 6009 9024 53132 97850 63832 13269 45376 38564 60343 85293 9330 16810
+24898 76675 32778 26905 40945 37569 43532 38650 38316 75398 60829 91004 97946 49080 93534 78275
+20002 87183 80802 56487 12666 18416 91632 74573 70729 97984 48479 93014 10281 90382 28497 15366
+29720 25646 98513 47065 37662 94058 17383 47234 87293 37849 32087 98641 62012 12584 35492 87090
+85157 90539 31005 67590 13627 44803 46789 8026 86877 18429 8935 78118 41728 67025 69312 52172
+49224 68064 93025 1195 64873 684 90039 86065 67324 66534 1110 22354 36867 27479 76286 8539</code></pre>
diff --git a/examples/prism-perl.html b/examples/prism-perl.html
index 85c3681..80a0874 100644
--- a/examples/prism-perl.html
+++ b/examples/prism-perl.html
@@ -54,10 +54,10 @@ $1, $_, %!;</code></pre>
$conf{user} = delete $conf{username} unless $conf{user};
}
else { # Process .pause manually
- open my $pauserc, '<', $filename
+ open my $pauserc, '<', $filename
or die "can't open $filename for reading: $!";
- while (<$pauserc>) {
+ while (<$pauserc>) {
chomp;
next unless $_ and $_ !~ /^\s*#/;
@@ -68,4 +68,4 @@ $1, $_, %!;</code></pre>
}
return \%conf;
-}</code></pre>
\ No newline at end of file
+}</code></pre>
diff --git a/examples/prism-php.html b/examples/prism-php.html
index 1a25589..23d4bae 100644
--- a/examples/prism-php.html
+++ b/examples/prism-php.html
@@ -41,7 +41,7 @@ trait ezcReflectionReturnInfo {
function getReturnDescription() { /*2*/ }
}
function gen_one_to_three() {
- for ($i = 1; $i <= 3; $i++) {
+ for ($i = 1; $i <= 3; $i++) {
// Note that $i is preserved between yields.
yield $i;
}
@@ -64,4 +64,4 @@ $a = <<<FOO
FOO;
$b = <<<"FOOBAR"
Interpolation inside Heredoc strings {$obj->values[3]->name}
-FOOBAR;</code></pre>
\ No newline at end of file
+FOOBAR;</code></pre>
diff --git a/examples/prism-powershell.html b/examples/prism-powershell.html
index e5dba2e..7028084 100644
--- a/examples/prism-powershell.html
+++ b/examples/prism-powershell.html
@@ -1,6 +1,6 @@
<h2>Comments</h2>
<pre><code># This is a comment
-<# This is a
+<# This is a
multi-line comment #></code></pre>
<h2>Variable Interpolation</h2>
@@ -16,4 +16,4 @@ $Names = @("Bob", "Alice")
$Names | ForEach {
SayHello $_
}
-</code></pre>
\ No newline at end of file
+</code></pre>
diff --git a/examples/prism-prolog.html b/examples/prism-prolog.html
index b231bca..a0df67e 100644
--- a/examples/prism-prolog.html
+++ b/examples/prism-prolog.html
@@ -21,24 +21,3 @@ fibo(N, F) :-
N >= 2, N1 is N - 1, N2 is N - 2,
fibo(N1, F1), fibo(N2, F2), F is F1 + F2,
assert(fibo(N,F):-!). % assert as first clause</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>Null-ary predicates are not highlighted</h3>
-<pre><code>halt.
-trace.
-
-:- if(test1).
-section_1.
-:- elif(test2).
-section_2.
-:- elif(test3).
-section_3.
-:- else.
-section_else.
-:- endif.</code></pre>
diff --git a/examples/prism-protobuf.html b/examples/prism-protobuf.html
new file mode 100644
index 0000000..7174552
--- /dev/null
+++ b/examples/prism-protobuf.html
@@ -0,0 +1,25 @@
+<h2>Full example</h2>
+<pre><code>syntax = "proto3";
+
+package foo.generated;
+option java_package = "org.foo.generated";
+option optimize_for = SPEED;
+
+// What's up with all the foo?
+message Foo {
+
+ message Bar {
+
+ optional string key = 1;
+ optional Foo value = 2;
+ optional string value_raw = 3 [deprecated=true];
+ }
+
+ enum Level {
+ INFO = 0;
+ WARN = 1;
+ ERROR = 2;
+ }
+
+ repeated Property property = 1;
+}</code></pre>
diff --git a/examples/prism-pug.html b/examples/prism-pug.html
index d37de5c..ee46c8b 100644
--- a/examples/prism-pug.html
+++ b/examples/prism-pug.html
@@ -52,7 +52,7 @@ script(type="text/javascript").
alert('foo');
alert('bar');
- var classes = ['foo', 'bar', 'baz']
-- for (var x = 0; x < 3; x++)
+- for (var x = 0; x < 3; x++)
li item
</code></pre>
diff --git a/examples/prism-puppet.html b/examples/prism-puppet.html
index 4892ab8..ff73e81 100644
--- a/examples/prism-puppet.html
+++ b/examples/prism-puppet.html
@@ -30,7 +30,7 @@ $foo::bar::baz</code></pre>
<h2>Functions</h2>
<pre><code>require apache
template('apache/vhost-default.conf.erb')
-[1,20,3].filter |$value| { $value < 10 }</code></pre>
+[1,20,3].filter |$value| { $value < 10 }</code></pre>
<h2>All-in-one example</h2>
<pre><code>file {'ntp.conf':
@@ -114,10 +114,10 @@ $rootgroup = $osfamily ? {
default => 'root',
}
-User <| groups == 'admin' |>
-Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>>
+User <| groups == 'admin' |>
+Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>>
-Exec <| title == 'update_migrations' |> {
+Exec <| title == 'update_migrations' |> {
environment => 'RUBYLIB=/usr/lib/ruby/site_ruby/1.8/',
}
@@ -137,16 +137,3 @@ Exec <| title == 'update_migrations' |> {
target => '/etc/nagios3/conf.d/nagios_service.cfg',
notify => Service[$nagios::params::nagios_service],
}</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>More than one level of nested braces inside interpolation</h3>
-<pre><code>"Foobar ${foo({
- bar => {baz => 42}
- baz => 42
-})} <- broken"</code></pre>
\ No newline at end of file
diff --git a/examples/prism-pure.html b/examples/prism-pure.html
index d7a0129..9bcac74 100644
--- a/examples/prism-pure.html
+++ b/examples/prism-pure.html
@@ -24,7 +24,7 @@ nan</code></pre>
<p>Inline code requires the desired language to be loaded.
On this page, check C, C++ and Fortran <strong>before</strong> checking Pure should make
the examples below work properly.</p>
-<pre><code>%<
+<pre><code>%<
int mygcd(int x, int y)
{
if (y == 0)
@@ -34,7 +34,7 @@ int mygcd(int x, int y)
}
%>
-%< -*- Fortran90 -*-
+%< -*- Fortran90 -*-
function fact(n) result(p)
integer n, p
p = 1
@@ -44,7 +44,7 @@ function fact(n) result(p)
end function fact
%>
-%< -*- C++ -*-
+%< -*- C++ -*-
#include <pure/runtime.h>
#include <string>
@@ -112,4 +112,4 @@ extern "C" void map_destroy(exprmap *m)
safe (i,j) p = ~any (check (i,j)) p;
check (i1,j1) (i2,j2)
= i1==i2 || j1==j2 || i1+j1==i2+j2 || i1-j1==i2-j2;
-end;</code></pre>
\ No newline at end of file
+end;</code></pre>
diff --git a/examples/prism-python.html b/examples/prism-python.html
index ce6efc0..3a63e8b 100644
--- a/examples/prism-python.html
+++ b/examples/prism-python.html
@@ -49,13 +49,3 @@ are supported.'''</code></pre>
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>Interpolation expressions containing strings with <code>{</code> or <code>}</code></h3>
-<pre><code>f"{'}'}"</code></pre>
diff --git a/examples/prism-q.html b/examples/prism-q.html
index 58d674f..9d7d5c6 100644
--- a/examples/prism-q.html
+++ b/examples/prism-q.html
@@ -100,13 +100,3 @@ adjust:{[t;caTypes]
getCAs exec distinct caType from ca
adjust[t;`dividend] / adjust trades for dividends only</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>The global context is highlighted as a verb</h3>
-<pre><code>\d .</code></pre>
\ No newline at end of file
diff --git a/examples/prism-rest.html b/examples/prism-rest.html
index 511e87c..a7288a3 100644
--- a/examples/prism-rest.html
+++ b/examples/prism-rest.html
@@ -308,22 +308,3 @@ floating-point numbers (without exponents).
See the `Python home page <http://www.python.org>`_ for info.
Oh yes, the _`Norwegian Blue`. What's, um, what's wrong with it?</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>Nothing is highlighted inside table cells</h3>
-<pre><code>+---------------+----------+
-| column 1 | column 2 |
-+--------------+-----------+
-| **bold**? | *italic*? |
-+--------------+-----------+</code></pre>
-
-<h3>The inline markup recognition rules are not as strict as they are in the spec</h3>
-<p>No inline markup should be highlighted in the following code.</p>
-<pre><code>2 * x a ** b (* BOM32_* ` `` _ __ |
-"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›</code></pre>
\ No newline at end of file
diff --git a/examples/prism-rust.html b/examples/prism-rust.html
index d447968..3f56a91 100644
--- a/examples/prism-rust.html
+++ b/examples/prism-rust.html
@@ -50,19 +50,3 @@ let y = c || d;
let add_one = |x: int| -> int { 1i + x };
let printer = || { println!("x is: {}", x); };
</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>Nested block comments</h3>
-<pre><code>/* Nested block
- /* comments
- are */
-not supported */</code></pre>
-
-<h3>Delimiters of parameters for closures that don't use braces</h3>
-<pre><code>|x| x + 1i;</code></pre>
\ No newline at end of file
diff --git a/examples/prism-sas.html b/examples/prism-sas.html
index 8932ebb..546404b 100644
--- a/examples/prism-sas.html
+++ b/examples/prism-sas.html
@@ -23,7 +23,7 @@ multi-line comment */
<pre><code>A**B;
'foo'||'bar'!!'baz'¦¦'test';
A<>B><C;
-A~=B¬=C^=D>=E<=F;
+A~=B¬=C^=D>=E<=F;
a*b/c+d-e<f>g&h|i!j¦k;
~a;¬b;^c;
(a eq b) ne (c gt d) lt e ge f le h;
@@ -155,4 +155,4 @@ UYN7 rod 211 09sep2010 11.55
JD03 switch 383 09jan2013 13.99
BV1E timer 26 03aug2013 34.50
;
-run;</code></pre>
\ No newline at end of file
+run;</code></pre>
diff --git a/examples/prism-sass.html b/examples/prism-sass.html
index 7200e78..a2f0673 100644
--- a/examples/prism-sass.html
+++ b/examples/prism-sass.html
@@ -26,22 +26,3 @@ h1
#main
width: $width
</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>Deprecated Sass syntax is not supported</h3>
-<pre><code>.page
- color = 5px + 9px
-
-!width = 13px
-.icon
- width = !width</code></pre>
-
-<h3>Selectors with pseudo classes are highlighted as property/value pairs</h3>
-<pre><code>a:hover
- text-decoration: underline</code></pre>
\ No newline at end of file
diff --git a/examples/prism-scala.html b/examples/prism-scala.html
index 1dc56f8..b9ed1f1 100644
--- a/examples/prism-scala.html
+++ b/examples/prism-scala.html
@@ -85,16 +85,3 @@ object lazyEvaluation {
println("sl2 = " + sl2)
}
}</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>Nested block comments</h3>
-<pre><code>/* Nested block
- /* comments
- are */
-not supported */</code></pre>
\ No newline at end of file
diff --git a/examples/prism-smarty.html b/examples/prism-smarty.html
index 5e57922..650e6fc 100644
--- a/examples/prism-smarty.html
+++ b/examples/prism-smarty.html
@@ -69,13 +69,3 @@ comment *}</code></pre>
}
{/literal}
</style></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>Smarty tag in the middle of an HTML tag</h3>
-<pre><code><div{if $test} class="test"{/if}></div></code></pre>
\ No newline at end of file
diff --git a/examples/prism-splunk-spl.html b/examples/prism-splunk-spl.html
new file mode 100644
index 0000000..8675476
--- /dev/null
+++ b/examples/prism-splunk-spl.html
@@ -0,0 +1,7 @@
+<h2>Full example</h2>
+<pre><code>source=monthly_data.csv
+| rename remote_ip AS ip
+| eval isLocal=if(cidrmatch("123.132.32.0/25",ip), "local", "not local")
+| eval error=case(status == 200, "OK", status == 404, "Not found", true(), "Other")
+ `comment("TODO: Add support for more status codes")`
+| sort amount</code></pre>
diff --git a/examples/prism-swift.html b/examples/prism-swift.html
index 98d6eb5..e49a0d4 100644
--- a/examples/prism-swift.html
+++ b/examples/prism-swift.html
@@ -29,12 +29,12 @@ let multiplier = 3
for _ in 1...power {
answer *= base
}
-while square < finalSquare {
+while square < finalSquare {
// roll the dice
if ++diceRoll == 7 { diceRoll = 1 }
// move by the rolled amount
square += diceRoll
- if square < board.count {
+ if square < board.count {
// if we're still on the board, move up or down for a snake or a ladder
square += board[square]
}
@@ -52,29 +52,16 @@ switch someCharacter {
<h2>Classes and attributes</h2>
<pre><code>class MyViewController: UIViewController {
- @IBOutlet weak var button: UIButton!
- @IBOutlet var textFields: [UITextField]!
- @IBAction func buttonTapped(AnyObject) {
- println("button tapped!")
+ @IBOutlet weak var button: UIButton!
+ @IBOutlet var textFields: [UITextField]!
+ @IBAction func buttonTapped(AnyObject) {
+ println("button tapped!")
}
}
@IBDesignable
class MyCustomView: UIView {
- @IBInspectable var textColor: UIColor
- @IBInspectable var iconHeight: CGFloat
- /* ... */
+ @IBInspectable var textColor: UIColor
+ @IBInspectable var iconHeight: CGFloat
+ /* ... */
}</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>Nested block comments</h3>
-<pre><code>/* Nested block
- /* comments
- are */
-not supported */</code></pre>
\ No newline at end of file
diff --git a/examples/prism-textile.html b/examples/prism-textile.html
index 4ff4d12..f195e96 100644
--- a/examples/prism-textile.html
+++ b/examples/prism-textile.html
@@ -156,23 +156,3 @@ table{border:1px solid black}.
|This|is|a|row|
{background:#ddd}. |This|is|grey|row|</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>Nested styles are only partially supported</h3>
-
-<p>Only one level of nesting is supported.</p>
-
-<pre><code>*A bold paragraph %containing a span with broken _italic_ inside%!*</code></pre>
-
-<h3>HTML inside Textile is not supported</h3>
-
-<p>But Textile inside HTML should be just fine.</p>
-
-<pre><code><strong>This _should_ work properly.</strong>
-*But this is <em>definitely</em> broken.*</code></pre>
\ No newline at end of file
diff --git a/examples/prism-twig.html b/examples/prism-twig.html
index 0a70781..167ffad 100644
--- a/examples/prism-twig.html
+++ b/examples/prism-twig.html
@@ -23,13 +23,3 @@ inside #}</code></pre>
{% 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
diff --git a/examples/prism-vbnet.html b/examples/prism-vbnet.html
index bc2a376..b5e3081 100644
--- a/examples/prism-vbnet.html
+++ b/examples/prism-vbnet.html
@@ -7,10 +7,10 @@ REM foobar
<pre><code>Public Function findValue(ByVal arr() As Double,
ByVal searchValue As Double) As Double
Dim i As Integer = 0
- While i <= UBound(arr) AndAlso arr(i) <> searchValue
+ While i <= UBound(arr) AndAlso arr(i) <> searchValue
' If i is greater than UBound(arr), searchValue is not checked.
i += 1
End While
If i > UBound(arr) Then i = -1
Return i
-End Function</code></pre>
\ No newline at end of file
+End Function</code></pre>
diff --git a/examples/prism-vhdl.html b/examples/prism-vhdl.html
index b495085..0d3b56f 100644
--- a/examples/prism-vhdl.html
+++ b/examples/prism-vhdl.html
@@ -5,8 +5,8 @@ I am not</code></pre>
<h2>Literals</h2>
<pre><code>constant FREEZE : integer := 32;
constant TEMP : real := 32.0;
-A_INT <= 16#FF#;
-B_INT <= 2#1010_1010#;
+A_INT <= 16#FF#;
+B_INT <= 2#1010_1010#;
MONEY := 1_000_000.0;
FACTOR := 2.2E-6;
constant DEL1 :time := 10 ns;
@@ -17,9 +17,9 @@ signal CLK : MY_LOGIC := '0';
signal STATE : T_STATE := IDLE;
constant FLAG :bit_vector(0 to 7) := "11111111";
constant MSG : string := "Hello";
-BIT_8_BUS <= B"1111_1111";
-BIT_9_BUS <= O"353";
-BIT_16_BUS <= X"AA55";
+BIT_8_BUS <= B"1111_1111";
+BIT_9_BUS <= O"353";
+BIT_16_BUS <= X"AA55";
constant TWO_LINE_MSG : string := "Hello" & CR & "World";</code></pre>
<h2>Full example</h2>
@@ -37,8 +37,8 @@ end entity fadd;
architecture circuits of fadd is -- full adder stage, body
begin -- circuits of fadd
- s <= a xor b xor cin after 1 ns;
- cout <= (a and b) or (a and cin) or (b and cin) after 1 ns;
+ s <= a xor b xor cin after 1 ns;
+ cout <= (a and b) or (a and cin) or (b and cin) after 1 ns;
end architecture circuits; -- of fadd
library IEEE;
diff --git a/examples/prism-wiki.html b/examples/prism-wiki.html
index 295eb3f..99dbd0c 100644
--- a/examples/prism-wiki.html
+++ b/examples/prism-wiki.html
@@ -143,23 +143,3 @@ dolor sit amet.
|
|15.00
|}</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>Nested magic words are not supported</h3>
-
-<pre><code>{{#switch:{{PAGENAME}}
-| L'Aquila = No translation
-| L = Not OK
-| L'Aquila = Entity escaping
-| L'Aquila = Numeric char encoding
-}}</code></pre>
-
-<h3>Nesting of bold and italic is not supported</h3>
-<pre><code>''Italic with '''bold''' inside''</code></pre>
-
diff --git a/examples/prism-xojo.html b/examples/prism-xojo.html
index 3548074..5dd8fc8 100644
--- a/examples/prism-xojo.html
+++ b/examples/prism-xojo.html
@@ -21,8 +21,8 @@ Rem This is a remark</code></pre>
<pre><code>Dim g As Graphics
Dim yOffSet As Integer
g = OpenPrinterDialog()
-If g <> Nil Then
- If MainDishMenu.ListIndex <> -1 Then
+If g <> Nil Then
+ If MainDishMenu.ListIndex <> -1 Then
g.Bold = True
g.DrawString("Main Dish:",20,20)
g.Bold = False
diff --git a/examples/prism-yaml.html b/examples/prism-yaml.html
index bea52f8..58b78f6 100644
--- a/examples/prism-yaml.html
+++ b/examples/prism-yaml.html
@@ -89,7 +89,7 @@ bill-to: &id001
state : MI
postal : 48046
ship-to:
- <<: *id001
+ <<: *id001
product:
- sku : BL394D
quantity : 4
diff --git a/extending.html b/extending.html
index 1051a31..dfc3f1a 100644
--- a/extending.html
+++ b/extending.html
@@ -133,16 +133,22 @@ ol.indent {
<section id="creating-a-new-language-definition" class="language-none">
<h1>Creating a new language definition</h1>
+ <p>This section will explain the usual workflow of creating a new language definition.</p>
+
+ <p>As an example, we will create the language definition of the fictional <em>Foo's Binary, Artistic Robots™</em> language or just Foo Bar for short.</p>
+
<ol class="indent">
<li>
- <p>Create a new file <code>components/prism-lang-id.js</code>.</p>
+ <p>Create a new file <code>components/prism-foo-bar.js</code>.</p>
+
+ <p>In this example, we choose <code>foo-bar</code> as the id of the new language. The language id has to be unique and should work well with the <code>language-xxxx</code> CSS class name Prism uses to refer to language definitions. Your language id should ideally match the regular expression <code>/^[a-z][a-z\d]*(?:-[a-z][a-z\d]*)*$/</code>.</p>
</li>
<li>
<p>Edit <code>components.json</code> to register the new language by adding it to the <code>languages</code> object. (Please note that all language entries are sorted alphabetically by title.) <br>
- Your new entry will look like this:</p>
+ Our new entry for this example will look like this:</p>
- <pre><code class="language-js">"lang-id": {
- "title": "Language Title",
+ <pre><code class="language-js">"foo-bar": {
+ "title": "Foo Bar",
"owner": "Your GitHub name"
}</code></pre>
@@ -153,9 +159,9 @@ ol.indent {
<li>
<p>Rebuild Prism by running <code class="language-bash">npx gulp</code>.</p>
- <p>This will make your language available to the <a href="test.html">test page</a>, or more precise: your local version of it. You can open you local <code>test.html</code> page in any browser, select your language, and see how your language definition highlights the given code.</p>
+ <p>This will make your language available to the <a href="test.html">test page</a>, or more precise: your local version of it. You can open your local <code>test.html</code> page in any browser, select your language, and see how your language definition highlights any code you input.</p>
- <p><em>Note:</em> You have to reload the page to apply changes made to <code>prism-lang-id.js</code>.</p>
+ <p><em>Note:</em> You have to reload the test page to apply changes made to <code>prism-foo-bar.js</code>.</p>
</li>
<li>
<p>Write the language definition.</p>
@@ -163,12 +169,48 @@ ol.indent {
<p>The <a href="#language-definitions">above section</a> already explains the makeup of language definitions.</p>
</li>
<li>
+ <p>Adding aliases.</p>
+
+ <p>Aliases for are useful if your language is known under more than just one name or there are very common abbreviations for your language (e.g. JS for JavaScript). Keep in mind that aliases are very similar to language ids in that they also have to be unique (i.e. there cannot be an alias which is the same as another alias of language id) and work as CSS class names.</p>
+
+ <p>In this example, we will register the alias <code>foo</code> for <code>foo-bar</code> because Foo Bar code is stored in <code>.foo</code> files.</p>
+
+ <p>To add the alias, we add this line at the end of <code>prism-foo-bar.js</code>:</p>
+
+ <pre><code class="language-js">Prism.languages.foo = Prism.language['foo-bar'];</code></pre>
+
+ <p>Aliases also have to be registered in <code>components.json</code> by adding the <code>alias</code> property to the language entry. In this example, the updated entry will look like this:</p>
+
+ <pre><code class="language-js">"foo-bar": {
+ "title": "Foo Bar",
+ "alias": "foo",
+ "owner": "Your GitHub name"
+}</code></pre>
+
+ <p><em>Note:</em> <code>alias</code> can also be a string array if you need to register multiple aliases.</p>
+
+ <p>Using <code>aliasTitles</code>, it's also possible to give aliases specific titles. In this example, this won't be necessary but a good example as to where this is useful is the markup language:</p>
+
+ <pre><code class="language-js">"markup": {
+ "title": "Markup",
+ "alias": ["html", "xml", "svg", "mathml"],
+ "aliasTitles": {
+ "html": "HTML",
+ "xml": "XML",
+ "svg": "SVG",
+ "mathml": "MathML"
+ },
+ "option": "default"
+}</code></pre>
+ </li>
+ <li>
<p>Add some tests.</p>
- <p>Create a folder <code>tests/languages/lang-id/</code>. This is where your test files will live. The test format and how to run tests is described <a href="test-suite.html">here</a>. A good example are <a href="https://github.com/PrismJS/prism/tree/master/tests/languages/javascript">the tests of the JavaScript language</a>.</p>
+ <p>Create a folder <code>tests/languages/foo-bar/</code>. This is where your test files will live. The test format and how to run tests is described <a href="test-suite.html">here</a>.</p>
+
+ <p>You should add a test for every major feature of your language. Test files should test the common case and certain edge cases (if any). Good examples are <a href="https://github.com/PrismJS/prism/tree/master/tests/languages/javascript">the tests of the JavaScript language</a>.</p>
- <p>You should add a test for every major feature of your language. Test files should test the common case and certain edge cases (if any). <br>
- You can use this template for new <code>.test</code> files:</p>
+ <p>You can use this template for new <code>.test</code> files:</p>
<pre><code>The code to test.
@@ -192,13 +234,13 @@ Brief description.</code></pre>
</li>
<li>
<p>Once you <strong>carefully checked</strong> that the test case is handled correctly (i.e. by using the test page), run the following command:</p>
- <code class="language-bash">npm run test:languages -- --language=lang-id --pretty</code>
+ <code class="language-bash">npm run test:languages -- --language=foo-bar --pretty</code>
<p>This command will check only your test files. The new test will fail because the specified JSON is incorrect but the error message of the failed test will also include the JSON of the simplified token stream Prism created. This is what we're after. Replace the current incorrect JSON with the output labeled <em>Token Stream</em>. (Please also adjust the indentation. We use tabs.)</p>
</li>
<li>
<p><strong>Carefully check</strong> that the token stream JSON you just inserted is what you expect.</p>
</li>
- <li>Re-run <code class="language-bash">npm run test:languages -- --language=lang-id --pretty</code> to verify that the test passes.</li>
+ <li>Re-run <code class="language-bash">npm run test:languages -- --language=foo-bar --pretty</code> to verify that the test passes.</li>
</ol>
</li>
<li>
@@ -208,7 +250,7 @@ Brief description.</code></pre>
<li>
<p>Add an example page.</p>
- <p>Create a new file <code>examples/prism-lang-id.html</code>. This will be the template containing the example markup. Just look at other examples to see how these files are structured. <br>
+ <p>Create a new file <code>examples/prism-foo-bar.html</code>. This will be the template containing the example markup. Just look at other examples to see how these files are structured. <br>
We don't have any rules as to what counts as an example, so a single <em>Full example</em> section where you present the highlighting of the major features of the language is enough.</p>
</li>
<li>
diff --git a/gulpfile.js b/gulpfile.js
deleted file mode 100644
index 0c6f8a2..0000000
--- a/gulpfile.js
+++ /dev/null
@@ -1,269 +0,0 @@
-const { src, dest, series, parallel, watch } = require('gulp');
-
-const rename = require('gulp-rename');
-const uglify = require('gulp-uglify');
-const header = require('gulp-header');
-const concat = require('gulp-concat');
-const replace = require('gulp-replace');
-const pump = require('pump');
-const fs = require('fs');
-const simpleGit = require('simple-git');
-const shelljs = require('shelljs');
-
-const paths = {
- componentsFile: 'components.json',
- componentsFileJS: 'components.js',
- components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'],
- main: [
- 'components/prism-core.js',
- 'components/prism-markup.js',
- 'components/prism-css.js',
- 'components/prism-clike.js',
- 'components/prism-javascript.js',
- 'plugins/file-highlight/prism-file-highlight.js'
- ],
- plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'],
- showLanguagePlugin: 'plugins/show-language/prism-show-language.js',
- autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js',
- changelog: 'CHANGELOG.md'
-};
-
-const componentsPromise = new Promise((resolve, reject) => {
- fs.readFile(paths.componentsFile, {
- encoding: 'utf-8'
- }, (err, data) => {
- if (!err) {
- resolve(JSON.parse(data));
- } else {
- reject(err);
- }
- });
-});
-
-function inlineRegexSource() {
- return replace(
- /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g,
- (m, source) => {
- // escape backslashes
- source = source.replace(/\\/g, '\\\\');
- // escape single quotes
- source = source.replace(/'/g, "\\'");
- // unescape characters like \\n and \\t to \n and \t
- source = source.replace(/(^|[^\\])\\\\([nrt0])/g, '$1\\$2');
- // wrap source in single quotes
- return "'" + source + "'";
- }
- );
-}
-
-function minifyJS() {
- return [
- inlineRegexSource(),
- uglify()
- ];
-}
-
-
-function minifyComponents(cb) {
- pump([src(paths.components), ...minifyJS(), rename({ suffix: '.min' }), dest('components')], cb);
-}
-function minifyPlugins(cb) {
- pump([src(paths.plugins), ...minifyJS(), rename({ suffix: '.min' }), dest('plugins')], cb);
-}
-function build(cb) {
- pump([src(paths.main), header(`
-/* **********************************************
- Begin <%= file.relative %>
-********************************************** */
-
-`), concat('prism.js'), dest('./')], cb);
-}
-
-function componentsJsonToJs(cb) {
- componentsPromise.then(data => {
- const js = `var components = ${JSON.stringify(data)};
-if (typeof module !== 'undefined' && module.exports) { module.exports = components; }`;
- fs.writeFile(paths.componentsFileJS, js, cb);
- });
-}
-
-function watchComponentsAndPlugins() {
- watch(paths.components, parallel(minifyComponents, build));
- watch(paths.plugins, parallel(minifyPlugins, build));
-}
-
-function languagePlugins(cb) {
- componentsPromise.then(data => {
- const languagesMap = {};
- const dependenciesMap = {};
- const aliasMap = {};
-
- /**
- * Tries to guess the name of a language given its id.
- *
- * From `prism-show-language.js`.
- *
- * @param {string} id The language id.
- * @returns {string}
- */
- function guessTitle(id) {
- if (!id) {
- return id;
- }
- return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S');
- }
-
- function addLanguageTitle(key, title) {
- if (!languagesMap[key] && guessTitle(key) !== title) {
- languagesMap[key] = title;
- }
- }
-
- for (const id in data.languages) {
- if (id !== 'meta') {
- const language = data.languages[id];
- const title = language.displayTitle || language.title;
-
- addLanguageTitle(id, title);
-
- for (const name in language.aliasTitles) {
- addLanguageTitle(name, language.aliasTitles[name]);
- }
-
- if (language.alias) {
- if (typeof language.alias === 'string') {
- aliasMap[language.alias] = id;
- addLanguageTitle(language.alias, title);
- } else {
- language.alias.forEach(function (alias) {
- aliasMap[alias] = id;
- addLanguageTitle(alias, title);
- });
- }
- }
-
- if (language.require) {
- dependenciesMap[id] = language.require;
- }
- }
- }
-
- function formattedStringify(json) {
- return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t');
- }
-
- const jsonLanguagesMap = formattedStringify(languagesMap);
- const jsonDependenciesMap = formattedStringify(dependenciesMap);
- const jsonAliasMap = formattedStringify(aliasMap);
-
- const tasks = [
- {
- plugin: paths.showLanguagePlugin,
- maps: { languages: jsonLanguagesMap}
- },
- {
- plugin: paths.autoloaderPlugin,
- maps: { aliases: jsonAliasMap, dependencies: jsonDependenciesMap }
- }
- ];
-
- let cpt = 0;
- const l = tasks.length;
- const done = () => {
- cpt++;
- if (cpt === l) {
- cb && cb();
- }
- };
-
- for (const task of tasks) {
- const stream = src(task.plugin)
- .pipe(replace(
- /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g,
- (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/`
- ))
- .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/'))));
-
- stream.on('error', done);
- stream.on('end', done);
- }
- });
-}
-
-const ISSUE_RE = /#(\d+)(?![\d\]])/g;
-const ISSUE_SUB = '[#$1](https://github.com/PrismJS/prism/issues/$1)';
-
-function linkify(cb) {
- return pump([
- src(paths.changelog),
- replace(ISSUE_RE, ISSUE_SUB),
- replace(
- /\[[\da-f]+(?:, *[\da-f]+)*\]/g,
- m => m.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)')
- ),
- dest('.')
- ], cb);
-}
-
-const COMMIT_RE = /^([\da-z]{8})\s(.*)/;
-
-function changes(cb) {
- const tag = shelljs.exec('git describe --abbrev=0 --tags', { silent: true }).stdout;
- const commits = shelljs
- .exec(
- `git log ${tag.trim()}..HEAD --oneline`,
- { silent: true }
- )
- .stdout.split('\n')
- .map(line => line.trim())
- .filter(line => line !== '')
- .map(line => {
- const [,hash, msg] = COMMIT_RE.exec(line);
- return `* ${msg.replace(ISSUE_RE, ISSUE_SUB)} [\`${hash}\`](https://github.com/PrismJS/prism/commit/${hash})`
- })
- .join('\n');
-
- const changes = `## Unreleased
-
-${commits}
-
-### New components
-
-### Updated components
-
-### Updated plugins
-
-### Updated themes
-
-### Other changes
-
-* __Website__`;
-
- console.log(changes);
- cb();
-}
-
-const components = minifyComponents;
-const plugins = series(languagePlugins, minifyPlugins);
-
-function gitChanges(cb) {
- const git = simpleGit(__dirname);
-
- git.status((err, res) => {
- if (err) {
- cb(new Error(`Something went wrong!\n${err}`));
- } else if (res.files.length > 0) {
- console.log(res);
- cb(new Error('There are changes in the file system. Did you forget to run gulp?'));
- } else {
- cb();
- }
- });
-}
-
-
-exports.watch = watchComponentsAndPlugins;
-exports.default = parallel(components, plugins, componentsJsonToJs, build);
-exports.premerge = gitChanges;
-exports.linkify = linkify;
-exports.changes = changes;
diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js
new file mode 100644
index 0000000..1fb9fe1
--- /dev/null
+++ b/gulpfile.js/changelog.js
@@ -0,0 +1,381 @@
+"use strict";
+
+const { src, dest } = require('gulp');
+
+const replace = require('gulp-replace');
+const pump = require('pump');
+const git = require('simple-git/promise')(__dirname);
+
+const { changelog } = require('./paths');
+
+
+const ISSUE_RE = /#(\d+)(?![\d\]])/g;
+const ISSUE_SUB = '[#$1](https://github.com/PrismJS/prism/issues/$1)';
+
+function linkify(cb) {
+ return pump([
+ src(changelog),
+ replace(ISSUE_RE, ISSUE_SUB),
+ replace(
+ /\[[\da-f]+(?:, *[\da-f]+)*\]/g,
+ m => m.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)')
+ ),
+ dest('.')
+ ], cb);
+}
+
+/**
+ * Creates an array which iterates its items in the order given by `compareFn`.
+ *
+ * The array may not be sorted at all times.
+ *
+ * @param {(a: T, b: T) => number} compareFn
+ * @returns {T[]}
+ * @template T
+ */
+function createSortedArray(compareFn) {
+ /** @type {T[]} */
+ const a = [];
+
+ a['sort'] = function () {
+ return Array.prototype.sort.call(this, compareFn);
+ };
+ a[Symbol.iterator] = function () {
+ return this.slice().sort(compareFn)[Symbol.iterator]();
+ };
+
+ return a;
+}
+
+/**
+ * Parses the given log line and adds the list of the changed files to the output.
+ *
+ * @param {string} line A one-liner log line consisting of the commit hash and the commit message.
+ * @returns {Promise<CommitInfo>}
+ *
+ * @typedef {{ message: string, hash: string, changes: CommitChange[] }} CommitInfo
+ * @typedef {{ file: string, mode: ChangeMode }} CommitChange
+ * @typedef {"A" | "C" | "D" | "M" | "R" | "T" | "U" | "X" | "B"} ChangeMode
+ */
+async function getCommitInfo(line) {
+ const [, hash, message] = /^([a-f\d]+)\s+(.*)$/i.exec(line);
+
+ /* The output looks like this:
+ *
+ * M components.js
+ * M components.json
+ *
+ * or nothing for e.g. reverts.
+ */
+ const output = await git.raw(['diff-tree', '--no-commit-id', '--name-status', '-r', hash]);
+
+ const changes = !output ? [] : output.trim().split(/\n/g).map(line => {
+ const [, mode, file] = /(\w)\s+(.+)/.exec(line);
+ return { mode: /** @type {ChangeMode} */ (mode), file };
+ });
+
+ return { hash, message, changes };
+}
+
+/**
+ * Parses the output of `git log` with the given revision range.
+ *
+ * @param {string | Promise<string>} range The revision range in which the log will be parsed.
+ * @returns {Promise<CommitInfo[]>}
+ */
+async function getLog(range) {
+ /* The output looks like this:
+ *
+ * bfbe4464 Invoke `callback` after `after-highlight` hook (#1588)
+ * b41fb8f1 Fixes regex for JS examples (#1591)
+ */
+ const output = await git.raw(['log', await Promise.resolve(range), '--oneline']);
+
+ if (output) {
+ const commits = output.trim().split(/\n/g);
+ return Promise.all(commits.map(getCommitInfo));
+ } else {
+ return [];
+ }
+}
+
+const revisionRanges = {
+ nextRelease: git.raw(['describe', '--abbrev=0', '--tags']).then(res => `${res.trim()}..HEAD`)
+};
+const strCompare = (a, b) => a.localeCompare(b, 'en');
+
+async function changes() {
+ const { languages, plugins } = require('../components');
+
+ const infos = await getLog(revisionRanges.nextRelease);
+
+ const entries = {
+ 'TODO:': {},
+ 'New components': {
+ ['']: createSortedArray(strCompare)
+ },
+ 'Updated components': {},
+ 'Updated plugins': {},
+ 'Updated themes': {},
+ 'Other': {},
+ };
+ /**
+ *
+ * @param {string} category
+ * @param {string | { message: string, hash: string }} info
+ */
+ function addEntry(category, info) {
+ const path = category.split(/\s*>>\s*/g);
+ if (path[path.length - 1] !== '') {
+ path.push('');
+ }
+
+ let current = entries;
+ for (const key of path) {
+ if (key) {
+ current = current[key] = current[key] || {};
+ } else {
+ (current[key] = current[key] || []).push(info);
+ }
+ }
+ }
+
+
+ /** @param {CommitChange} change */
+ function notGenerated(change) {
+ return !change.file.endsWith('.min.js') && ['prism.js', 'components.js', 'package-lock.json'].indexOf(change.file) === -1;
+ }
+ /** @param {CommitChange} change */
+ function notPartlyGenerated(change) {
+ return change.file !== 'plugins/autoloader/prism-autoloader.js' &&
+ change.file !== 'plugins/show-language/prism-show-language.js';
+ }
+ /** @param {CommitChange} change */
+ function notTests(change) {
+ return !/^tests\//.test(change.file);
+ }
+ /** @param {CommitChange} change */
+ function notExamples(change) {
+ return !/^examples\//.test(change.file);
+ }
+ /** @param {CommitChange} change */
+ function notFailures(change) {
+ return !/^known-failures.html$/.test(change.file);
+ }
+ /** @param {CommitChange} change */
+ function notComponentsJSON(change) {
+ return change.file !== 'components.json';
+ }
+
+ /**
+ * @param {((e: T, index: number) => boolean)[]} filters
+ * @returns {(e: T, index: number) => boolean}
+ * @template T
+ */
+ function and(...filters) {
+ return (e, index) => {
+ for (let i = 0, l = filters.length; i < l; i++) {
+ if (!filters[i](e, index)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * Some commit message have the format `component changed: actual message`.
+ * This function can be used to remove this prefix.
+ *
+ * @param {string} prefix
+ * @param {CommitInfo} info
+ * @returns {{ message: string, hash: string }}
+ */
+ function removeMessagePrefix(prefix, info) {
+ const source = String.raw`^${prefix.replace(/([^-\w\s])/g, '\\$1').replace(/[-\s]/g, '[-\\s]')}:\s*`;
+ const patter = RegExp(source, 'i');
+ return {
+ message: info.message.replace(patter, ''),
+ hash: info.hash
+ };
+ }
+
+
+ /**
+ * @type {((info: CommitInfo) => boolean)[]}
+ */
+ const commitSorters = [
+
+ function rebuild(info) {
+ if (info.changes.length > 0 && info.changes.filter(notGenerated).length === 0) {
+ console.log('Rebuild found: ' + info.message);
+ return true;
+ }
+ },
+
+ function addedComponent(info) {
+ let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, notFailures));
+
+ // `components.json` has to be modified
+ if (relevantChanges.some(c => c.file === 'components.json')) {
+ relevantChanges = relevantChanges.filter(and(notComponentsJSON, notPartlyGenerated));
+
+ // now, only the newly added JS should be left
+ if (relevantChanges.length === 1) {
+ const change = relevantChanges[0];
+ if (change.mode === 'A' && change.file.startsWith('components/prism-')) {
+ const lang = change.file.match(/prism-([\w-]+)\.js$/)[1];
+ const titles = [languages[lang].title];
+ if (languages[lang].aliasTitles) {
+ titles.push(...Object.values(languages[lang].aliasTitles));
+ }
+ addEntry('New components', `__${titles.join('__ & __')}__: ${infoToString(info)}`);
+ return true;
+ }
+ }
+ }
+ },
+
+ function changedComponentOrCore(info) {
+ let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, notFailures));
+
+ // if `components.json` changed, then autoloader and show-language also change
+ if (relevantChanges.some(c => c.file === 'components.json')) {
+ relevantChanges = relevantChanges.filter(and(notComponentsJSON, notPartlyGenerated));
+ }
+
+ if (relevantChanges.length === 1) {
+ const change = relevantChanges[0];
+ if (change.mode === 'M' && change.file.startsWith('components/prism-')) {
+ const lang = change.file.match(/prism-([\w-]+)\.js$/)[1];
+ if (lang === 'core') {
+ addEntry('Other >> Core', removeMessagePrefix('Core', info));
+ } else {
+ const title = languages[lang].title;
+ addEntry('Updated components >> ' + title, removeMessagePrefix(title, info));
+ }
+ return true;
+ }
+ }
+ },
+
+ function changedPlugin(info) {
+ let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, c => !/\.(?:html|css)$/.test(c.file)));
+
+ if (relevantChanges.length > 0 &&
+ relevantChanges.every(c => c.mode === 'M' && /^plugins\/.*\.js$/.test(c.file))) {
+
+ if (relevantChanges.length === 1) {
+ const change = relevantChanges[0];
+ const id = change.file.match(/\/prism-([\w-]+)\.js/)[1];
+ const title = plugins[id].title || plugins[id];
+ addEntry('Updated plugins >> ' + title, removeMessagePrefix(title, info));
+ } else {
+ addEntry('Updated plugins', info);
+ }
+ return true;
+ }
+ },
+
+ function changedTheme(info) {
+ if (info.changes.length > 0 && info.changes.every(c => {
+ return /themes\/.*\.css/.test(c.file) && c.mode === 'M';
+ })) {
+ if (info.changes.length === 1) {
+ const change = info.changes[0];
+ let name = (change.file.match(/prism-(\w+)\.css$/) || [, 'Default'])[1];
+ name = name[0].toUpperCase() + name.substr(1);
+ addEntry('Updated themes >> ' + name, removeMessagePrefix(name, info));
+ } else {
+ addEntry('Updated themes', info);
+ }
+ return true;
+ }
+ },
+
+ function changedInfrastructure(info) {
+ if (info.changes.length > 0 && info.changes.every(c => {
+ if (c.file.startsWith('gulpfile.js')) {
+ return true;
+ }
+ if (/^\.[\w.]+$/.test(c.file)) {
+ return true;
+ }
+ return ['CNAME', 'composer.json', 'package.json', 'package-lock.json'].indexOf(c.file) >= 0;
+ })) {
+ addEntry('Other >> Infrastructure', info);
+ return true;
+ }
+ },
+
+ function changedWebsite(info) {
+ if (info.changes.length > 0 && info.changes.every(c => {
+ if (/[\w-]+\.(?:html|svg)$/.test(c.file)) {
+ return true;
+ }
+ if (/^scripts(?:\/[\w-]+)*\/[\w-]+\.js$/.test(c.file)) {
+ return true;
+ }
+ return ['style.css'].indexOf(c.file) >= 0;
+ })) {
+ addEntry('Other >> Website', info);
+ return true;
+ }
+ },
+
+ function otherChanges(info) {
+ // detect changes of the Github setup
+ // This assumes that .md files are related to GitHub
+ if (info.changes.length > 0 && info.changes.every(c => /\.md$/i.test(c.file))) {
+ addEntry('Other', info);
+ return true;
+ }
+ },
+
+ ];
+
+ for (const info of infos) {
+ if (!commitSorters.some(sorter => sorter(info))) {
+ addEntry('TODO:', info);
+ }
+ }
+
+
+ /**
+ * Stringifies the given commit info.
+ *
+ * @param {string | CommitInfo} info
+ * @returns {string}
+ */
+ function infoToString(info) {
+ if (typeof info === 'string') {
+ return info;
+ }
+ return `${info.message} [\`${info.hash}\`](https://github.com/PrismJS/prism/commit/${info.hash})`;
+ }
+ function printCategory(category, indentation = '') {
+ for (const subCategory of Object.keys(category).sort(strCompare)) {
+ if (subCategory) {
+ md += `${indentation}* __${subCategory}__\n`;
+ printCategory(category[subCategory], indentation + ' ')
+ } else {
+ for (const info of category['']) {
+ md += `${indentation}* ${infoToString(info)}\n`;
+ }
+ }
+ }
+ }
+
+ let md = '';
+ for (const category of Object.keys(entries)) {
+ md += `\n### ${category}\n\n`;
+ printCategory(entries[category]);
+ }
+ console.log(md);
+}
+
+
+module.exports = {
+ linkify,
+ changes
+};
diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js
new file mode 100644
index 0000000..14e8a19
--- /dev/null
+++ b/gulpfile.js/index.js
@@ -0,0 +1,197 @@
+"use strict";
+
+const { src, dest, series, parallel, watch } = require('gulp');
+
+const rename = require('gulp-rename');
+const uglify = require('gulp-uglify');
+const header = require('gulp-header');
+const concat = require('gulp-concat');
+const replace = require('gulp-replace');
+const pump = require('pump');
+const util = require('util');
+const fs = require('fs');
+
+const paths = require('./paths');
+const { premerge } = require('./premerge');
+const { changes, linkify } = require('./changelog');
+
+
+const componentsPromise = new Promise((resolve, reject) => {
+ fs.readFile(paths.componentsFile, {
+ encoding: 'utf-8'
+ }, (err, data) => {
+ if (!err) {
+ resolve(JSON.parse(data));
+ } else {
+ reject(err);
+ }
+ });
+});
+
+function inlineRegexSource() {
+ return replace(
+ /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g,
+ (m, source) => {
+ // escape backslashes
+ source = source.replace(/\\/g, '\\\\');
+ // escape single quotes
+ source = source.replace(/'/g, "\\'");
+ // unescape characters like \\n and \\t to \n and \t
+ source = source.replace(/(^|[^\\])\\\\([nrt0])/g, '$1\\$2');
+ // wrap source in single quotes
+ return "'" + source + "'";
+ }
+ );
+}
+
+function minifyJS() {
+ return [
+ inlineRegexSource(),
+ uglify()
+ ];
+}
+
+
+function minifyComponents(cb) {
+ pump([src(paths.components), ...minifyJS(), rename({ suffix: '.min' }), dest('components')], cb);
+}
+function minifyPlugins(cb) {
+ pump([src(paths.plugins), ...minifyJS(), rename({ suffix: '.min' }), dest('plugins')], cb);
+}
+function build(cb) {
+ pump([src(paths.main), header(`
+/* **********************************************
+ Begin <%= file.relative %>
+********************************************** */
+
+`), concat('prism.js'), dest('./')], cb);
+}
+
+async function componentsJsonToJs() {
+ const data = await componentsPromise;
+ const js = `var components = ${JSON.stringify(data)};
+if (typeof module !== 'undefined' && module.exports) { module.exports = components; }`;
+ return util.promisify(fs.writeFile)(paths.componentsFileJS, js);
+}
+
+function watchComponentsAndPlugins() {
+ watch(paths.components, parallel(minifyComponents, build));
+ watch(paths.plugins, parallel(minifyPlugins, build));
+}
+
+async function languagePlugins() {
+ const data = await componentsPromise;
+ const languagesMap = {};
+ const dependenciesMap = {};
+ const aliasMap = {};
+
+ /**
+ * Tries to guess the name of a language given its id.
+ *
+ * From `prism-show-language.js`.
+ *
+ * @param {string} id The language id.
+ * @returns {string}
+ */
+ function guessTitle(id) {
+ if (!id) {
+ return id;
+ }
+ return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S');
+ }
+
+ /**
+ * @param {string} key
+ * @param {string} title
+ */
+ function addLanguageTitle(key, title) {
+ if (!languagesMap[key] && guessTitle(key) !== title) {
+ languagesMap[key] = title;
+ }
+ }
+
+ for (const id in data.languages) {
+ if (id !== 'meta') {
+ const language = data.languages[id];
+ const title = language.displayTitle || language.title;
+
+ addLanguageTitle(id, title);
+
+ for (const name in language.aliasTitles) {
+ addLanguageTitle(name, language.aliasTitles[name]);
+ }
+
+ if (language.alias) {
+ if (typeof language.alias === 'string') {
+ aliasMap[language.alias] = id;
+ addLanguageTitle(language.alias, title);
+ } else {
+ language.alias.forEach(function (alias) {
+ aliasMap[alias] = id;
+ addLanguageTitle(alias, title);
+ });
+ }
+ }
+
+ if (language.require) {
+ dependenciesMap[id] = language.require;
+ }
+ }
+ }
+
+ function formattedStringify(json) {
+ return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t');
+ }
+
+ const jsonLanguagesMap = formattedStringify(languagesMap);
+ const jsonDependenciesMap = formattedStringify(dependenciesMap);
+ const jsonAliasMap = formattedStringify(aliasMap);
+
+ const tasks = [
+ {
+ plugin: paths.showLanguagePlugin,
+ maps: { languages: jsonLanguagesMap }
+ },
+ {
+ plugin: paths.autoloaderPlugin,
+ maps: { aliases: jsonAliasMap, dependencies: jsonDependenciesMap }
+ }
+ ];
+
+ // TODO: Use `Promise.allSettled` (https://github.com/tc39/proposal-promise-allSettled)
+ const taskResults = await Promise.all(tasks.map(async task => {
+ try {
+ const value = await new Promise((resolve, reject) => {
+ const stream = src(task.plugin)
+ .pipe(replace(
+ /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g,
+ (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/`
+ ))
+ .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/'))));
+
+ stream.on('error', reject);
+ stream.on('end', resolve);
+ });
+ return { status: 'fulfilled', value };
+ } catch (error) {
+ return { status: 'rejected', reason: error };
+ }
+ }));
+
+ const rejectedTasks = taskResults.filter(/** @return {r is {status: 'rejected', reason: any}} */ r => r.status === 'rejected');
+ if (rejectedTasks.length > 0) {
+ throw rejectedTasks.map(r => r.reason);
+ }
+}
+
+const components = minifyComponents;
+const plugins = series(languagePlugins, minifyPlugins);
+
+
+module.exports = {
+ watch: watchComponentsAndPlugins,
+ default: parallel(components, plugins, componentsJsonToJs, build),
+ premerge,
+ linkify,
+ changes
+};
diff --git a/gulpfile.js/paths.js b/gulpfile.js/paths.js
new file mode 100644
index 0000000..1d5b7a3
--- /dev/null
+++ b/gulpfile.js/paths.js
@@ -0,0 +1,19 @@
+"use strict";
+
+module.exports = {
+ componentsFile: 'components.json',
+ componentsFileJS: 'components.js',
+ components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'],
+ main: [
+ 'components/prism-core.js',
+ 'components/prism-markup.js',
+ 'components/prism-css.js',
+ 'components/prism-clike.js',
+ 'components/prism-javascript.js',
+ 'plugins/file-highlight/prism-file-highlight.js'
+ ],
+ plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'],
+ showLanguagePlugin: 'plugins/show-language/prism-show-language.js',
+ autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js',
+ changelog: 'CHANGELOG.md'
+};
diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js
new file mode 100644
index 0000000..a78c21b
--- /dev/null
+++ b/gulpfile.js/premerge.js
@@ -0,0 +1,18 @@
+"use strict";
+
+const git = require('simple-git/promise')(__dirname);
+
+
+function gitChanges() {
+ return git.status().then(res => {
+ if (res.files.length > 0) {
+ console.log(res);
+ throw new Error('There are changes in the file system. Did you forget to run gulp?');
+ }
+ });
+}
+
+
+module.exports = {
+ premerge: gitChanges
+};
diff --git a/index.html b/index.html
index ae71785..0bb0d68 100644
--- a/index.html
+++ b/index.html
@@ -115,7 +115,7 @@
<h1>Limitations</h1>
<ul>
<li>Any pre-existing HTML in the code will be stripped off. <a href="faq.html#if-pre-existing-html-is-stripped-off-how-can-i-highlight">There are ways around it though</a>.</li>
- <li>Regex-based so it *will* fail on certain edge cases, which are documented in the <a href="examples.html">Examples section</a>.</li>
+ <li>Regex-based so it *will* fail on certain edge cases, which are documented in the <a href="known-failures.html">known failues page</a>.</li>
<li>No IE 6-8 support. If someone can read code, they are probably in the 85% of the population with a modern browser.</li>
</ul>
</section>
@@ -152,6 +152,27 @@
<p>If you want to prevent any elements from being automatically highlighted, you can use the attribute <code>data-manual</code> on the <code><script></code> element you used for prism and use the <a href="extending.html#api">API</a>.
Example:</p>
<pre><code><script src="prism.js" data-manual></script></code></pre>
+ <h2>Usage with CDNs</h2>
+
+ <p>In combination with CDNs, we recommend using the <a href="plugins/autoloader">Autoloader plugin</a> which automatically loads languages when necessary.</p>
+
+ <p>The setup of the Autoloader, will look like the following. You can also your own themes of course.</p>
+
+ <pre><code><!DOCTYPE html>
+<html>
+<head>
+ ...</code>
+ <code class="highlight"><link href="https://myCDN.com/prism@v1.x/themes/prism.css" rel="stylesheet" /></code>
+<code></head>
+<body>
+ ...</code>
+<code class="highlight" style="display: inline-block; outline-offset: .2em; margin-bottom: .2em;"> <script src="https://myCDN.com/prism@v1.x/components/prism-core.min.js"></script>
+ <script src="https://myCDN.com/prism@v1.x/plugins/autoloader/prism-autoloader.min.js"></script>
+ <script>Prism.plugins.autoloader.languages_path = 'https://myCDN.com/prism@v1.x/components/'</script></code>
+<code></body>
+</html></code></pre>
+
+ <p>CDNs which provide PrismJS are e.g. <a href="https://cdnjs.com/libraries/prism">cdnjs</a> and <a href="https://www.jsdelivr.com/package/npm/prismjs">jsDelivr</a>.</p>
<h2>Usage with Webpack, Browserify, & Other Bundlers</h2>
diff --git a/known-failures.html b/known-failures.html
new file mode 100644
index 0000000..e59e368
--- /dev/null
+++ b/known-failures.html
@@ -0,0 +1,372 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+<meta charset="utf-8" />
+<link rel="icon" href="favicon.png" />
+<title>Known failures ▲ Prism</title>
+<link rel="stylesheet" href="style.css" />
+<link rel="stylesheet" href="themes/prism.css" data-noprefix />
+<style>
+#toc {
+ display: block;
+ position: static;
+ max-width: 900px;
+ font-size: 100%;
+ color: black;
+}
+#toc > ol {
+ columns: 4;
+}
+</style>
+<script src="scripts/prefixfree.min.js"></script>
+
+<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
+<script src="https://www.google-analytics.com/ga.js" async></script>
+</head>
+<body>
+
+<header>
+ <div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
+
+ <h2>Known failures</h2>
+ <p>A list of rare edge cases where Prism highlights code incorrectly.</p>
+</header>
+
+<section>
+ <p>There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. <br>
+ 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>
+</section>
+
+
+<section class="language-applescript">
+
+<h3>Comments only support one level of nesting</h3>
+<pre><code>(* Nested block
+ (* comments
+ (* on more than
+ 2 levels *)
+ are *)
+not supported *)</code></pre>
+
+</section>
+
+
+<section class="language-autoit">
+
+<h3>Nested block comments</h3>
+<pre><code>#cs
+ #cs
+ foo()
+ #ce
+#ce</code></pre>
+
+</section>
+
+
+<section class="language-bison">
+
+<h3>Two levels of nesting inside C section</h3>
+<pre><code>{
+ if($1) {
+ if($2) {
+
+ }
+ }
+} // <- Broken
+%%
+%%</code></pre>
+
+</section>
+
+
+<section class="language-d">
+
+<h3>Comments only support one level of nesting</h3>
+<pre><code>/+ /+ /+ this does not work +/ +/ +/</code></pre>
+
+<h3>Token strings only support one level of nesting</h3>
+<pre><code>q{ q{ q{ this does not work } } }</code></pre>
+
+</section>
+
+
+<section class="language-elixir">
+
+<h3>String interpolation in single-quoted strings</h3>
+<pre><code>'#{:atom} <- this should not be highligted'</code></pre>
+
+</section>
+
+
+<section class="language-groovy">
+
+<h3>Two divisions on the same line</h3>
+<pre><code>2 / 3 / 4</code></pre>
+
+</section>
+
+
+<section class="language-inform7">
+
+<h3>Names starting with a number</h3>
+<pre><code>The box 1A is a container</code></pre>
+
+</section>
+
+
+<section class="language-javascript">
+
+<h3>String interpolation containing a closing brace</h3>
+<pre><code>`${ /* } */ a + b }`
+`${ '}' }`</code></pre>
+
+<h3>String interpolation with deeply nested braces</h3>
+<pre><code>`${foo({ a: { b: { c: true } } })}`</code></pre>
+
+</section>
+
+
+<section class="language-less">
+
+<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>
+
+</section>
+
+
+<section class="language-lua">
+
+<h3>Functions with a single string parameter not using parentheses are not highlighted</h3>
+<pre><code>foobar"param";</code></pre>
+
+</section>
+
+
+<section class="language-nasm">
+
+<h3>Numbers with underscores</h3>
+<pre><code>mov ax,1100_1000b
+mov ax,1100_1000y
+mov ax,0b1100_1000
+mov ax,0y1100_1000
+
+dd 1.222_222_222</code></pre>
+
+</section>
+
+
+<section class="language-parser">
+
+<h3>Code block starting with a comment</h3>
+<pre><code># Doesn't work
+# Does work</code></pre>
+<pre><code> # Does work when prefixed with a space</code></pre>
+
+<h3>Comments inside expressions break literals and operators</h3>
+<pre><code>^if(
+ $age>=4 # not too young
+ && $age<=80 # and not too old
+)</code></pre>
+
+</section>
+
+
+<section class="language-prolog">
+
+<h3>Null-ary predicates are not highlighted</h3>
+<pre><code>halt.
+trace.
+
+:- if(test1).
+section_1.
+:- elif(test2).
+section_2.
+:- elif(test3).
+section_3.
+:- else.
+section_else.
+:- endif.</code></pre>
+
+</section>
+
+
+<section class="language-puppet">
+
+<h3>More than one level of nested braces inside interpolation</h3>
+<pre><code>"Foobar ${foo({
+ bar => {baz => 42}
+ baz => 42
+})} <- broken"</code></pre>
+
+</section>
+
+
+<section class="language-python">
+
+<h3>Interpolation expressions containing strings with <code>{</code> or <code>}</code></h3>
+<pre><code>f"{'}'}"</code></pre>
+
+</section>
+
+
+<section class="language-q">
+
+<h3>The global context is highlighted as a verb</h3>
+<pre><code>\d .</code></pre>
+
+</section>
+
+
+<section class="language-rest">
+
+<h3>Nothing is highlighted inside table cells</h3>
+<pre><code>+---------------+----------+
+| column 1 | column 2 |
++--------------+-----------+
+| **bold**? | *italic*? |
++--------------+-----------+</code></pre>
+
+<h3>The inline markup recognition rules are not as strict as they are in the spec</h3>
+<p>No inline markup should be highlighted in the following code.</p>
+<pre><code>2 * x a ** b (* BOM32_* ` `` _ __ |
+"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›</code></pre>
+
+</section>
+
+
+<section class="language-rust">
+
+<h3>Nested block comments</h3>
+<pre><code>/* Nested block
+ /* comments
+ are */
+not supported */</code></pre>
+
+<h3>Delimiters of parameters for closures that don't use braces</h3>
+<pre><code>|x| x + 1i;</code></pre>
+
+</section>
+
+
+<section class="language-sass">
+
+<h3>Deprecated Sass syntax is not supported</h3>
+<pre><code>.page
+ color = 5px + 9px
+
+!width = 13px
+.icon
+ width = !width</code></pre>
+
+<h3>Selectors with pseudo classes are highlighted as property/value pairs</h3>
+<pre><code>a:hover
+ text-decoration: underline</code></pre>
+
+</section>
+
+
+<section class="language-scala">
+
+<h3>Nested block comments</h3>
+<pre><code>/* Nested block
+ /* comments
+ are */
+not supported */</code></pre>
+
+</section>
+
+
+<section class="language-swift">
+
+<h3>Nested block comments</h3>
+<pre><code>/* Nested block
+ /* comments
+ are */
+not supported */</code></pre>
+
+</section>
+
+
+<section class="language-textile">
+
+<h3>HTML inside Textile is not supported</h3>
+
+<p>But Textile inside HTML should be just fine.</p>
+
+<pre><code><strong>This _should_ work properly.</strong>
+*But this is <em>definitely</em> broken.*</code></pre>
+
+</section>
+
+
+<section class="language-twig">
+
+<h3>Tag containing Twig is not highlighted</h3>
+<pre><code><div{% if foo %} class="bar"{% endif %}></div></code></pre>
+
+</section>
+
+
+<section class="language-wiki">
+
+<h3>Nested magic words are not supported</h3>
+
+<pre><code>{{#switch:{{PAGENAME}}
+| L'Aquila = No translation
+| L = Not OK
+| L'Aquila = Entity escaping
+| L'Aquila = Numeric char encoding
+}}</code></pre>
+
+<h3>Nesting of bold and italic is not supported</h3>
+<pre><code>''Italic with '''bold''' inside''</code></pre>
+
+</section>
+
+
+<footer data-src="templates/footer.html" data-type="text/html"></footer>
+
+<script src="scripts/utopia.js"></script>
+<script src="prism.js"></script>
+<script src="plugins/autoloader/prism-autoloader.js" data-autoloader-path="components"></script>
+<script src="components.js"></script>
+<script>
+ $$('section[class*=language-]').forEach(function (section) {
+ var lang = /(?:^|\s)language-([\w-]+)(?:$|\s)/.exec(section.className)[1];
+ var title = components.languages[lang].title;
+
+ $u.element.create('h1', {
+ contents: title,
+ id: lang,
+ before: section.firstChild
+ });
+ });
+
+ $$('section > h1').forEach(function (h1) {
+ $u.element.create('p', {
+ contents: {
+ tag: 'a',
+ properties: {
+ href: '#toc'
+ },
+ contents: '↑ Back to top'
+ },
+ inside: h1.parentNode
+ });
+ });
+</script>
+<script src="scripts/code.js"></script>
+
+</body>
+</html>
diff --git a/package-lock.json b/package-lock.json
index 5c95d8c..2f042d7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1535,7 +1535,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -1556,12 +1557,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1576,17 +1579,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -1703,7 +1709,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -1715,6 +1722,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -1729,6 +1737,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -1736,12 +1745,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -1760,6 +1771,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -1840,7 +1852,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -1852,6 +1865,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -1937,7 +1951,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -1973,6 +1988,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -1992,6 +2008,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2035,12 +2052,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
}
}
},
@@ -4233,17 +4252,6 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
- "shelljs": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
- "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
- "dev": true,
- "requires": {
- "glob": "^7.0.0",
- "interpret": "^1.0.0",
- "rechoir": "^0.6.2"
- }
- },
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
diff --git a/package.json b/package.json
index 1a3fcb6..ddb65e3 100755
--- a/package.json
+++ b/package.json
@@ -37,7 +37,6 @@
"jsdom": "^13.0.0",
"mocha": "^6.0.0",
"pump": "^3.0.0",
- "shelljs": "^0.8.3",
"simple-git": "^1.107.0",
"yargs": "^13.2.2"
},
diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
index c1415b0..a7db119 100644
--- a/plugins/autoloader/prism-autoloader.js
+++ b/plugins/autoloader/prism-autoloader.js
@@ -55,6 +55,7 @@
"json5": "json",
"kotlin": "clike",
"less": "css",
+ "lilypond": "scheme",
"markdown": "markup",
"markup-templating": "markup",
"n4js": "javascript",
@@ -133,17 +134,20 @@
"dotnet": "csharp",
"coffee": "coffeescript",
"jinja2": "django",
+ "dns-zone": "dns-zone-file",
"dockerfile": "docker",
"gamemakerlanguage": "gml",
"hs": "haskell",
"tex": "latex",
"context": "latex",
+ "ly": "lilypond",
"emacs": "lisp",
"elisp": "lisp",
"emacs-lisp": "lisp",
"md": "markdown",
"n4jsd": "n4js",
"objectpascal": "pascal",
+ "px": "pcaxis",
"py": "python",
"rb": "ruby",
"ts": "typescript",
@@ -153,6 +157,13 @@
"yml": "yaml"
}/*]*/;
+ /**
+ * @typedef LangDataItem
+ * @property {{ success?: function, error?: function }[]} callbacks
+ * @property {boolean} [error]
+ * @property {boolean} [loading]
+ */
+ /** @type {Object<string, LangDataItem>} */
var lang_data = {};
var ignored_language = 'none';
@@ -216,11 +227,6 @@
lang = lang_aliases[lang];
}
- var data = lang_data[lang];
- if (!data) {
- data = lang_data[lang] = {};
- }
-
// Look for additional dependencies defined on the <code> or <pre> tags
var deps = elt.getAttribute('data-dependencies');
if (!deps && elt.parentNode && elt.parentNode.tagName.toLowerCase() === 'pre') {
@@ -282,20 +288,14 @@
var load = function () {
var data = lang_data[lang];
if (!data) {
- data = lang_data[lang] = {};
- }
- if (success) {
- if (!data.success_callbacks) {
- data.success_callbacks = [];
- }
- data.success_callbacks.push(success);
- }
- if (error) {
- if (!data.error_callbacks) {
- data.error_callbacks = [];
- }
- data.error_callbacks.push(error);
+ data = lang_data[lang] = {
+ callbacks: []
+ };
}
+ data.callbacks.push({
+ success: success,
+ error: error
+ });
if (!force && Prism.languages[lang]) {
languageSuccess(lang);
@@ -329,10 +329,14 @@
* @param {string} lang
*/
var languageSuccess = function (lang) {
- if (lang_data[lang] && lang_data[lang].success_callbacks && lang_data[lang].success_callbacks.length) {
- lang_data[lang].success_callbacks.forEach(function (f) {
- f(lang);
- });
+ if (lang_data[lang] ) {
+ var callbacks = lang_data[lang].callbacks;
+ while (callbacks.length) {
+ var callback = callbacks.shift().success;
+ if (callback) {
+ callback();
+ }
+ }
}
};
@@ -341,10 +345,14 @@
* @param {string} lang
*/
var languageError = function (lang) {
- if (lang_data[lang] && lang_data[lang].error_callbacks && lang_data[lang].error_callbacks.length) {
- lang_data[lang].error_callbacks.forEach(function (f) {
- f(lang);
- });
+ if (lang_data[lang]) {
+ var callbacks = lang_data[lang].callbacks;
+ while (callbacks.length) {
+ var callback = callbacks.shift().error;
+ if (callback) {
+ callback();
+ }
+ }
}
};
diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
index 319b6f3..3bb07d0 100644
--- a/plugins/autoloader/prism-autoloader.min.js
+++ b/plugins/autoloader/prism-autoloader.min.js
@@ -1 +1 @@
-!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var c=a.getAttribute("data-autoloader-path").trim();0<c.length&&!/^[a-z]+:\/\//i.test(a.src)&&(e=c.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(a.src)&&(e=a.src.replace(/[\w-]+\.js$/,"components/"));var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0},o=function(a,e,c){"string"==typeof a&&(a=[a]);var s=0,t=a.length,r=function(){s<t?u(a[s],function(){s++,r()},function(){c&&c(a[s])}):s===t&&e&&e(a)};r()},u=function(e,c,s){var t=0<=e.indexOf("!");e=e.replace("!","");var a=function(){var a=n[e];if(a||(a=n[e]={}),c&&(a.success_callbacks||(a.success_callbacks=[]),a.success_callbacks.push(c)),s&&(a.error_callbacks||(a.error_callbacks=[]),a.error_callbacks.push(s)),!t&&Prism.languages[e])m(e);else if(!t&&a.error)k(e);else if(t||!a.loading){a.loading=!0,function(a,e,c){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),c&&c()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,m(e)},function(){a.loading=!1,a.error=!0,k(e)})}},r=i[e=l[e]||e];r&&r.length?o(r,a):a()},m=function(e){n[e]&&n[e].success_callbacks&&n[e].success_callbacks.length&&n[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){n[e]&&n[e].error_callbacks&&n[e].error_callbacks.length&&n[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var c=n[a];c||(c=n[a]={});var s=e.getAttribute("data-dependencies");!s&&e.parentNode&&"pre"===e.parentNode.tagName.toLowerCase()&&(s=e.parentNode.getAttribute("data-dependencies")),s=s?s.split(/\s*,\s*/g):[],o(s,function(){u(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}}();
\ No newline at end of file
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var t=a.getAttribute("data-autoloader-path").trim();0<t.length&&!/^[a-z]+:\/\//i.test(a.src)&&(e=t.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(a.src)&&(e=a.src.replace(/[\w-]+\.js$/,"components/"));var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0},o=function(a,e,t){"string"==typeof a&&(a=[a]);var s=0,i=a.length,c=function(){s<i?m(a[s],function(){s++,c()},function(){t&&t(a[s])}):s===i&&e&&e(a)};c()},m=function(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!","");var a=function(){var a=l[e];if(a||(a=l[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e);else if(!i&&a.error)k(e);else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e)},function(){a.loading=!1,a.error=!0,k(e)})}},c=r[e=n[e]||e];c&&c.length?o(c,a):a()},u=function(a){if(l[a])for(var e=l[a].callbacks;e.length;){var t=e.shift().success;t&&t()}},k=function(a){if(l[a])for(var e=l[a].callbacks;e.length;){var t=e.shift().error;t&&t()}};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in n&&(a=n[a]);var t=e.getAttribute("data-dependencies");!t&&e.parentNode&&"pre"===e.parentNode.tagName.toLowerCase()&&(t=e.parentNode.getAttribute("data-dependencies")),t=t?t.split(/\s*,\s*/g):[],o(t,function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}}();
\ No newline at end of file
diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js
index 4e567cd..69d55a2 100644
--- a/plugins/show-language/prism-show-language.js
+++ b/plugins/show-language/prism-show-language.js
@@ -45,6 +45,8 @@
"css-extras": "CSS Extras",
"django": "Django/Jinja2",
"jinja2": "Django/Jinja2",
+ "dns-zone-file": "DNS zone file",
+ "dns-zone": "DNS zone file",
"dockerfile": "Docker",
"ebnf": "Extended Backus–Naur form",
"ejs": "EJS",
@@ -75,6 +77,8 @@
"latex": "LaTeX",
"tex": "TeX",
"context": "ConTeXt",
+ "lilypond": "LilyPond",
+ "ly": "LilyPond",
"emacs": "Lisp",
"elisp": "Lisp",
"emacs-lisp": "Lisp",
@@ -95,6 +99,8 @@
"opencl": "OpenCL",
"parigp": "PARI/GP",
"objectpascal": "Object Pascal",
+ "pcaxis": "PC-Axis",
+ "px": "PC-Axis",
"php": "PHP",
"phpdoc": "PHPDoc",
"php-extras": "PHP Extras",
@@ -113,8 +119,9 @@
"sass": "Sass (Sass)",
"scss": "Sass (Scss)",
"shell-session": "Shell session",
- "sql": "SQL",
"soy": "Soy (Closure Template)",
+ "splunk-spl": "Splunk SPL",
+ "sql": "SQL",
"tap": "TAP",
"toml": "TOML",
"tt2": "Template Toolkit 2",
diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js
index 8211a34..3e722ae 100644
--- a/plugins/show-language/prism-show-language.min.js
+++ b/plugins/show-language/prism-show-language.min.js
@@ -1 +1 @@
-!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
\ No newline at end of file
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var l={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",soy:"Soy (Closure Template)","splunk-spl":"Splunk SPL",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||l[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
\ No newline at end of file
diff --git a/plugins/toolbar/prism-toolbar.js b/plugins/toolbar/prism-toolbar.js
index bc79a59..893bded 100644
--- a/plugins/toolbar/prism-toolbar.js
+++ b/plugins/toolbar/prism-toolbar.js
@@ -14,6 +14,7 @@
* @property {string} text The text displayed.
* @property {string} [url] The URL of the link which will be created.
* @property {Function} [onClick] The event listener for the `click` event of the created button.
+ * @property {string} [className] The class attribute to include with element.
*/
/**
@@ -44,6 +45,10 @@
element = document.createElement('span');
}
+ if (opts.className) {
+ element.classList.add(opts.className);
+ }
+
element.textContent = opts.text;
return element;
diff --git a/plugins/toolbar/prism-toolbar.min.js b/plugins/toolbar/prism-toolbar.min.js
index d582be6..3b9f082 100644
--- a/plugins/toolbar/prism-toolbar.min.js
+++ b/plugins/toolbar/prism-toolbar.min.js
@@ -1 +1 @@
-!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},n=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,n){var e;e="function"==typeof n?n:function(t){var e;return"function"==typeof n.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){n.onClick.call(this,t)})):"string"==typeof n.url?(e=document.createElement("a")).href=n.url:e=document.createElement("span"),e.textContent=n.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||n})),r.forEach(function(t){var e=t(a);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),o.appendChild(n)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var n,a,o=e.getAttribute("data-label");try{a=document.querySelector("template#"+o)}catch(t){}return a?n=a.content:(e.hasAttribute("data-url")?(n=document.createElement("a")).href=e.getAttribute("data-url"):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",e)}}();
\ No newline at end of file
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},a=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,a){var e;e="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a")).href=a.url:e=document.createElement("span"),a.className&&e.classList.add(a.className),e.textContent=a.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(n){var t=n.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||a})),r.forEach(function(t){var e=t(n);if(e){var a=document.createElement("div");a.classList.add("toolbar-item"),a.appendChild(e),o.appendChild(a)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var a,n,o=e.getAttribute("data-label");try{n=document.querySelector("template#"+o)}catch(t){}return n?a=n.content:(e.hasAttribute("data-url")?(a=document.createElement("a")).href=e.getAttribute("data-url"):a=document.createElement("span"),a.textContent=o),a}}),Prism.hooks.add("complete",e)}}();
\ No newline at end of file
diff --git a/prism.js b/prism.js
index 38340f2..3082292 100644
--- a/prism.js
+++ b/prism.js
@@ -183,9 +183,9 @@ var _ = {
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
};
- _.hooks.run("before-highlightall", env);
+ _.hooks.run('before-highlightall', env);
- var elements = env.elements || container.querySelectorAll(env.selector);
+ var elements = container.querySelectorAll(env.selector);
for (var i=0, element; element = elements[i++];) {
_.highlightElement(element, async === true, env.callback);
@@ -785,7 +785,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', {
],
'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
- 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
+ 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
'operator': /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/
});
@@ -799,7 +799,7 @@ Prism.languages.insertBefore('javascript', 'keyword', {
},
// This must be declared before keyword because we use "function" inside the look-forward
'function-variable': {
- pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
+ pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
alias: 'function'
},
'parameter': [
diff --git a/scripts/download.js b/scripts/download.js
index 7be6834..b6ed649 100644
--- a/scripts/download.js
+++ b/scripts/download.js
@@ -552,9 +552,15 @@ function generateCode(){
var fileName = 'prism.' + type;
var codeElement = $('#download-' + type + ' code');
+ var pre = codeElement.parentElement;
- codeElement.textContent = text;
- Prism.highlightElement(codeElement, true);
+ var newCode = document.createElement('CODE');
+ newCode.className = codeElement.className;
+ newCode.textContent = text;
+
+ Prism.highlightElement(newCode, true, function () {
+ pre.replaceChild(newCode, codeElement);
+ });
$('#download-' + type + ' .download-button').onclick = function () {
diff --git a/scripts/examples.js b/scripts/examples.js
index 5c96907..f226f45 100644
--- a/scripts/examples.js
+++ b/scripts/examples.js
@@ -20,63 +20,62 @@ var treePromise = new Promise(function (resolve) {
var languages = components.languages;
-for (var id in languages) {
- if (id === 'meta') {
- continue;
- }
-
- (function (id) {
- var language = languages[id];
- var checked = false;
-
- if (language.option === 'default') {
- checked = true;
- }
+Promise.all(Object.keys(languages).filter(function (id) { return id !== 'meta'; }).map(function (id) {
+ var language = languages[id];
- language.enabled = checked;
- language.path = languages.meta.path.replace(/\{id}/g, id) + '.js';
- language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html';
+ language.enabled = language.option === 'default';
+ language.path = languages.meta.path.replace(/\{id}/g, id) + '.js';
+ language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html';
- fileExists(language.examplesPath).then(function (exists) {
- $u.element.create('label', {
- attributes: {
- 'data-id': id,
- 'title': !exists ? 'No examples are available for this language.' : ''
- },
- className: !exists ? 'unavailable' : '',
- contents: [
- {
- tag: 'input',
- properties: {
- type: 'checkbox',
- name: 'language',
- value: id,
- checked: checked && exists,
- disabled: !exists,
- onclick: function () {
- $$('input[name="' + this.name + '"]').forEach(function (input) {
- languages[input.value].enabled = input.checked;
- });
-
- update(id);
- }
+ return fileExists(language.examplesPath).then(function (exists) {
+ return { id: id, exists: exists };
+ });
+})).then(function (values) {
+ values.forEach(function (result) {
+ var id = result.id;
+ var exists = result.exists;
+ var language = languages[id];
+ var checked = language.enabled;
+
+ $u.element.create('label', {
+ attributes: {
+ 'data-id': id,
+ 'title': !exists ? 'No examples are available for this language.' : ''
+ },
+ className: !exists ? 'unavailable' : '',
+ contents: [
+ {
+ tag: 'input',
+ properties: {
+ type: 'checkbox',
+ name: 'language',
+ value: id,
+ checked: checked && exists,
+ disabled: !exists,
+ onclick: function () {
+ $$('input[name="' + this.name + '"]').forEach(function (input) {
+ languages[input.value].enabled = input.checked;
+ });
+
+ update(id);
}
- },
- language.title
- ],
- inside: '#languages'
- });
- examples[id] = $u.element.create('section', {
- 'id': 'language-' + id,
- 'className': 'language-' + id,
- inside: '#examples'
- });
- if (checked) {
- update(id);
- }
+ }
+ },
+ language.title
+ ],
+ inside: '#languages'
});
- }(id));
-}
+ examples[id] = $u.element.create('section', {
+ 'id': 'language-' + id,
+ 'className': 'language-' + id,
+ inside: '#examples'
+ });
+ if (checked) {
+ update(id);
+ }
+ });
+});
+
function fileExists(filepath) {
return treePromise.then(function (tree) {
@@ -85,6 +84,12 @@ function fileExists(filepath) {
return true;
}
}
+
+ // on localhost: The missing example might be for a new language
+ if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') {
+ return getFileContents(filepath).then(function () { return true; }, function () { return false; });
+ }
+
return false;
});
}
@@ -150,11 +155,7 @@ function update(id) {
examples[id].innerHTML = buildContentsHeader(id) + contents;
loadLanguage(id).then(function () {
- var elements = examples[id].querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
-
- for (var i=0, element; element = elements[i++];) {
- Prism.highlightElement(element);
- }
+ Prism.highlightAllUnder(examples[id]);
});
});
} else {
@@ -166,10 +167,9 @@ function update(id) {
* Loads a language, including all dependencies
*
* @param {string} lang the language to load
- * @type {Promise} the promise which resolves as soon as everything is loaded
+ * @returns {Promise} the promise which resolves as soon as everything is loaded
*/
-function loadLanguage (lang)
-{
+function loadLanguage(lang) {
// at first we need to fetch all dependencies for the main language
// Note: we need to do this, even if the main language already is loaded (just to be sure..)
//
@@ -200,12 +200,10 @@ function loadLanguage (lang)
* Returns all dependencies (as identifiers) of a specific language
*
* @param {string} lang
- * @returns {Array.<string>} the list of dependencies. Empty if the language has none.
+ * @returns {Array<string>} the list of dependencies. Empty if the language has none.
*/
-function getDependenciesOfLanguage (lang)
-{
- if (!components.languages[lang] || !components.languages[lang].require)
- {
+function getDependenciesOfLanguage(lang) {
+ if (!components.languages[lang] || !components.languages[lang].require) {
return [];
}
diff --git a/style.css b/style.css
index 64f79af..221b6cd 100644
--- a/style.css
+++ b/style.css
@@ -24,7 +24,6 @@ footer p {
* {
margin: 0;
padding: 0;
- font-weight: normal;
}
body {
@@ -77,6 +76,10 @@ h2 {
margin: 1em 0 .3em;
}
+h2 {
+ font-weight: normal;
+}
+
dt {
margin: 1em 0 0 0;
font-size: 130%;
diff --git a/templates/footer.html b/templates/footer.html
index b0e306a..98be749 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -9,7 +9,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="test.html">Test drive</a></li>
<li><a href="extending.html">API docs</a></li>
- <li><a href="https://github.com/LeaVerou/prism/">Fork Prism on Github</a></li>
+ <li><a href="https://github.com/PrismJS/prism/">Fork Prism on GitHub</a></li>
<li><a href="https://twitter.com/prismjs">Follow Prism on Twitter</a></li>
</ul>
</nav>
diff --git a/tests/languages/dns-zone-file/class_feature.test b/tests/languages/dns-zone-file/class_feature.test
new file mode 100644
index 0000000..4ba6226
--- /dev/null
+++ b/tests/languages/dns-zone-file/class_feature.test
@@ -0,0 +1,17 @@
+IN
+CH
+CS
+HS
+
+----------------------------------------------------
+
+[
+ ["class", "IN"],
+ ["class", "CH"],
+ ["class", "CS"],
+ ["class", "HS"]
+]
+
+----------------------------------------------------
+
+Checks for all resource record classes.
diff --git a/tests/languages/dns-zone-file/comment_feature.test b/tests/languages/dns-zone-file/comment_feature.test
new file mode 100644
index 0000000..842eaeb
--- /dev/null
+++ b/tests/languages/dns-zone-file/comment_feature.test
@@ -0,0 +1,11 @@
+; comment
+
+----------------------------------------------------
+
+[
+ ["comment", "; comment"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
diff --git a/tests/languages/dns-zone-file/string_feature.test b/tests/languages/dns-zone-file/string_feature.test
new file mode 100644
index 0000000..8dba24e
--- /dev/null
+++ b/tests/languages/dns-zone-file/string_feature.test
@@ -0,0 +1,13 @@
+"foo"
+"\""
+
+----------------------------------------------------
+
+[
+ ["string", "\"foo\""],
+ ["string", "\"\\\"\""]
+]
+
+----------------------------------------------------
+
+Checks for strings.
diff --git a/tests/languages/dns-zone-file/type_featrue.test b/tests/languages/dns-zone-file/type_featrue.test
new file mode 100644
index 0000000..7c3d7e7
--- /dev/null
+++ b/tests/languages/dns-zone-file/type_featrue.test
@@ -0,0 +1,155 @@
+A
+A6
+AAAA
+AFSDB
+APL
+ATMA
+CAA
+CDNSKEY
+CDS
+CERT
+CNAME
+DHCID
+DLV
+DNAME
+DNSKEY
+DS
+EID
+GID
+GPOS
+HINFO
+HIP
+IPSECKEY
+ISDN
+KEY
+KX
+LOC
+MAILA
+MAILB
+MB
+MD
+MF
+MG
+MINFO
+MR
+MX
+NAPTR
+NB
+NBSTAT
+NIMLOC
+NINFO
+NS
+NSAP
+NSAP-PTR
+NSEC
+NSEC3
+NSEC3PARAM
+NULL
+NXT
+OPENPGPKEY
+PTR
+PX
+RKEY
+RP
+RRSIG
+RT
+SIG
+SINK
+SMIMEA
+SOA
+SPF
+SRV
+SSHFP
+TA
+TKEY
+TLSA
+TSIG
+TXT
+UID
+UINFO
+UNSPEC
+URI
+WKS
+X25
+
+----------------------------------------------------
+
+[
+ ["type", "A"],
+ ["type", "A6"],
+ ["type", "AAAA"],
+ ["type", "AFSDB"],
+ ["type", "APL"],
+ ["type", "ATMA"],
+ ["type", "CAA"],
+ ["type", "CDNSKEY"],
+ ["type", "CDS"],
+ ["type", "CERT"],
+ ["type", "CNAME"],
+ ["type", "DHCID"],
+ ["type", "DLV"],
+ ["type", "DNAME"],
+ ["type", "DNSKEY"],
+ ["type", "DS"],
+ ["type", "EID"],
+ ["type", "GID"],
+ ["type", "GPOS"],
+ ["type", "HINFO"],
+ ["type", "HIP"],
+ ["type", "IPSECKEY"],
+ ["type", "ISDN"],
+ ["type", "KEY"],
+ ["type", "KX"],
+ ["type", "LOC"],
+ ["type", "MAILA"],
+ ["type", "MAILB"],
+ ["type", "MB"],
+ ["type", "MD"],
+ ["type", "MF"],
+ ["type", "MG"],
+ ["type", "MINFO"],
+ ["type", "MR"],
+ ["type", "MX"],
+ ["type", "NAPTR"],
+ ["type", "NB"],
+ ["type", "NBSTAT"],
+ ["type", "NIMLOC"],
+ ["type", "NINFO"],
+ ["type", "NS"],
+ ["type", "NSAP"],
+ ["type", "NSAP-PTR"],
+ ["type", "NSEC"],
+ ["type", "NSEC3"],
+ ["type", "NSEC3PARAM"],
+ ["type", "NULL"],
+ ["type", "NXT"],
+ ["type", "OPENPGPKEY"],
+ ["type", "PTR"],
+ ["type", "PX"],
+ ["type", "RKEY"],
+ ["type", "RP"],
+ ["type", "RRSIG"],
+ ["type", "RT"],
+ ["type", "SIG"],
+ ["type", "SINK"],
+ ["type", "SMIMEA"],
+ ["type", "SOA"],
+ ["type", "SPF"],
+ ["type", "SRV"],
+ ["type", "SSHFP"],
+ ["type", "TA"],
+ ["type", "TKEY"],
+ ["type", "TLSA"],
+ ["type", "TSIG"],
+ ["type", "TXT"],
+ ["type", "UID"],
+ ["type", "UINFO"],
+ ["type", "UNSPEC"],
+ ["type", "URI"],
+ ["type", "WKS"],
+ ["type", "X25"]
+]
+
+----------------------------------------------------
+
+Checks for all resource record types.
diff --git a/tests/languages/dns-zone-file/variable_feature.test b/tests/languages/dns-zone-file/variable_feature.test
new file mode 100644
index 0000000..9eea4da
--- /dev/null
+++ b/tests/languages/dns-zone-file/variable_feature.test
@@ -0,0 +1,14 @@
+$ORIGIN foo.bar.com
+@
+
+----------------------------------------------------
+
+[
+ ["keyword", "$ORIGIN"],
+ ["variable", "foo.bar.com"],
+ ["variable", "@"]
+]
+
+----------------------------------------------------
+
+Checks for variables.
diff --git a/tests/languages/fsharp/string_feature.test b/tests/languages/fsharp/string_feature.test
index 3c984a8..c6310d8 100644
--- a/tests/languages/fsharp/string_feature.test
+++ b/tests/languages/fsharp/string_feature.test
@@ -18,6 +18,10 @@ bar"""
'a'B
'\''
'\\'
+'\231'
+'\x41'
+'\u0041'
+'\U0001F47D'
----------------------------------------------------
@@ -39,9 +43,13 @@ bar"""
["string", "'a'"],
["string", "'a'B"],
["string", "'\\''"],
- ["string", "'\\\\'"]
+ ["string", "'\\\\'"],
+ ["string", "'\\231'"],
+ ["string", "'\\x41'"],
+ ["string", "'\\u0041'"],
+ ["string", "'\\U0001F47D'"]
]
----------------------------------------------------
-Checks for normal strings, verbatim strings, triple-quoted strings and character literals.
\ No newline at end of file
+Checks for normal strings, verbatim strings, triple-quoted strings and character literals.
diff --git a/tests/languages/javascript!+js-extras/method-variable_feature.test b/tests/languages/javascript!+js-extras/method-variable_feature.test
index 1d075b4..2ceaf13 100644
--- a/tests/languages/javascript!+js-extras/method-variable_feature.test
+++ b/tests/languages/javascript!+js-extras/method-variable_feature.test
@@ -1,5 +1,6 @@
foo.bar = function() {};
foo.bar = async () => {};
+this.bar = () => {};
----------------------------------------------------
@@ -29,6 +30,19 @@ foo.bar = async () => {};
["arrow", "=>"],
["punctuation", "{"],
["punctuation", "}"],
+ ["punctuation", ";"],
+
+ ["keyword", "this"],
+ ["punctuation", "."],
+ ["method-variable", [
+ "bar"
+ ]],
+ ["operator", "="],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["arrow", "=>"],
+ ["punctuation", "{"],
+ ["punctuation", "}"],
["punctuation", ";"]
]
diff --git a/tests/languages/javascript!+js-extras/method_feature.test b/tests/languages/javascript!+js-extras/method_feature.test
index 1d0b4db..9e79a63 100644
--- a/tests/languages/javascript!+js-extras/method_feature.test
+++ b/tests/languages/javascript!+js-extras/method_feature.test
@@ -1,5 +1,6 @@
foo.bar();
foo.bar.call();
+this.#bar();
----------------------------------------------------
@@ -24,6 +25,15 @@ foo.bar.call();
]],
["punctuation", "("],
["punctuation", ")"],
+ ["punctuation", ";"],
+
+ ["keyword", "this"],
+ ["punctuation", "."],
+ ["method", [
+ "#bar"
+ ]],
+ ["punctuation", "("],
+ ["punctuation", ")"],
["punctuation", ";"]
]
diff --git a/tests/languages/javascript!+js-extras/property-access_feature.test b/tests/languages/javascript!+js-extras/property-access_feature.test
index c5171e1..a0e4330 100644
--- a/tests/languages/javascript!+js-extras/property-access_feature.test
+++ b/tests/languages/javascript!+js-extras/property-access_feature.test
@@ -1,5 +1,7 @@
foo.bar.baz = 0;
+this.#foo;
+
----------------------------------------------------
[
@@ -14,6 +16,13 @@ foo.bar.baz = 0;
]],
["operator", "="],
["number", "0"],
+ ["punctuation", ";"],
+
+ ["keyword", "this"],
+ ["punctuation", "."],
+ ["property-access", [
+ "#foo"
+ ]],
["punctuation", ";"]
]
diff --git a/tests/languages/javascript/private_fields_feature.test b/tests/languages/javascript/private_fields_feature.test
new file mode 100644
index 0000000..f5ce923
--- /dev/null
+++ b/tests/languages/javascript/private_fields_feature.test
@@ -0,0 +1,58 @@
+class Foo {
+ #foo = function () {
+ return this.#bar;
+ }
+ #bar = 9;
+
+ get value() {
+ return this.#foo();
+ }
+}
+
+----------------------------------------------------
+
+[
+ ["keyword", "class"],
+ ["class-name", [
+ "Foo"
+ ]],
+ ["punctuation", "{"],
+
+ ["function-variable", "#foo"],
+ ["operator", "="],
+ ["keyword", "function"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["punctuation", "{"],
+ ["keyword", "return"],
+ ["keyword", "this"],
+ ["punctuation", "."],
+ "#bar",
+ ["punctuation", ";"],
+ ["punctuation", "}"],
+
+ "\r\n\t#bar ",
+ ["operator", "="],
+ ["number", "9"],
+ ["punctuation", ";"],
+
+ ["keyword", "get"],
+ ["function", "value"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["punctuation", "{"],
+ ["keyword", "return"],
+ ["keyword", "this"],
+ ["punctuation", "."],
+ ["function", "#foo"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+ ["punctuation", ";"],
+ ["punctuation", "}"],
+
+ ["punctuation", "}"]
+]
+
+----------------------------------------------------
+
+Checks for the private field syntax.
diff --git a/tests/languages/lilypond/comment_feature.test b/tests/languages/lilypond/comment_feature.test
new file mode 100644
index 0000000..3bfd8c6
--- /dev/null
+++ b/tests/languages/lilypond/comment_feature.test
@@ -0,0 +1,16 @@
+% single line
+
+%{
+multiple lines
+%}
+
+----------------------------------------------------
+
+[
+ ["comment", "% single line"],
+ ["comment", "%{\nmultiple lines\n%}"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
diff --git a/tests/languages/lilypond/embedded-scheme_feature.test b/tests/languages/lilypond/embedded-scheme_feature.test
new file mode 100644
index 0000000..41e4427
--- /dev/null
+++ b/tests/languages/lilypond/embedded-scheme_feature.test
@@ -0,0 +1,86 @@
+#(define foo)
+
+#(define-music-function (parser location notes) (ly:music?) #{
+ % Yes! You can embed LilyPond in Scheme.
+ \override Score.Stem.beamlet-max-length-proportion = #'(0.5 . 0.5)
+#})
+
+##t
+
+#"s t r i n g"
+
+----------------------------------------------------
+
+[
+ ["embedded-scheme", [
+ ["punctuation", "#"],
+ ["scheme", [
+ ["punctuation", "("],
+ ["keyword", "define"],
+ " foo",
+ ["punctuation", ")"]
+ ]]
+ ]],
+
+ ["embedded-scheme", [
+ ["punctuation", "#"],
+ ["scheme", [
+ ["punctuation", "("],
+ ["function", "define-music-function"],
+ ["punctuation", "("],
+ ["function", "parser"],
+ " location notes",
+ ["punctuation", ")"],
+ ["punctuation", "("],
+ ["function", "ly:music?"],
+ ["punctuation", ")"],
+ ["embedded-lilypond", [
+ ["punctuation", "#{"],
+ ["lilypond", [
+ ["comment", "% Yes! You can embed LilyPond in Scheme."],
+ ["keyword", [
+ ["punctuation", "\\"],
+ "override"
+ ]],
+ " Score",
+ ["punctuation", "."],
+ "Stem",
+ ["punctuation", "."],
+ "beamlet-max-length-proportion ",
+ ["operator", "="],
+ ["embedded-scheme", [
+ ["punctuation", "#"],
+ ["scheme", [
+ ["punctuation", "'"],
+ ["punctuation", "("],
+ ["number", "0.5"],
+ " . ",
+ ["number", "0.5"],
+ ["punctuation", ")"]
+ ]]
+ ]]
+ ]],
+ ["punctuation", "#}"]
+ ]],
+ ["punctuation", ")"]
+ ]]
+ ]],
+
+ ["embedded-scheme", [
+ ["punctuation", "#"],
+ ["scheme", [
+ ["boolean", "#t"]
+ ]]
+ ]],
+
+ ["embedded-scheme", [
+ ["punctuation", "#"],
+ ["scheme", [
+ ["string", "\"s t r i n g\""]
+ ]]
+ ]]
+]
+
+----------------------------------------------------
+
+Checks for Scheme code embedded in LilyPond.
diff --git a/tests/languages/lilypond/keyword_feature.test b/tests/languages/lilypond/keyword_feature.test
new file mode 100644
index 0000000..fa4dcb1
--- /dev/null
+++ b/tests/languages/lilypond/keyword_feature.test
@@ -0,0 +1,35 @@
+\new \set
+\center-column
+5\mm
+h\fermata
+
+----------------------------------------------------
+
+[
+ ["keyword", [
+ ["punctuation", "\\"],
+ "new"
+ ]],
+ ["keyword", [
+ ["punctuation", "\\"],
+ "set"
+ ]],
+ ["keyword", [
+ ["punctuation", "\\"],
+ "center-column"
+ ]],
+ ["number", "5"],
+ ["keyword", [
+ ["punctuation", "\\"],
+ "mm"
+ ]],
+ "\nh",
+ ["keyword", [
+ ["punctuation", "\\"],
+ "fermata"
+ ]]
+]
+
+----------------------------------------------------
+
+Checks for keywords.
diff --git a/tests/languages/lilypond/number_feature.test b/tests/languages/lilypond/number_feature.test
new file mode 100644
index 0000000..e1e076f
--- /dev/null
+++ b/tests/languages/lilypond/number_feature.test
@@ -0,0 +1,13 @@
+123
+6/8
+
+----------------------------------------------------
+
+[
+ ["number", "123"],
+ ["number", "6/8"]
+]
+
+----------------------------------------------------
+
+Checks for numbers.
diff --git a/tests/languages/lilypond/string_feature.test b/tests/languages/lilypond/string_feature.test
new file mode 100644
index 0000000..e8b3ae6
--- /dev/null
+++ b/tests/languages/lilypond/string_feature.test
@@ -0,0 +1,14 @@
+"foo"
+"foo
+bar\""
+
+----------------------------------------------------
+
+[
+ ["string", "\"foo\""],
+ ["string", "\"foo\nbar\\\"\""]
+]
+
+----------------------------------------------------
+
+Checks for strings.
diff --git a/tests/languages/markdown/bold_feature.test b/tests/languages/markdown/bold_feature.test
index db915b9..39217ab 100644
--- a/tests/languages/markdown/bold_feature.test
+++ b/tests/languages/markdown/bold_feature.test
@@ -113,7 +113,11 @@ __foo[bar](baz)__
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "__"]
@@ -183,7 +187,11 @@ __foo[bar](baz)__
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "**"]
diff --git a/tests/languages/markdown/italic_feature.test b/tests/languages/markdown/italic_feature.test
index fc9c6c8..f090260 100644
--- a/tests/languages/markdown/italic_feature.test
+++ b/tests/languages/markdown/italic_feature.test
@@ -113,7 +113,11 @@ _foo[bar](baz)_
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "_"]
@@ -183,7 +187,11 @@ _foo[bar](baz)_
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "*"]
diff --git a/tests/languages/markdown/strike_feature.test b/tests/languages/markdown/strike_feature.test
index 414fb8b..9cb9b70 100644
--- a/tests/languages/markdown/strike_feature.test
+++ b/tests/languages/markdown/strike_feature.test
@@ -113,7 +113,11 @@ bar~
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "~"]
@@ -183,7 +187,11 @@ bar~
["content", [
"foo",
["url", [
- "[bar](baz)"
+ "[",
+ ["content", [
+ "bar"
+ ]],
+ "](baz)"
]]
]],
["punctuation", "~~"]
diff --git a/tests/languages/markdown/url_feature.test b/tests/languages/markdown/url_feature.test
index ca8b9cf..455009f 100644
--- a/tests/languages/markdown/url_feature.test
+++ b/tests/languages/markdown/url_feature.test
@@ -1,25 +1,154 @@
[foo](http://prismjs.com)
![foo](http://prismjs.com "Foo\"bar")
+[foo][bar]
[foo] [bar]
+[foo
+bar](http://prismjs.com)
+
+[foo *bar* baz](http://prismjs.com)
+[foo _bar_ baz](http://prismjs.com)
+[foo **bar** baz](http://prismjs.com)
+[foo __bar__ baz](http://prismjs.com)
+[foo ~bar~ baz](http://prismjs.com)
+[foo ~~bar~~ baz](http://prismjs.com)
+
----------------------------------------------------
[
["url", [
- "[foo](http://prismjs.com)"
+ "[",
+ ["content", [
+ "foo"
+ ]],
+ "](http://prismjs.com)"
]],
["url", [
- "![foo](http://prismjs.com ",
+ "![",
+ ["content", [
+ "foo"
+ ]],
+ "](http://prismjs.com ",
["string", "\"Foo\\\"bar\""],
")"
]],
["url", [
- "[foo] [",
+ "[",
+ ["content", [
+ "foo"
+ ]],
+ "][",
+ ["variable", "bar"],
+ "]"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo"
+ ]],
+ "] [",
["variable", "bar"],
"]"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo\r\nbar"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["italic", [
+ ["punctuation", "*"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "*"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["italic", [
+ ["punctuation", "_"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "_"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["bold", [
+ ["punctuation", "**"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "**"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["bold", [
+ ["punctuation", "__"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "__"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["strike", [
+ ["punctuation", "~"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "~"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
+ ]],
+ ["url", [
+ "[",
+ ["content", [
+ "foo ",
+ ["strike", [
+ ["punctuation", "~~"],
+ ["content", [
+ "bar"
+ ]],
+ ["punctuation", "~~"]
+ ]],
+ " baz"
+ ]],
+ "](http://prismjs.com)"
]]
]
----------------------------------------------------
-Checks for URLs.
\ No newline at end of file
+Checks for URLs.
diff --git a/tests/languages/pascaligo/boolean_feature.test b/tests/languages/pascaligo/boolean_feature.test
new file mode 100644
index 0000000..d68fb38
--- /dev/null
+++ b/tests/languages/pascaligo/boolean_feature.test
@@ -0,0 +1,11 @@
+True False
+
+----------------------------------------------------
+
+[
+ ["boolean", "True"], ["boolean", "False"]
+]
+
+----------------------------------------------------
+
+Checks for all booleans.
diff --git a/tests/languages/pascaligo/builtin_feature.test b/tests/languages/pascaligo/builtin_feature.test
new file mode 100644
index 0000000..900b14f
--- /dev/null
+++ b/tests/languages/pascaligo/builtin_feature.test
@@ -0,0 +1,15 @@
+int unit
+string nat map
+list record bool
+
+----------------------------------------------------
+
+[
+ ["builtin", "int"], ["builtin", "unit"],
+ ["builtin", "string"], ["builtin", "nat"], ["builtin", "map"],
+ ["builtin", "list"], ["builtin", "record"], ["builtin", "bool"]
+]
+
+----------------------------------------------------
+
+Checks for builtins.
diff --git a/tests/languages/pascaligo/comment_feature.test b/tests/languages/pascaligo/comment_feature.test
new file mode 100644
index 0000000..830e26a
--- /dev/null
+++ b/tests/languages/pascaligo/comment_feature.test
@@ -0,0 +1,18 @@
+(* foo *)
+(* foo
+bar *)
+//
+// foobar
+
+----------------------------------------------------
+
+[
+ ["comment", "(* foo *)"],
+ ["comment", "(* foo\r\nbar *)"],
+ ["comment", "//"],
+ ["comment", "// foobar"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
\ No newline at end of file
diff --git a/tests/languages/pascaligo/function_feature.test b/tests/languages/pascaligo/function_feature.test
new file mode 100644
index 0000000..0d134c7
--- /dev/null
+++ b/tests/languages/pascaligo/function_feature.test
@@ -0,0 +1,23 @@
+somefunc()
+some_func()
+somefunc42()
+
+----------------------------------------------------
+
+[
+ ["function", "somefunc"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+
+ ["function", "some_func"],
+ ["punctuation", "("],
+ ["punctuation", ")"],
+
+ ["function", "somefunc42"],
+ ["punctuation", "("],
+ ["punctuation", ")"]
+]
+
+----------------------------------------------------
+
+Checks for functions.
\ No newline at end of file
diff --git a/tests/languages/pascaligo/keyword_feature.test b/tests/languages/pascaligo/keyword_feature.test
new file mode 100644
index 0000000..55f4ecf
--- /dev/null
+++ b/tests/languages/pascaligo/keyword_feature.test
@@ -0,0 +1,29 @@
+if while for
+return nil
+remove
+from else
+then skip
+with; is function
+var
+const type
+end begin block
+case of
+
+----------------------------------------------------
+
+[
+ ["keyword", "if"], ["keyword", "while"], ["keyword", "for"],
+ ["keyword", "return"], ["keyword", "nil"],
+ ["keyword", "remove"],
+ ["keyword", "from"], ["keyword", "else"],
+ ["keyword", "then"], ["keyword", "skip"],
+ ["keyword", "with"], ["punctuation", ";"], ["keyword", "is"], ["keyword", "function"],
+ ["keyword", "var"],
+ ["keyword", "const"], ["keyword", "type"],
+ ["keyword", "end"], ["keyword", "begin"], ["keyword", "block"],
+ ["keyword", "case"], ["keyword", "of"]
+]
+
+----------------------------------------------------
+
+Checks for all keywords.
diff --git a/tests/languages/pascaligo/number_feature.test b/tests/languages/pascaligo/number_feature.test
new file mode 100644
index 0000000..458cb14
--- /dev/null
+++ b/tests/languages/pascaligo/number_feature.test
@@ -0,0 +1,31 @@
+42
+3.14159
+2.1e4
+1.0e-1
+3.8e+24
+$7aff
+&17
+%11110101
+
+123n
+123mtz
+
+----------------------------------------------------
+
+[
+ ["number", "42"],
+ ["number", "3.14159"],
+ ["number", "2.1e4"],
+ ["number", "1.0e-1"],
+ ["number", "3.8e+24"],
+ ["number", "$7aff"],
+ ["number", "&17"],
+ ["number", "%11110101"],
+
+ ["number", "123n"],
+ ["number", "123mtz"]
+]
+
+----------------------------------------------------
+
+Checks for decimal, hexadecimal, octal and binary numbers.
diff --git a/tests/languages/pascaligo/operator_feature.test b/tests/languages/pascaligo/operator_feature.test
new file mode 100644
index 0000000..3b97c04
--- /dev/null
+++ b/tests/languages/pascaligo/operator_feature.test
@@ -0,0 +1,25 @@
+.. ** :=
+< << <= > >> >=
++ - * /
++= -= *= /=
+@ ^ = =/=
+-> |
+
+mod and or
+
+----------------------------------------------------
+
+[
+ ["operator", ".."], ["operator", "**"], ["operator", ":="],
+ ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="],
+ ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
+ ["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="],
+ ["operator", "@"], ["operator", "^"], ["operator", "="], ["operator", "=/="],
+ ["operator", "->"], ["operator", "|"],
+
+ ["operator", "mod"], ["operator", "and"], ["operator", "or"]
+]
+
+----------------------------------------------------
+
+Checks for operators.
diff --git a/tests/languages/pascaligo/string_feature.test b/tests/languages/pascaligo/string_feature.test
new file mode 100644
index 0000000..fc394d0
--- /dev/null
+++ b/tests/languages/pascaligo/string_feature.test
@@ -0,0 +1,28 @@
+'a'
+'ä'
+'本'
+'\t'
+'\xff'
+'\u12e4'
+
+"日本語"
+"\xff\u00FF"
+
+----------------------------------------------------
+
+[
+ ["string", "'a'"],
+ ["string", "'ä'"],
+ ["string", "'本'"],
+ ["string", "'\\t'"],
+ ["string", "'\\xff'"],
+ ["string", "'\\u12e4'"],
+
+
+ ["string", "\"日本語\""],
+ ["string", "\"\\xff\\u00FF\""]
+]
+
+----------------------------------------------------
+
+Checks for runes and strings.
diff --git a/tests/languages/pcaxis/boolean_feature.test b/tests/languages/pcaxis/boolean_feature.test
new file mode 100644
index 0000000..2c77d3f
--- /dev/null
+++ b/tests/languages/pcaxis/boolean_feature.test
@@ -0,0 +1,13 @@
+YES
+NO
+
+----------------------------------------------------
+
+[
+ ["boolean", "YES"],
+ ["boolean", "NO"]
+]
+
+----------------------------------------------------
+
+Checks for booleans.
diff --git a/tests/languages/pcaxis/keyword_feature.test b/tests/languages/pcaxis/keyword_feature.test
new file mode 100644
index 0000000..c5c6bf8
--- /dev/null
+++ b/tests/languages/pcaxis/keyword_feature.test
@@ -0,0 +1,76 @@
+FOO=0;
+FOO[en]=1;
+FOO("param")=0;
+FOO("param1","param2")=0;
+FOO-BAR[en]("param1","param2")=1;
+
+----------------------------------------------------
+
+[
+ ["keyword", [
+ ["keyword", "FOO"]
+ ]],
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+ ["keyword", [
+ ["keyword", "FOO"],
+ ["language", [
+ ["punctuation", "["],
+ ["property", "en"],
+ ["punctuation", "]"]
+ ]]
+ ]],
+ ["operator", "="],
+ ["number", "1"],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO"],
+ ["sub-key", [
+ ["punctuation", "("],
+ ["parameter", "\"param\""],
+ ["punctuation", ")"]
+ ]]
+ ]],
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO"],
+ ["sub-key", [
+ ["punctuation", "("],
+ ["parameter", "\"param1\""],
+ ["punctuation", ","],
+ ["parameter", "\"param2\""],
+ ["punctuation", ")"]
+ ]]
+ ]],
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO-BAR"],
+ ["language", [
+ ["punctuation", "["],
+ ["property", "en"],
+ ["punctuation", "]"]
+ ]],
+ ["sub-key", [
+ ["punctuation", "("],
+ ["parameter", "\"param1\""],
+ ["punctuation", ","],
+ ["parameter", "\"param2\""],
+ ["punctuation", ")"]
+ ]]
+ ]],
+ ["operator", "="],
+ ["number", "1"],
+ ["punctuation", ";"]
+]
+
+----------------------------------------------------
+
+Checks for keywords.
diff --git a/tests/languages/pcaxis/number_feature.test b/tests/languages/pcaxis/number_feature.test
new file mode 100644
index 0000000..898b383
--- /dev/null
+++ b/tests/languages/pcaxis/number_feature.test
@@ -0,0 +1,17 @@
+0
+123456789
+123.456
+0.123
+
+----------------------------------------------------
+
+[
+ ["number", "0"],
+ ["number", "123456789"],
+ ["number", "123.456"],
+ ["number", "0.123"]
+]
+
+----------------------------------------------------
+
+Checks for numbers.
diff --git a/tests/languages/pcaxis/string_feature.test b/tests/languages/pcaxis/string_feature.test
new file mode 100644
index 0000000..f432e68
--- /dev/null
+++ b/tests/languages/pcaxis/string_feature.test
@@ -0,0 +1,13 @@
+"foo ,; ()[] bar"
+""
+
+----------------------------------------------------
+
+[
+ ["string", "\"foo ,; ()[] bar\""],
+ ["string", "\"\""]
+]
+
+----------------------------------------------------
+
+Checks for strings.
diff --git a/tests/languages/pcaxis/tlist_feature.test b/tests/languages/pcaxis/tlist_feature.test
new file mode 100644
index 0000000..828a803
--- /dev/null
+++ b/tests/languages/pcaxis/tlist_feature.test
@@ -0,0 +1,72 @@
+FOO=TLIST(A1),"bar","baz";
+FOO=TLIST(A1);
+FOO=TLIST(A1,"bar","baz");
+FOO=TLIST(A1,"1"-"100");
+
+----------------------------------------------------
+
+[
+ ["keyword", [
+ ["keyword", "FOO"]
+ ]],
+ ["operator", "="],
+ ["tlist", [
+ ["function", "TLIST"],
+ ["punctuation", "("],
+ ["property", "A1"],
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ","],
+ ["string", "\"bar\""],
+ ["punctuation", ","],
+ ["string", "\"baz\""],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO"]
+ ]],
+ ["operator", "="],
+ ["tlist", [
+ ["function", "TLIST"],
+ ["punctuation", "("],
+ ["property", "A1"],
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO"]
+ ]],
+ ["operator", "="],
+ ["tlist", [
+ ["function", "TLIST"],
+ ["punctuation", "("],
+ ["property", "A1"],
+ ["punctuation", ","],
+ ["string", "\"bar\""],
+ ["punctuation", ","],
+ ["string", "\"baz\""],
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ";"],
+
+ ["keyword", [
+ ["keyword", "FOO"]
+ ]],
+ ["operator", "="],
+ ["tlist", [
+ ["function", "TLIST"],
+ ["punctuation", "("],
+ ["property", "A1"],
+ ["punctuation", ","],
+ ["string", "\"1\""],
+ ["operator", "-"],
+ ["string", "\"100\""],
+ ["punctuation", ")"]
+ ]],
+ ["punctuation", ";"]
+]
+
+----------------------------------------------------
+
+Checks for TLIST.
diff --git a/tests/languages/protobuf/annotation_feature.test b/tests/languages/protobuf/annotation_feature.test
new file mode 100644
index 0000000..ec68a55
--- /dev/null
+++ b/tests/languages/protobuf/annotation_feature.test
@@ -0,0 +1,20 @@
+int32 foo = 1 [deprecated=true];
+
+----------------------------------------------------
+
+[
+ ["builtin", "int32"],
+ " foo ",
+ ["operator", "="],
+ ["number", "1"],
+ ["punctuation", "["],
+ ["annotation", "deprecated"],
+ ["operator", "="],
+ ["boolean", "true"],
+ ["punctuation", "]"],
+ ["punctuation", ";"]
+]
+
+----------------------------------------------------
+
+Check for annotations.
diff --git a/tests/languages/protobuf/builtin_feature.test b/tests/languages/protobuf/builtin_feature.test
new file mode 100644
index 0000000..bf170b9
--- /dev/null
+++ b/tests/languages/protobuf/builtin_feature.test
@@ -0,0 +1,39 @@
+double
+float
+int32
+int64
+uint32
+uint64
+sint32
+sint64
+fixed32
+fixed64
+sfixed32
+sfixed64
+bool
+string
+bytes
+
+----------------------------------------------------
+
+[
+ ["builtin", "double"],
+ ["builtin", "float"],
+ ["builtin", "int32"],
+ ["builtin", "int64"],
+ ["builtin", "uint32"],
+ ["builtin", "uint64"],
+ ["builtin", "sint32"],
+ ["builtin", "sint64"],
+ ["builtin", "fixed32"],
+ ["builtin", "fixed64"],
+ ["builtin", "sfixed32"],
+ ["builtin", "sfixed64"],
+ ["builtin", "bool"],
+ ["builtin", "string"],
+ ["builtin", "bytes"]
+]
+
+----------------------------------------------------
+
+Check for builtin types.
diff --git a/tests/languages/protobuf/class-name_feature.test b/tests/languages/protobuf/class-name_feature.test
new file mode 100644
index 0000000..5f0ffb7
--- /dev/null
+++ b/tests/languages/protobuf/class-name_feature.test
@@ -0,0 +1,102 @@
+syntax = "proto2";
+syntax = "proto3";
+
+option java_multiple_files = true;
+
+import public "new.proto";
+import "other.proto";
+
+enum Foo {}
+extend Foo {}
+service Foo {}
+message Foo {
+ Bar Bar = 0;
+ foo.Bar Bar2 = 0;
+ .baz.Bar Bar3 = 0;
+}
+
+----------------------------------------------------
+
+[
+ ["keyword", "syntax"],
+ ["operator", "="],
+ ["string", "\"proto2\""],
+ ["punctuation", ";"],
+
+ ["keyword", "syntax"],
+ ["operator", "="],
+ ["string", "\"proto3\""],
+ ["punctuation", ";"],
+
+
+ ["keyword", "option"],
+ " java_multiple_files ",
+ ["operator", "="],
+ ["boolean", "true"],
+ ["punctuation", ";"],
+
+
+ ["keyword", "import"],
+ ["keyword", "public"],
+ ["string", "\"new.proto\""],
+ ["punctuation", ";"],
+
+ ["keyword", "import"],
+ ["string", "\"other.proto\""],
+ ["punctuation", ";"],
+
+
+ ["keyword", "enum"],
+ ["class-name", "Foo"],
+ ["punctuation", "{"],
+ ["punctuation", "}"],
+
+ ["keyword", "extend"],
+ ["class-name", "Foo"],
+ ["punctuation", "{"],
+ ["punctuation", "}"],
+
+ ["keyword", "service"],
+ ["class-name", "Foo"],
+ ["punctuation", "{"],
+ ["punctuation", "}"],
+
+ ["keyword", "message"],
+ ["class-name", "Foo"],
+ ["punctuation", "{"],
+
+ ["positional-class-name", [
+ "Bar"
+ ]],
+ " Bar ",
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+
+ ["positional-class-name", [
+ "foo",
+ ["punctuation", "."],
+ "Bar"
+ ]],
+ " Bar2 ",
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+
+ ["positional-class-name", [
+ ["punctuation", "."],
+ "baz",
+ ["punctuation", "."],
+ "Bar"
+ ]],
+ " Bar3 ",
+ ["operator", "="],
+ ["number", "0"],
+ ["punctuation", ";"],
+
+ ["punctuation", "}"]
+]
+
+----------------------------------------------------
+
+Check for class names
diff --git a/tests/languages/protobuf/keyword_feature.test b/tests/languages/protobuf/keyword_feature.test
index eabe71e..1272833 100644
--- a/tests/languages/protobuf/keyword_feature.test
+++ b/tests/languages/protobuf/keyword_feature.test
@@ -1,40 +1,41 @@
-message Point {
- required int32 x = 1;
- required int32 y = 2;
- optional string label = 3;
-}
+enum
+extend
+extensions
+import
+message
+oneof
+option
+optional
+package
+public
+repeated
+required
+reserved
+service
+syntax
+to
----------------------------------------------------
[
+ ["keyword", "enum"],
+ ["keyword", "extend"],
+ ["keyword", "extensions"],
+ ["keyword", "import"],
["keyword", "message"],
- " Point ",
- ["punctuation", "{"],
-
- ["builtin", "required"],
- ["primitive", "int32"],
- " x ",
- ["operator", "="],
- ["number", "1"],
- ["punctuation", ";"],
-
- ["builtin", "required"],
- ["primitive", "int32"],
- " y ",
- ["operator", "="],
- ["number", "2"],
- ["punctuation", ";"],
-
- ["builtin", "optional"],
- ["primitive", "string"],
- " label ",
- ["operator", "="],
- ["number", "3"],
- ["punctuation", ";"],
-
- ["punctuation", "}"]
+ ["keyword", "oneof"],
+ ["keyword", "option"],
+ ["keyword", "optional"],
+ ["keyword", "package"],
+ ["keyword", "public"],
+ ["keyword", "repeated"],
+ ["keyword", "required"],
+ ["keyword", "reserved"],
+ ["keyword", "service"],
+ ["keyword", "syntax"],
+ ["keyword", "to"]
]
----------------------------------------------------
-Check for keywords and builtins
\ No newline at end of file
+Check for keywords
diff --git a/tests/languages/protobuf/map_feature.test b/tests/languages/protobuf/map_feature.test
new file mode 100644
index 0000000..94a54f6
--- /dev/null
+++ b/tests/languages/protobuf/map_feature.test
@@ -0,0 +1,23 @@
+map<string, .foo.Foo> bar;
+
+----------------------------------------------------
+
+[
+ ["map", [
+ "map",
+ ["punctuation", "<"],
+ ["builtin", "string"],
+ ["punctuation", ","],
+ ["punctuation", "."],
+ "foo",
+ ["punctuation", "."],
+ "Foo",
+ ["punctuation", ">"]
+ ]],
+ " bar",
+ ["punctuation", ";"]
+]
+
+----------------------------------------------------
+
+Check for maps.
diff --git a/tests/languages/protobuf/string_feature.test b/tests/languages/protobuf/string_feature.test
index 3d2b45c..8929696 100644
--- a/tests/languages/protobuf/string_feature.test
+++ b/tests/languages/protobuf/string_feature.test
@@ -20,4 +20,4 @@
----------------------------------------------------
-Checks for single-quoted and double-quoted strings.
\ No newline at end of file
+Checks for single-quoted and double-quoted strings.
diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test
index dfd7dcc..bdd2af4 100644
--- a/tests/languages/scheme/number_feature.test
+++ b/tests/languages/scheme/number_feature.test
@@ -1,5 +1,6 @@
(foo 42)
(foo 3.14159)
+(foo 8/3)
(foo 3+4i)
(foo 2.5+0.0i)
(foo 3+0i)
@@ -9,6 +10,7 @@
[
["punctuation", "("], ["function", "foo"], ["number", "42"], ["punctuation", ")"],
["punctuation", "("], ["function", "foo"], ["number", "3.14159"], ["punctuation", ")"],
+ ["punctuation", "("], ["function", "foo"], ["number", "8/3"], ["punctuation", ")"],
["punctuation", "("], ["function", "foo"], ["number", "3+4i"], ["punctuation", ")"],
["punctuation", "("], ["function", "foo"], ["number", "2.5+0.0i"], ["punctuation", ")"],
["punctuation", "("], ["function", "foo"], ["number", "3+0i"], ["punctuation", ")"]
@@ -16,4 +18,4 @@
----------------------------------------------------
-Checks for numbers and complex numbers.
\ No newline at end of file
+Checks for numbers, rational numbers, and complex numbers.
diff --git a/tests/languages/splunk-spl/comment_feature.test b/tests/languages/splunk-spl/comment_feature.test
new file mode 100644
index 0000000..f4688d1
--- /dev/null
+++ b/tests/languages/splunk-spl/comment_feature.test
@@ -0,0 +1,16 @@
+`comment("This is a comment")`
+`comment("This is too
+but on more than one line")`
+`comment("| stats sum(b) BY index")`
+
+----------------------------------------------------
+
+[
+ ["comment", "`comment(\"This is a comment\")`"],
+ ["comment", "`comment(\"This is too\r\nbut on more than one line\")`"],
+ ["comment", "`comment(\"| stats sum(b) BY index\")`"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
diff --git a/tests/languages/splunk-spl/date_feature.test b/tests/languages/splunk-spl/date_feature.test
new file mode 100644
index 0000000..1f46852
--- /dev/null
+++ b/tests/languages/splunk-spl/date_feature.test
@@ -0,0 +1,13 @@
+1/1/1970
+12/31/1999:23:59:59
+
+----------------------------------------------------
+
+[
+ ["date", "1/1/1970"],
+ ["date", "12/31/1999:23:59:59"]
+]
+
+----------------------------------------------------
+
+Checks for dates.
diff --git a/tests/languages/splunk-spl/keyword_feature.test b/tests/languages/splunk-spl/keyword_feature.test
new file mode 100644
index 0000000..ad8f326
--- /dev/null
+++ b/tests/languages/splunk-spl/keyword_feature.test
@@ -0,0 +1,303 @@
+abstract
+accum
+addcoltotals
+addinfo
+addtotals
+analyzefields
+anomalies
+anomalousvalue
+anomalydetection
+append
+appendcols
+appendcsv
+appendlookup
+appendpipe
+arules
+associate
+audit
+autoregress
+bin
+bucket
+bucketdir
+chart
+cluster
+cofilter
+collect
+concurrency
+contingency
+convert
+correlate
+datamodel
+dbinspect
+dedup
+delete
+delta
+diff
+erex
+eval
+eventcount
+eventstats
+extract
+fieldformat
+fields
+fieldsummary
+filldown
+fillnull
+findtypes
+folderize
+foreach
+format
+from
+gauge
+gentimes
+geom
+geomfilter
+geostats
+head
+highlight
+history
+iconify
+input
+inputcsv
+inputlookup
+iplocation
+join
+kmeans
+kv
+kvform
+loadjob
+localize
+localop
+lookup
+makecontinuous
+makemv
+makeresults
+map
+mcollect
+metadata
+metasearch
+meventcollect
+mstats
+multikv
+multisearch
+mvcombine
+mvexpand
+nomv
+outlier
+outputcsv
+outputlookup
+outputtext
+overlap
+pivot
+predict
+rangemap
+rare
+regex
+relevancy
+reltime
+rename
+replace
+rest
+return
+reverse
+rex
+rtorder
+run
+savedsearch
+script
+scrub
+search
+searchtxn
+selfjoin
+sendemail
+set
+setfields
+sichart
+sirare
+sistats
+sitimechart
+sitop
+sort
+spath
+stats
+strcat
+streamstats
+table
+tags
+tail
+timechart
+timewrap
+top
+transaction
+transpose
+trendline
+tscollect
+tstats
+typeahead
+typelearner
+typer
+union
+uniq
+untable
+where
+x11
+xmlkv
+xmlunescape
+xpath
+xyseries
+
+----------------------------------------------------
+
+[
+ ["keyword", "abstract"],
+ ["keyword", "accum"],
+ ["keyword", "addcoltotals"],
+ ["keyword", "addinfo"],
+ ["keyword", "addtotals"],
+ ["keyword", "analyzefields"],
+ ["keyword", "anomalies"],
+ ["keyword", "anomalousvalue"],
+ ["keyword", "anomalydetection"],
+ ["keyword", "append"],
+ ["keyword", "appendcols"],
+ ["keyword", "appendcsv"],
+ ["keyword", "appendlookup"],
+ ["keyword", "appendpipe"],
+ ["keyword", "arules"],
+ ["keyword", "associate"],
+ ["keyword", "audit"],
+ ["keyword", "autoregress"],
+ ["keyword", "bin"],
+ ["keyword", "bucket"],
+ ["keyword", "bucketdir"],
+ ["keyword", "chart"],
+ ["keyword", "cluster"],
+ ["keyword", "cofilter"],
+ ["keyword", "collect"],
+ ["keyword", "concurrency"],
+ ["keyword", "contingency"],
+ ["keyword", "convert"],
+ ["keyword", "correlate"],
+ ["keyword", "datamodel"],
+ ["keyword", "dbinspect"],
+ ["keyword", "dedup"],
+ ["keyword", "delete"],
+ ["keyword", "delta"],
+ ["keyword", "diff"],
+ ["keyword", "erex"],
+ ["keyword", "eval"],
+ ["keyword", "eventcount"],
+ ["keyword", "eventstats"],
+ ["keyword", "extract"],
+ ["keyword", "fieldformat"],
+ ["keyword", "fields"],
+ ["keyword", "fieldsummary"],
+ ["keyword", "filldown"],
+ ["keyword", "fillnull"],
+ ["keyword", "findtypes"],
+ ["keyword", "folderize"],
+ ["keyword", "foreach"],
+ ["keyword", "format"],
+ ["keyword", "from"],
+ ["keyword", "gauge"],
+ ["keyword", "gentimes"],
+ ["keyword", "geom"],
+ ["keyword", "geomfilter"],
+ ["keyword", "geostats"],
+ ["keyword", "head"],
+ ["keyword", "highlight"],
+ ["keyword", "history"],
+ ["keyword", "iconify"],
+ ["keyword", "input"],
+ ["keyword", "inputcsv"],
+ ["keyword", "inputlookup"],
+ ["keyword", "iplocation"],
+ ["keyword", "join"],
+ ["keyword", "kmeans"],
+ ["keyword", "kv"],
+ ["keyword", "kvform"],
+ ["keyword", "loadjob"],
+ ["keyword", "localize"],
+ ["keyword", "localop"],
+ ["keyword", "lookup"],
+ ["keyword", "makecontinuous"],
+ ["keyword", "makemv"],
+ ["keyword", "makeresults"],
+ ["keyword", "map"],
+ ["keyword", "mcollect"],
+ ["keyword", "metadata"],
+ ["keyword", "metasearch"],
+ ["keyword", "meventcollect"],
+ ["keyword", "mstats"],
+ ["keyword", "multikv"],
+ ["keyword", "multisearch"],
+ ["keyword", "mvcombine"],
+ ["keyword", "mvexpand"],
+ ["keyword", "nomv"],
+ ["keyword", "outlier"],
+ ["keyword", "outputcsv"],
+ ["keyword", "outputlookup"],
+ ["keyword", "outputtext"],
+ ["keyword", "overlap"],
+ ["keyword", "pivot"],
+ ["keyword", "predict"],
+ ["keyword", "rangemap"],
+ ["keyword", "rare"],
+ ["keyword", "regex"],
+ ["keyword", "relevancy"],
+ ["keyword", "reltime"],
+ ["keyword", "rename"],
+ ["keyword", "replace"],
+ ["keyword", "rest"],
+ ["keyword", "return"],
+ ["keyword", "reverse"],
+ ["keyword", "rex"],
+ ["keyword", "rtorder"],
+ ["keyword", "run"],
+ ["keyword", "savedsearch"],
+ ["keyword", "script"],
+ ["keyword", "scrub"],
+ ["keyword", "search"],
+ ["keyword", "searchtxn"],
+ ["keyword", "selfjoin"],
+ ["keyword", "sendemail"],
+ ["keyword", "set"],
+ ["keyword", "setfields"],
+ ["keyword", "sichart"],
+ ["keyword", "sirare"],
+ ["keyword", "sistats"],
+ ["keyword", "sitimechart"],
+ ["keyword", "sitop"],
+ ["keyword", "sort"],
+ ["keyword", "spath"],
+ ["keyword", "stats"],
+ ["keyword", "strcat"],
+ ["keyword", "streamstats"],
+ ["keyword", "table"],
+ ["keyword", "tags"],
+ ["keyword", "tail"],
+ ["keyword", "timechart"],
+ ["keyword", "timewrap"],
+ ["keyword", "top"],
+ ["keyword", "transaction"],
+ ["keyword", "transpose"],
+ ["keyword", "trendline"],
+ ["keyword", "tscollect"],
+ ["keyword", "tstats"],
+ ["keyword", "typeahead"],
+ ["keyword", "typelearner"],
+ ["keyword", "typer"],
+ ["keyword", "union"],
+ ["keyword", "uniq"],
+ ["keyword", "untable"],
+ ["keyword", "where"],
+ ["keyword", "x11"],
+ ["keyword", "xmlkv"],
+ ["keyword", "xmlunescape"],
+ ["keyword", "xpath"],
+ ["keyword", "xyseries"]
+]
+
+----------------------------------------------------
+
+Checks for keywords.
diff --git a/tests/languages/splunk-spl/number_feature.test b/tests/languages/splunk-spl/number_feature.test
new file mode 100644
index 0000000..395693c
--- /dev/null
+++ b/tests/languages/splunk-spl/number_feature.test
@@ -0,0 +1,13 @@
+123
+123.456
+
+----------------------------------------------------
+
+[
+ ["number", "123"],
+ ["number", "123.456"]
+]
+
+----------------------------------------------------
+
+Checks for numbers.
diff --git a/tests/languages/splunk-spl/operator_feature.test b/tests/languages/splunk-spl/operator_feature.test
new file mode 100644
index 0000000..5127424
--- /dev/null
+++ b/tests/languages/splunk-spl/operator_feature.test
@@ -0,0 +1,44 @@
+=
+== >= <= > <
++ - * / %
+|
+
+and not or xor AND NOT OR XOR
+as by AS BY
+
+----------------------------------------------------
+
+[
+ ["operator", "="],
+
+ ["operator", "=="],
+ ["operator", ">="],
+ ["operator", "<="],
+ ["operator", ">"],
+ ["operator", "<"],
+
+ ["operator", "+"],
+ ["operator", "-"],
+ ["operator", "*"],
+ ["operator", "/"],
+ ["operator", "%"],
+ ["operator", "|"],
+
+ ["operator-word", "and"],
+ ["operator-word", "not"],
+ ["operator-word", "or"],
+ ["operator-word", "xor"],
+ ["operator-word", "AND"],
+ ["operator-word", "NOT"],
+ ["operator-word", "OR"],
+ ["operator-word", "XOR"],
+
+ ["operator-word", "as"],
+ ["operator-word", "by"],
+ ["operator-word", "AS"],
+ ["operator-word", "BY"]
+]
+
+----------------------------------------------------
+
+Checks for operators.
diff --git a/tests/languages/splunk-spl/string_feature.test b/tests/languages/splunk-spl/string_feature.test
new file mode 100644
index 0000000..10ab3aa
--- /dev/null
+++ b/tests/languages/splunk-spl/string_feature.test
@@ -0,0 +1,13 @@
+"foo"
+"\"foo\""
+
+----------------------------------------------------
+
+[
+ ["string", "\"foo\""],
+ ["string", "\"\\\"foo\\\"\""]
+]
+
+----------------------------------------------------
+
+Checks for strings.
diff --git a/tests/languages/visual-basic/string_feature.test b/tests/languages/visual-basic/string_feature.test
index 8d2a91b..011d435 100644
--- a/tests/languages/visual-basic/string_feature.test
+++ b/tests/languages/visual-basic/string_feature.test
@@ -12,6 +12,7 @@ bar”
"Foo”“ba
r"
"a"c
+$"Foobar"
----------------------------------------------------
@@ -27,7 +28,8 @@ r"
["string", "”“"],
["string", "“\""],
["string", "\"Foo”“ba\r\nr\""],
- ["string", "\"a\"c"]
+ ["string", "\"a\"c"],
+ ["string", "$\"Foobar\""]
]
----------------------------------------------------
diff --git a/themes/prism-funky.css b/themes/prism-funky.css
index 2eda0b0..55b3255 100644
--- a/themes/prism-funky.css
+++ b/themes/prism-funky.css
@@ -84,7 +84,7 @@ code[class*="language-"] {
.token.entity,
.token.url,
.language-css .token.string,
-.toke.variable,
+.token.variable,
.token.inserted {
color: yellowgreen;
}