diff --git a/.gitignore b/.gitignore index c91a56b6bc..9fdf53235c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -.DS_Store -*.txt +.DS_Store +*.txt +!tencent13147342467085209222.txt +desktop.ini \ No newline at end of file diff --git a/BOOKLIST.md b/BOOKLIST.md deleted file mode 100644 index e88ba70625..0000000000 --- a/BOOKLIST.md +++ /dev/null @@ -1,82 +0,0 @@ -# 数据结构与算法 - -- [算法](https://book.douban.com/subject/19952400/) -- [数据结构与算法分析](https://book.douban.com/subject/3351237/) -- [编程珠玑](https://book.douban.com/subject/3227098/) -- [剑指 Offer](https://book.douban.com/subject/25910559/) - -# 操作系统 - -- [现代操作系统](https://book.douban.com/subject/3852290/) -- [深入理解计算机系统](https://book.douban.com/subject/26912767/) -- [鸟哥的 Linux 私房菜](https://book.douban.com/subject/4889838/) -- [Unix 环境高级编程](https://book.douban.com/subject/25900403/) -- [Unix/Linux 编程实践教程](https://book.douban.com/subject/1219329/) -- [Operating Systems: Three Easy Pieces (OSTEP)](http://pages.cs.wisc.edu/~remzi/OSTEP/) - -# 计算机网络 - -- [计算机网络](https://book.douban.com/subject/2970300/) -- [计算机网络 自顶向下方法](https://book.douban.com/subject/1391207/) -- [图解 HTTP](https://book.douban.com/subject/25863515/) -- [TCP/IP 详解 卷 1:协议](https://book.douban.com/subject/1088054/) -- [UNIX 网络编程](https://book.douban.com/subject/1500149/) -- [Linux 多线程服务端编程](https://book.douban.com/subject/20471211/) - -# 面向对象 - -- [Head First 设计模式](https://book.douban.com/subject/2243615/) -- [设计模式 可复用面向对象软件的基础](https://book.douban.com/subject/1052241/) -- [敏捷软件开发 原则、模式与实践](https://book.douban.com/subject/1140457/) - -# 数据库 - -- [数据库系统概念](https://book.douban.com/subject/10548379/) -- [MySQL 必知必会](https://book.douban.com/subject/3354490/) -- [高性能 MySQL](https://book.douban.com/subject/23008813/) -- [Redis 设计与实现](https://book.douban.com/subject/25900156/) -- [Redis 实战](https://book.douban.com/subject/26612779/) - -# Java - -- [Java 编程思想](https://book.douban.com/subject/2130190/) -- [Effective java 中文版](https://book.douban.com/subject/3360807/) -- [深入理解 Java 虚拟机](https://book.douban.com/subject/24722612/) -- [Java 并发编程实战](https://book.douban.com/subject/10484692/) -- [精通 Spring 4.x](https://book.douban.com/subject/26952826/) -- [Spring 揭秘](https://book.douban.com/subject/3897837/) - -# C++ - -- [C++ Primer](https://book.douban.com/subject/25708312/) -- [Effective C++](https://book.douban.com/subject/1842426/) -- [C++ 编程规范](https://book.douban.com/subject/1480481/) -- [STL 源码剖析](https://book.douban.com/subject/1110934/) -- [深度探索 C++ 对象模型](https://book.douban.com/subject/1091086/) - -# 系统设计 - -- [大规模分布式存储系统](https://book.douban.com/subject/25723658/) -- [从 Paxos 到 Zookeeper](https://book.douban.com/subject/26292004/) -- [大型网站系统与 Java 中间件开发实践](https://book.douban.com/subject/25867042/) -- [淘宝技术这十年](https://book.douban.com/subject/24335672/) -- [深入理解 Nginx](https://book.douban.com/subject/22793675/) - -# 开发工具 - -- [Pro Git](https://git-scm.com/book/zh/v2) -- [正则表达式必知必会](https://book.douban.com/subject/2269648/) - -# 编码实践 - -- [重构](https://book.douban.com/subject/4262627/) -- [代码大全](https://book.douban.com/subject/1477390/) -- [人月神话](https://book.douban.com/subject/1102259/) -- [程序员的职业素养](https://book.douban.com/subject/11614538/) -- [编写可读代码的艺术](https://book.douban.com/subject/10797189/) - -# 其它 - -- [JavaScript 语言精粹](https://book.douban.com/subject/3590768/) -- [利用 Python 进行数据分析](https://book.douban.com/subject/25779298/) -- [概率论与数理统计](https://book.douban.com/subject/2201479/) diff --git a/README.md b/README.md index 258fa75d1f..e7c9e6eecb 100644 --- a/README.md +++ b/README.md @@ -1,241 +1,142 @@ -| Ⅰ | Ⅱ | Ⅲ | Ⅳ | Ⅴ | Ⅵ | Ⅶ | Ⅷ | Ⅸ | Ⅹ | -| :--------: | :---------: | :---------: | :---------: | :---------: | :---------:| :---------: | :-------: | :-------:| :------:| -| 算法[:pencil2:](#pencil2-算法) | 操作系统[:computer:](#computer-操作系统)|网络[:cloud:](#cloud-网络) | 面向对象[:couple:](#couple-面向对象) |数据库[:floppy_disk:](#floppy_disk-数据库)| Java [:coffee:](#coffee-java)| 系统设计[:bulb:](#bulb-系统设计)| 工具[:hammer:](#hammer-工具)| 编码实践[:speak_no_evil:](#speak_no_evil-编码实践)| 后记[:memo:](#memo-后记) | - -
- -
- -
- -
- -### :pencil2: 算法 - -- [剑指 Offer 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/剑指%20offer%20题解.md) - - 目录根据原书第二版进行编排,代码和原书有所不同,尽量比原书更简洁。 - -- [Leetcode 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode%20题解.md) - - 对题目做了一个大致分类,并对每种题型的解题思路做了总结。 - - - [算法](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/算法.md) - - 排序、并查集、栈和队列、红黑树、散列表。 - -### :computer: 操作系统 - -- [计算机操作系统](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机操作系统.md) - - 进程管理、内存管理、设备管理、链接。 - -- [Linux](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Linux.md) - - 基本实现原理以及基本操作。 - -### :cloud: 网络 - -- [计算机网络](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/计算机网络.md) - - 物理层、链路层、网络层、运输层、应用层。 - -- [HTTP](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/HTTP.md) - - 方法、状态码、Cookie、缓存、连接管理、HTTPs、HTTP 2.0。 - -- [Socket](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Socket.md) - - I/O 模型、I/O 多路复用。 - -### :couple: 面向对象 - -- [设计模式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/设计模式.md) - - 实现了 Gof 的 23 种设计模式。 - -- [面向对象思想](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/面向对象思想.md) - - 三大原则(继承、封装、多态)、类图、设计原则。 - -### :floppy_disk: 数据库 - -- [数据库系统原理](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/数据库系统原理.md) - - 事务、锁、隔离级别、MVCC、间隙锁、范式。 - -- [SQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/SQL.md) - - SQL 基本语法。 - -- [Leetcode-Database 题解](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Leetcode-Database%20题解.md) - - Leetcode 上数据库题目的解题记录。 - -- [MySQL](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/MySQL.md) - - 存储引擎、索引、查询优化、切分、复制。 - -- [Redis](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Redis.md) - - 五种数据类型、字典和跳跃表数据结构、使用场景、和 Memcache 的比较、淘汰策略、持久化、文件事件的 Reactor 模式、复制。 - -### :coffee: Java - -- [Java 基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20基础.md) - - 不会涉及很多基本语法介绍,主要是一些实现原理以及关键特性。 - -- [Java 容器](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20容器.md) - - 源码分析:ArrayList、Vector、CopyOnWriteArrayList、LinkedList、HashMap、ConcurrentHashMap、LinkedHashMap、WeekHashMap。 - -- [Java 并发](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20并发.md) - - 线程使用方式、两种互斥同步方法、线程协作、JUC、线程安全、内存模型、锁优化。 - -- [Java 虚拟机](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20虚拟机.md) - - 运行时数据区域、垃圾收集、类加载。 - -- [Java I/O](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Java%20IO.md) - - NIO 的原理以及实例。 - -### :bulb: 系统设计 - -- [系统设计基础](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/系统设计基础.md) - - 性能、伸缩性、扩展性、可用性、安全性 - -- [分布式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/分布式.md) - - 分布式锁、分布式事务、CAP、BASE、Paxos、Raft - -- [集群](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/集群.md) - - 负载均衡、Session 管理 - -- [攻击技术](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/攻击技术.md) - - XSS、CSRF、SQL 注入、DDoS - -- [缓存](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/缓存.md) - - 缓存特征、缓存位置、缓存问题、数据分布、一致性哈希、LRU、CDN - -- [消息队列](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/消息队列.md) - - 消息处理模型、使用场景、可靠性 - -### :hammer: 工具 - -- [Git](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Git.md) - - 一些 Git 的使用和概念。 - -- [Docker](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/Docker.md) - - Docker 基本原理。 - -- [正则表达式](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/正则表达式.md) - - 正则表达式基本语法。 - -- [构建工具](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/构建工具.md) - - 构建工具的基本概念、主流构建工具介绍。 - -### :speak_no_evil: 编码实践 - -- [重构](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/重构.md) - - 参考 重构 改善既有代码的设计。 - -- [代码可读性](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码可读性.md) - - 参考 编写可读代码的艺术。 - -- [代码风格规范](https://github.com/CyC2018/InnterviewNotes/blob/master/notes/代码风格规范.md) - - Google 开源项目的代码风格规范。 - -### :memo: 后记 - -#### About - -本仓库主要是根据计算机经典书籍以及官方技术文档进行总结的学习笔记,希望对大家有所帮助。 - -学习笔记不是从网上到处拼凑而来,除了少部分引用书上和技术文档的原文,其余都是笔者的原创。在您引用本仓库内容或者对内容进行修改演绎时,请遵循文末的开源协议,谢谢。 - -#### BookList - -本仓库参考的书目:[BOOKLIST](https://github.com/CyC2018/Interview-Notebook/blob/master/BOOKLIST.md)。 - -#### How To Contribute - -笔记内容是笔者一个字一个字打上去的,难免会有一些笔误,如果发现笔误可直接对相应文档进行编辑修改。 - -如果想要提交一个仓库现在还没有的全新内容,可以先将相应的文档放到 other 目录下。 - -欢迎在 Issue 中提交对本仓库的改进建议~ - -#### Typesetting - -笔记内容按照 [中文文案排版指北](http://mazhuang.org/wiki/chinese-copywriting-guidelines/) 进行排版,以保证内容的可读性。 - -笔记不使用 `![]()` 这种方式来引用图片,而是用 `` 标签。一方面是为了能够控制图片以合适的大小显示,另一方面是因为 GFM 不支持 `
![]()
` 让图片居中显示,只能使用 `
` 达到居中的效果。 - -笔者将自己实现的文档排版功能提取出来,放在 Github Page 中,无需下载安装即可免费使用:[Text-Typesetting](https://github.com/CyC2018/Markdown-Typesetting)。 - -#### Uploading - -笔者在本地使用为知笔记软件进行书写,为了方便将本地笔记内容上传到 Github 上,实现了一整套自动化上传方案,包括文本文件的导出、提取图片、Markdown 文档转换、Git 同步。 - -进行 Markdown 文档转换是因为 Github 使用的 GFM 不支持 MathJax 公式和 TOC 标记,所以需要替换 MathJax 公式为 CodeCogs 的云服务和重新生成 TOC 目录。 - -笔者将自己实现文档转换功能提取出来,方便大家在需要将本地 Markdown 上传到 Github,或者制作项目 README 文档时生成目录时使用:[GFM-Converter](https://github.com/CyC2018/GFM-Converter)。 - -#### Logo - -Power by [logomakr](https://logomakr.com/). - -#### Statement - -本仓库不参与商业行为,不向读者收取任何费用。(This repository is not engaging in business activities, and does not charge readers any fee.) - -#### Acknowledgements - -感谢以下人员对本仓库做出的贡献,当然不仅仅只有这些贡献者,这里就不一一列举了。如果你希望被添加到这个名单中,并且提交过 Issue 或者 PR,请与笔者联系。 - - -​ - - -​ - - -​ - - -​ - - -​ - - -​ - - -​ - - -​ - - -#### License - -在对本作品进行演绎时,请署名并以相同方式共享。 - -知识共享许可协议 - +
+ + + + + + +
+
+ +| 算法  | 操作系统 | 网络 |面向对象|  数据库  | Java  |系统设计|   工具   |编码实践|   后记   | +| :---: | :----: | :---: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | +| [:pencil2:](#pencil2-算法) | [:computer:](#computer-操作系统) | [:cloud:](#cloud-网络) | [:art:](#art-面向对象) | [:floppy_disk:](#floppy_disk-数据库) |[:coffee:](#coffee-java)| [:bulb:](#bulb-系统设计) |[:wrench:](#wrench-工具)| [:watermelon:](#watermelon-编码实践) |[:memo:](#memo-后记)| + +
+ +
+ +
+ +
+ +## :pencil2: 算法 + +- [剑指 Offer 题解](https://github.com/CyC2018/CS-Notes/blob/master/notes/剑指%20Offer%20题解%20-%20目录.md) +- [Leetcode 题解](https://github.com/CyC2018/CS-Notes/blob/master/notes/Leetcode%20题解%20-%20目录.md) +- [算法](https://github.com/CyC2018/CS-Notes/blob/master/notes/算法%20-%20目录.md) +- [字节跳动内推](assets/内推.md) + +## :computer: 操作系统 + +- [计算机操作系统](https://github.com/CyC2018/CS-Notes/blob/master/notes/计算机操作系统%20-%20目录.md) +- [Linux](https://github.com/CyC2018/CS-Notes/blob/master/notes/Linux.md) + +## :cloud: 网络 + +- [计算机网络](https://github.com/CyC2018/CS-Notes/blob/master/notes/计算机网络%20-%20目录.md) +- [HTTP](https://github.com/CyC2018/CS-Notes/blob/master/notes/HTTP.md) +- [Socket](https://github.com/CyC2018/CS-Notes/blob/master/notes/Socket.md) + +## :floppy_disk: 数据库 + +- [数据库系统原理](https://github.com/CyC2018/CS-Notes/blob/master/notes/数据库系统原理.md) +- [SQL 语法](https://github.com/CyC2018/CS-Notes/blob/master/notes/SQL%20语法.md) +- [SQL 练习](https://github.com/CyC2018/CS-Notes/blob/master/notes/SQL%20练习.md) +- [MySQL](https://github.com/CyC2018/CS-Notes/blob/master/notes/MySQL.md) +- [Redis](https://github.com/CyC2018/CS-Notes/blob/master/notes/Redis.md) + +## :coffee: Java + +- [Java 基础](https://github.com/CyC2018/CS-Notes/blob/master/notes/Java%20基础.md) +- [Java 容器](https://github.com/CyC2018/CS-Notes/blob/master/notes/Java%20容器.md) +- [Java 并发](https://github.com/CyC2018/CS-Notes/blob/master/notes/Java%20并发.md) +- [Java 虚拟机](https://github.com/CyC2018/CS-Notes/blob/master/notes/Java%20虚拟机.md) +- [Java I/O](https://github.com/CyC2018/CS-Notes/blob/master/notes/Java%20IO.md) + +## :bulb: 系统设计 + +- [系统设计基础](https://github.com/CyC2018/CS-Notes/blob/master/notes/系统设计基础.md) +- [分布式](https://github.com/CyC2018/CS-Notes/blob/master/notes/分布式.md) +- [集群](https://github.com/CyC2018/CS-Notes/blob/master/notes/集群.md) +- [攻击技术](https://github.com/CyC2018/CS-Notes/blob/master/notes/攻击技术.md) +- [缓存](https://github.com/CyC2018/CS-Notes/blob/master/notes/缓存.md) +- [消息队列](https://github.com/CyC2018/CS-Notes/blob/master/notes/消息队列.md) + +## :art: 面向对象 + +- [面向对象思想](https://github.com/CyC2018/CS-Notes/blob/master/notes/面向对象思想.md) +- [设计模式](https://github.com/CyC2018/CS-Notes/blob/master/notes/设计模式%20-%20目录.md) + +## :wrench: 工具 + +- [Git](https://github.com/CyC2018/CS-Notes/blob/master/notes/Git.md) +- [Docker](https://github.com/CyC2018/CS-Notes/blob/master/notes/Docker.md) +- [构建工具](https://github.com/CyC2018/CS-Notes/blob/master/notes/构建工具.md) +- [正则表达式](https://github.com/CyC2018/CS-Notes/blob/master/notes/正则表达式.md) + +## :watermelon: 编码实践 + +- [代码可读性](https://github.com/CyC2018/CS-Notes/blob/master/notes/代码可读性.md) +- [代码风格规范](https://github.com/CyC2018/CS-Notes/blob/master/notes/代码风格规范.md) + +## :memo: 后记 + +### 排版 + +笔记内容按照 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines/blob/master/README.zh-CN.md) 进行排版,以保证内容的可读性。 + +不使用 `![]()` 这种方式来引用图片,而是用 `` 标签。一方面是为了能够控制图片以合适的大小显示,另一方面是因为 [GFM](https://github.github.com/gfm/) 不支持 `
![]()
` 这种方法让图片居中显示,只能使用 `
` 达到居中的效果。 + +在线排版工具:[Text-Typesetting](https://github.com/CyC2018/Text-Typesetting)。 + +### License + +本仓库的内容不是将网上的资料随意拼凑而来,除了少部分引用书上和技术文档的原文(这部分内容都在末尾的参考链接中加了出处),其余都是我的原创。在您引用本仓库内容或者对内容进行修改演绎时,请署名并以相同方式共享,谢谢。 + +转载文章请在开头明显处标明该页面地址,公众号等其它转载请联系 zhengyc101@163.com。 + +Logo:[logomakr](https://logomakr.com/) + +知识共享许可协议 + +### 致谢 + +感谢以下人员对本仓库做出的贡献,当然不仅仅只有这些贡献者,这里就不一一列举了。如果你希望被添加到这个名单中,并且提交过 Issue 或者 PR,请与我联系。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SUMMARY.md b/SUMMARY.md deleted file mode 100644 index a864c37f29..0000000000 --- a/SUMMARY.md +++ /dev/null @@ -1,49 +0,0 @@ -This file used to generate gitbook catalogue. - -# Summary - -* 算法 - * [剑指 Offer 题解](/notes/剑指 offer 题解.md) - * [Leetcode 题解](/notes/Leetcode 题解.md) - * [算法](/notes/算法.md) -* 操作系统 - * [计算机操作系统](/notes/计算机操作系统.md) - * [Linux](/notes/Linux.md) -* 网络 - * [计算机网络](/notes/计算机网络.md) - * [HTTP](/notes/HTTP.md) - * [Socket](/notes/Socket.md) -* 面向对象 - * [设计模式](/notes/设计模式.md) - * [面向对象思想](/notes/面向对象思想.md) -* 数据库 - * [数据库系统原理](/notes/数据库系统原理.md) - * [SQL](/notes/SQL.md) - * [Leetcode-Database 题解](/notes/Leetcode-Database 题解.md) - * [MySQL](/notes/MySQL.md) - * [Redis](/notes/Redis.md) -* Java - * [Java 基础](/notes/Java 基础.md) - * [Java 虚拟机](/notes/Java 虚拟机.md) - * [Java 并发](/notes/Java 并发.md) - * [Java 容器](/notes/Java 容器.md) - * [Java I/O](/notes/Java IO.md) -* 系统设计 - * [系统设计基础](/notes/系统设计基础.md) - * [分布式](/notes/分布式.md) - * [集群](/notes/集群.md) - * [攻击技术](/notes/攻击技术.md) - * [缓存](/notes/缓存.md) - * [消息队列](/notes/消息队列.md) -* 工具 - * [Git](/notes/Git.md) - * [Docker](/notes/Docker.md) - * [正则表达式](/notes/正则表达式.md) - * [构建工具](/notes/构建工具.md) -* 编码实践 - * [重构](/notes/重构.md) - * [代码可读性](/notes/代码可读性.md) - * [代码风格规范](/notes/代码风格规范.md) -* 参考书目 - * [BOOKLIST](/BOOKLIST.md) - diff --git a/other/LogoMakr_0zpEzN.png b/assets/LogoMakr_0zpEzN.png similarity index 100% rename from other/LogoMakr_0zpEzN.png rename to assets/LogoMakr_0zpEzN.png diff --git a/assets/column.png b/assets/column.png new file mode 100644 index 0000000000..aaa3d31d08 Binary files /dev/null and b/assets/column.png differ diff --git a/assets/download-html.png b/assets/download-html.png new file mode 100644 index 0000000000..75c5ec1a30 Binary files /dev/null and b/assets/download-html.png differ diff --git a/assets/download-markdown.png b/assets/download-markdown.png new file mode 100644 index 0000000000..df18175c0d Binary files /dev/null and b/assets/download-markdown.png differ diff --git a/assets/download-pdf.png b/assets/download-pdf.png new file mode 100644 index 0000000000..3b14a633f2 Binary files /dev/null and b/assets/download-pdf.png differ diff --git a/assets/download.md b/assets/download.md new file mode 100644 index 0000000000..c28bfa444b --- /dev/null +++ b/assets/download.md @@ -0,0 +1,33 @@ +# 目的 + +考虑到有部分读者的网络环境较差,有时候在线访问速度很慢,导致阅读体验不佳。另外,PDF 等格式的离线版本相比于网页在线版本更方便做笔记。因此提供离线阅读版本给大家下载。 + +# 内容 + +有三种格式的离线版本:PDF、Markdown 和 HTML 。 + +## PDF + +优点是方便做笔记;缺点是不能显示 GIF 图片(所以“剑指 Offer 题解”不建议使用 PDF 进行阅读),以及显示效果不佳。 + +![](download-pdf.png) + +## Markdown + +优点是能很好地显示 GIF 图片,显示效果也很好;缺点是由于将所有内容整合在同一个文件中,导致实时渲染有点卡顿。 + +![](download-markdown.png) + +## HTML + +优点是和 Markdown 的显示效果几乎一致,同时不需要 Markdown 的实时渲染,因此浏览速度更快;缺点是目录功能还不是很完善。 + +如果想在安卓手机端阅读,推荐使用这种格式,将 html 文件和图片文件都复制到手机上,用浏览器打开 html 文件并存成书签,以后就可以快速地离线阅读。 + +![](download-html.png) + +# 如何下载 + +离线版本由公众号 **CyC2018** 发布,最新版本也会在上面及时发布,在后台回复 **CyC** 即可获取下载链接。 + +
diff --git "a/assets/\344\273\212\346\227\245\345\244\264\346\235\241\346\213\233\350\201\230\346\265\267\346\212\245.png" "b/assets/\344\273\212\346\227\245\345\244\264\346\235\241\346\213\233\350\201\230\346\265\267\346\212\245.png" new file mode 100644 index 0000000000..3c30d5cb6a Binary files /dev/null and "b/assets/\344\273\212\346\227\245\345\244\264\346\235\241\346\213\233\350\201\230\346\265\267\346\212\245.png" differ diff --git "a/assets/\345\205\254\344\274\227\345\217\267\344\272\214\347\273\264\347\240\201-2.png" "b/assets/\345\205\254\344\274\227\345\217\267\344\272\214\347\273\264\347\240\201-2.png" new file mode 100644 index 0000000000..fec66b80ca Binary files /dev/null and "b/assets/\345\205\254\344\274\227\345\217\267\344\272\214\347\273\264\347\240\201-2.png" differ diff --git "a/assets/\345\205\254\344\274\227\345\217\267\346\265\267\346\212\2457.png" "b/assets/\345\205\254\344\274\227\345\217\267\346\265\267\346\212\2457.png" new file mode 100644 index 0000000000..8f33bd5d20 Binary files /dev/null and "b/assets/\345\205\254\344\274\227\345\217\267\346\265\267\346\212\2457.png" differ diff --git "a/assets/\345\206\205\346\216\250.md" "b/assets/\345\206\205\346\216\250.md" new file mode 100644 index 0000000000..2c3fd6fdaa --- /dev/null +++ "b/assets/\345\206\205\346\216\250.md" @@ -0,0 +1,3 @@ +https://job.toutiao.com/s/iVYD4ht + + diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..756b142235 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,2 @@ +# 😃 该网站已迁移至 >>> [www.cyc2018.xyz](http://www.cyc2018.xyz) + diff --git a/docs/_404.md b/docs/_404.md new file mode 100644 index 0000000000..831dac82e5 --- /dev/null +++ b/docs/_404.md @@ -0,0 +1 @@ +# 😃 该网站已迁移至 >>> [www.cyc2018.xyz](http://www.cyc2018.xyz) \ No newline at end of file diff --git a/docs/_coverpage.md b/docs/_coverpage.md new file mode 100644 index 0000000000..df3eaa882a --- /dev/null +++ b/docs/_coverpage.md @@ -0,0 +1,11 @@ + + + +- 本项目包含了技术面试必备的基础知识,内容浅显易懂,你不需要花很长的时间去阅读和理解成堆的技术书籍就可以快速掌握这些知识,从而节省宝贵的面试复习时间。 + + + +[![stars](https://badgen.net/github/stars/CyC2018/CS-Notes?icon=github&color=4ab8a1)](https://github.com/CyC2018/CS-Notes) [![forks](https://badgen.net/github/forks/CyC2018/CS-Notes?icon=github&color=4ab8a1)](https://github.com/CyC2018/CS-Notes) + +[开始阅读](http://www.cyc2018.xyz) + diff --git a/docs/_media/LogoMakr_1J56bI.png b/docs/_media/LogoMakr_1J56bI.png new file mode 100644 index 0000000000..8fdee22a7f Binary files /dev/null and b/docs/_media/LogoMakr_1J56bI.png differ diff --git a/docs/_media/logomakr-3sxxzw-128x128.png b/docs/_media/logomakr-3sxxzw-128x128.png new file mode 100644 index 0000000000..80092a9453 Binary files /dev/null and b/docs/_media/logomakr-3sxxzw-128x128.png differ diff --git "a/docs/_media/\345\205\254\344\274\227\345\217\267.jpg" "b/docs/_media/\345\205\254\344\274\227\345\217\267.jpg" new file mode 100644 index 0000000000..ab57e6b2dd Binary files /dev/null and "b/docs/_media/\345\205\254\344\274\227\345\217\267.jpg" differ diff --git a/docs/_style/prism-master/.editorconfig b/docs/_style/prism-master/.editorconfig new file mode 100644 index 0000000000..b2e4603bf0 --- /dev/null +++ b/docs/_style/prism-master/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +insert_final_newline = false +charset = utf-8 +indent_style = tab +indent_size = 4 + +[tests/languages/**.test] +end_of_line = crlf + +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/docs/_style/prism-master/.gitattributes b/docs/_style/prism-master/.gitattributes new file mode 100644 index 0000000000..1d598bdc92 --- /dev/null +++ b/docs/_style/prism-master/.gitattributes @@ -0,0 +1,4 @@ +* text=auto + +# Test files should not have their line endings modified by git +/tests/languages/**/*.test binary \ No newline at end of file diff --git a/docs/_style/prism-master/.gitignore b/docs/_style/prism-master/.gitignore new file mode 100644 index 0000000000..3b16b7d30c --- /dev/null +++ b/docs/_style/prism-master/.gitignore @@ -0,0 +1,4 @@ +hide-*.js +node_modules +.idea/ +.DS_Store diff --git a/docs/_style/prism-master/.npmignore b/docs/_style/prism-master/.npmignore new file mode 100644 index 0000000000..2ff075c95b --- /dev/null +++ b/docs/_style/prism-master/.npmignore @@ -0,0 +1,27 @@ +.idea +*.iml + +hide-*.js + +CNAME +examples/ +img/ +templates/ +tests/ +vendor/ +*.tgz +*.html +style.css +favicon.png +logo.svg +bower.json +composer.json +download.js +examples.js +gulpfile.js +prefixfree.min.js +utopia.js +code.js +.editorconfig +.gitattributes +.travis.yml \ No newline at end of file diff --git a/docs/_style/prism-master/.travis.yml b/docs/_style/prism-master/.travis.yml new file mode 100644 index 0000000000..3d0c7d1643 --- /dev/null +++ b/docs/_style/prism-master/.travis.yml @@ -0,0 +1,23 @@ +language: node_js +node_js: +- '4' +- '6' +- '8' +- '9' +# Build all branches +branches: + only: + - gh-pages + - /.*/ +before_script: +- npm install -g gulp +- gulp +script: npm test +deploy: + provider: npm + email: lea@verou.me + api_key: + secure: TjRcXEr7Y/9KRJ4EOEQbd2Ij8hxKj8c/yOpEROy2lTYv6QH9x46nFDgZEE3VHfp/nnBUYpC47dRaSxiUj8H5rtkMNCZrREZu1n1zahmzP6dI6kCj+H3GiY7yw/Jhdx3uvQZHwknW2TJ/YRsLeQsmMSG2HnJobY9Zn4REX5ccP2E= + on: + tags: true + repo: PrismJS/prism diff --git a/docs/_style/prism-master/CHANGELOG.md b/docs/_style/prism-master/CHANGELOG.md new file mode 100644 index 0000000000..14c64052d3 --- /dev/null +++ b/docs/_style/prism-master/CHANGELOG.md @@ -0,0 +1,1334 @@ +# Prism Changelog + +## 1.15.0 (2018-06-16) + +### New components + +* __Template Tookit 2__ ([#1418](https://github.com/PrismJS/prism/issues/1418)) [[`e063992`](https://github.com/PrismJS/prism/commit/e063992)] +* __XQuery__ ([#1411](https://github.com/PrismJS/prism/issues/1411)) [[`e326cb0`](https://github.com/PrismJS/prism/commit/e326cb0)] +* __TAP__ ([#1430](https://github.com/PrismJS/prism/issues/1430)) [[`8c2b71f`](https://github.com/PrismJS/prism/commit/8c2b71f)] + +### Updated components + +* __HTTP__ + * Absolute path is a valid request uri ([#1388](https://github.com/PrismJS/prism/issues/1388)) [[`f6e81cb`](https://github.com/PrismJS/prism/commit/f6e81cb)] +* __Kotlin__ + * Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [[`1bf73b0`](https://github.com/PrismJS/prism/commit/1bf73b0)] + * Add `typealias` keyword ([#1437](https://github.com/PrismJS/prism/issues/1437)) [[`a21fdee`](https://github.com/PrismJS/prism/commit/a21fdee)] +* __JavaScript + * Improve Regexp pattern [[`5b043cf`](https://github.com/PrismJS/prism/commit/5b043cf)] + * Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [[`db2d0eb`](https://github.com/PrismJS/prism/commit/db2d0eb)] +* __Elixir__ + * Elixir: Fix attributes consuming punctuation. Fix [#1392](https://github.com/PrismJS/prism/issues/1392) [[`dac0485`](https://github.com/PrismJS/prism/commit/dac0485)] +* __Bash__ + * Change reserved keyword reference ([#1396](https://github.com/PrismJS/prism/issues/1396)) [[`b94f01f`](https://github.com/PrismJS/prism/commit/b94f01f)] +* __PowerShell__ + * Allow for one level of nesting in expressions inside strings. Fix [#1407](https://github.com/PrismJS/prism/issues/1407) [[`9272d6f`](https://github.com/PrismJS/prism/commit/9272d6f)] +* __JSX__ + * Allow for two levels of nesting inside JSX tags. Fix [#1408](https://github.com/PrismJS/prism/issues/1408) [[`f1cd7c5`](https://github.com/PrismJS/prism/commit/f1cd7c5)] + * Add support for fragments short syntax. Fix [#1421](https://github.com/PrismJS/prism/issues/1421) [[`38ce121`](https://github.com/PrismJS/prism/commit/38ce121)] +* __Pascal__ + * Add `objectpascal` as an alias to `pascal` ([#1426](https://github.com/PrismJS/prism/issues/1426)) [[`a0bfc84`](https://github.com/PrismJS/prism/commit/a0bfc84)] +* __Swift__ + * Fix Swift 'protocol' keyword ([#1440](https://github.com/PrismJS/prism/issues/1440)) [[`081e318`](https://github.com/PrismJS/prism/commit/081e318)] + +### Updated plugins + +* __File Highlight__ + * Fix issue causing the Download button to show up on every code blocks. [[`cd22499`](https://github.com/PrismJS/prism/commit/cd22499)] + * Simplify lang regex on File Highlight plugin ([#1399](https://github.com/PrismJS/prism/issues/1399)) [[`7bc9a4a`](https://github.com/PrismJS/prism/commit/7bc9a4a)] +* __Show Language__ + * Don't process language if block language not set ([#1410](https://github.com/PrismJS/prism/issues/1410)) [[`c111869`](https://github.com/PrismJS/prism/commit/c111869)] +* __Autoloader__ + * ASP.NET should require C# [[`fa328bb`](https://github.com/PrismJS/prism/commit/fa328bb)] +* __Line Numbers__ + * Make line-numbers styles more specific ([#1434](https://github.com/PrismJS/prism/issues/1434), [#1435](https://github.com/PrismJS/prism/issues/1435)) [[`9ee4f54`](https://github.com/PrismJS/prism/commit/9ee4f54)] + +### Updated themes + +* Add .token.class-name to rest of themes ([#1360](https://github.com/PrismJS/prism/issues/1360)) [[`f356dfe`](https://github.com/PrismJS/prism/commit/f356dfe)] + +### Other changes + +* __Website__ + * Site now loads over HTTPS! + * Use HTTPS / canonical URLs ([#1390](https://github.com/PrismJS/prism/issues/1390)) [[`95146c8`](https://github.com/PrismJS/prism/commit/95146c8)] + * Added Angular tutorial link [[`c436a7c`](https://github.com/PrismJS/prism/commit/c436a7c)] + * Use rel="icon" instead of rel="shortcut icon" ([#1398](https://github.com/PrismJS/prism/issues/1398)) [[`d95f8fb`](https://github.com/PrismJS/prism/commit/d95f8fb)] + * Fix Download page not handling multiple dependencies when from Redownload URL [[`c2ff248`](https://github.com/PrismJS/prism/commit/c2ff248)] + * Update documentation for node & webpack usage [[`1e99e96`](https://github.com/PrismJS/prism/commit/1e99e96)] +* Handle optional dependencies in `loadLanguages()` ([#1417](https://github.com/PrismJS/prism/issues/1417)) [[`84935ac`](https://github.com/PrismJS/prism/commit/84935ac)] +* Add Chinese translation [[`f2b1964`](https://github.com/PrismJS/prism/commit/f2b1964)] + +## 1.14.0 (2018-04-11) + +### New components +* __GEDCOM__ ([#1385](https://github.com/PrismJS/prism/issues/1385)) [[`6e0b20a`](https://github.com/PrismJS/prism/commit/6e0b20a)] +* __Lisp__ ([#1297](https://github.com/PrismJS/prism/issues/1297)) [[`46468f8`](https://github.com/PrismJS/prism/commit/46468f8)] +* __Markup Templating__ ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Soy__ ([#1387](https://github.com/PrismJS/prism/issues/1387)) [[`b4509bf`](https://github.com/PrismJS/prism/commit/b4509bf)] +* __Velocity__ ([#1378](https://github.com/PrismJS/prism/issues/1378)) [[`5a524f7`](https://github.com/PrismJS/prism/commit/5a524f7)] +* __Visual Basic__ ([#1382](https://github.com/PrismJS/prism/issues/1382)) [[`c673ec2`](https://github.com/PrismJS/prism/commit/c673ec2)] +* __WebAssembly__ ([#1386](https://github.com/PrismJS/prism/issues/1386)) [[`c28d8c5`](https://github.com/PrismJS/prism/commit/c28d8c5)] + +### Updated components +* __Bash__: + * Add curl to the list of common functions. Close [#1160](https://github.com/PrismJS/prism/issues/1160) [[`1bfc084`](https://github.com/PrismJS/prism/commit/1bfc084)] +* __C-like__: + * Make single-line comments greedy. Fix [#1337](https://github.com/PrismJS/prism/issues/1337). Make sure [#1340](https://github.com/PrismJS/prism/issues/1340) stays fixed. [[`571f2c5`](https://github.com/PrismJS/prism/commit/571f2c5)] +* __C#__: + * More generic class-name highlighting. Fix [#1365](https://github.com/PrismJS/prism/issues/1365) [[`a6837d2`](https://github.com/PrismJS/prism/commit/a6837d2)] + * More specific class-name highlighting. Fix [#1371](https://github.com/PrismJS/prism/issues/1371) [[`0a95f69`](https://github.com/PrismJS/prism/commit/0a95f69)] +* __Eiffel__: + * Fix verbatim strings. Fix [#1379](https://github.com/PrismJS/prism/issues/1379) [[`04df41b`](https://github.com/PrismJS/prism/commit/04df41b)] +* __Elixir__ + * Make regexps greedy, remove comment hacks. Update known failures and tests. [[`e93d61f`](https://github.com/PrismJS/prism/commit/e93d61f)] +* __ERB__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Fortran__: + * Make single-line comments greedy. Update known failures and tests. [[`c083b78`](https://github.com/PrismJS/prism/commit/c083b78)] +* __Handlebars__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Java__: + * Add support for generics. Fix [#1351](https://github.com/PrismJS/prism/issues/1351) [[`a5cf302`](https://github.com/PrismJS/prism/commit/a5cf302)] +* __JavaScript__: + * Add support for constants. Fix [#1348](https://github.com/PrismJS/prism/issues/1348) [[`9084481`](https://github.com/PrismJS/prism/commit/9084481)] + * Improve Regex matching [[`172d351`](https://github.com/PrismJS/prism/commit/172d351)] +* __JSX__: + * Fix highlighting of empty objects. Fix [#1364](https://github.com/PrismJS/prism/issues/1364) [[`b26bbb8`](https://github.com/PrismJS/prism/commit/b26bbb8)] +* __Monkey__: + * Make comments greedy. Update known failures and tests. [[`d7b2b43`](https://github.com/PrismJS/prism/commit/d7b2b43)] +* __PHP__: + * Make highlighting work properly in NodeJS ([#1367](https://github.com/PrismJS/prism/issues/1367)) [[`5f9c078`](https://github.com/PrismJS/prism/commit/5f9c078)] +* __Puppet__: + * Make heredoc, comments, regexps and strings greedy. Update known failures and tests. [[`0c139d1`](https://github.com/PrismJS/prism/commit/0c139d1)] +* __Q__: + * Make comments greedy. Update known failures and tests. [[`a0f5081`](https://github.com/PrismJS/prism/commit/a0f5081)] +* __Ruby__: + * Make multi-line comments greedy, remove single-line comment hack. Update known failures and tests. [[`b0e34fb`](https://github.com/PrismJS/prism/commit/b0e34fb)] +* __SQL__: + * Add missing keywords. Fix [#1374](https://github.com/PrismJS/prism/issues/1374) [[`238b195`](https://github.com/PrismJS/prism/commit/238b195)] + +### Updated plugins +* __Command Line__: + * Command Line: Allow specifying output prefix using data-filter-output attribute. ([#856](https://github.com/PrismJS/prism/issues/856)) [[`094d546`](https://github.com/PrismJS/prism/commit/094d546)] +* __File Highlight__: + * Add option to provide a download button, when used with the Toolbar plugin. Fix [#1030](https://github.com/PrismJS/prism/issues/1030) [[`9f22952`](https://github.com/PrismJS/prism/commit/9f22952)] + +### Updated themes +* __Default__: + * Reach AA contrast ratio level ([#1296](https://github.com/PrismJS/prism/issues/1296)) [[`8aea939`](https://github.com/PrismJS/prism/commit/8aea939)] + +### Other changes +* Website: Remove broken third-party tutorials from homepage [[`0efd6e1`](https://github.com/PrismJS/prism/commit/0efd6e1)] +* Docs: Mention `loadLanguages()` function on homepage in the nodeJS section. Close [#972](https://github.com/PrismJS/prism/issues/972), close [#593](https://github.com/PrismJS/prism/issues/593) [[`4a14d20`](https://github.com/PrismJS/prism/commit/4a14d20)] +* Core: Greedy patterns should always be matched against the full string. Fix [#1355](https://github.com/PrismJS/prism/issues/1355) [[`294efaa`](https://github.com/PrismJS/prism/commit/294efaa)] +* Crystal: Update known failures. [[`e1d2d42`](https://github.com/PrismJS/prism/commit/e1d2d42)] +* D: Update known failures and tests. [[`13d9991`](https://github.com/PrismJS/prism/commit/13d9991)] +* Markdown: Update known failures. [[`5b6c76d`](https://github.com/PrismJS/prism/commit/5b6c76d)] +* Matlab: Update known failures. [[`259b6fc`](https://github.com/PrismJS/prism/commit/259b6fc)] +* Website: Remove non-existent anchor to failures. Reword on homepage to make is less misleading. [[`8c0911a`](https://github.com/PrismJS/prism/commit/8c0911a)] +* Website: Add link to Keep Markup plugin in FAQ [[`e8cb6d4`](https://github.com/PrismJS/prism/commit/e8cb6d4)] +* Test suite: Memory leak in vm.runInNewContext() seems fixed. Revert [[`9a4b6fa`](https://github.com/PrismJS/prism/commit/9a4b6fa)] to drastically improve tests execution time. [[`9bceece`](https://github.com/PrismJS/prism/commit/9bceece), [`7c7602b`](https://github.com/PrismJS/prism/commit/7c7602b)] +* Gulp: Don't minify `components/index.js` [[`689227b`](https://github.com/PrismJS/prism/commit/689227b)] +* Website: Fix theme selection on Download page, when theme is in query string or hash. [[`b4d3063`](https://github.com/PrismJS/prism/commit/b4d3063)] +* Update JSPM config to also include unminified components. Close [#995](https://github.com/PrismJS/prism/issues/995) [[`218f160`](https://github.com/PrismJS/prism/commit/218f160)] +* Core: Fix support for language alias containing dash `-` [[`659ea31`](https://github.com/PrismJS/prism/commit/659ea31)] + +## 1.13.0 (2018-03-21) + +### New components +* __ERB__ [[`e6213ac`](https://github.com/PrismJS/prism/commit/e6213ac)] +* __PL/SQL__ ([#1338](https://github.com/PrismJS/prism/issues/1338)) [[`3599e6a`](https://github.com/PrismJS/prism/commit/3599e6a)] + +### Updated components +* __JSX__: + * Add support for plain text inside tags ([#1357](https://github.com/PrismJS/prism/issues/1357)) [[`2b8321d`](https://github.com/PrismJS/prism/commit/2b8321d)] +* __Markup__: + * Make tags greedy. Fix [#1356](https://github.com/PrismJS/prism/issues/1356) [[`af834be`](https://github.com/PrismJS/prism/commit/af834be)] +* __Powershell__: + * Add lookbehind to fix function interpolation inside strings. Fix [#1361](https://github.com/PrismJS/prism/issues/1361) [[`d2c026e`](https://github.com/PrismJS/prism/commit/d2c026e)] +* __Rust__: + * Improve char pattern so that lifetime annotations are matched better. Fix [#1353](https://github.com/PrismJS/prism/issues/1353) [[`efdccbf`](https://github.com/PrismJS/prism/commit/efdccbf)] + +### Updated themes +* __Default__: + * Add color for class names [[`8572474`](https://github.com/PrismJS/prism/commit/8572474)] +* __Coy__: + * Inherit pre's height on code, so it does not break on Download page. [[`c6c7fd1`](https://github.com/PrismJS/prism/commit/c6c7fd1)] + +### Other changes +* Website: Auto-generate example headers [[`c3ed5b5`](https://github.com/PrismJS/prism/commit/c3ed5b5)] +* Core: Allow cloning of circular structures. ([#1345](https://github.com/PrismJS/prism/issues/1345)) [[`f90d555`](https://github.com/PrismJS/prism/commit/f90d555)] +* Core: Generate components.js from components.json and make it exportable to nodeJS. ([#1354](https://github.com/PrismJS/prism/issues/1354)) [[`ba60df0`](https://github.com/PrismJS/prism/commit/ba60df0)] +* Website: Improve appearance of theme selector [[`0460cad`](https://github.com/PrismJS/prism/commit/0460cad)] +* Website: Check stored theme by default + link both theme selectors together. Close [#1038](https://github.com/PrismJS/prism/issues/1038) [[`212dd4e`](https://github.com/PrismJS/prism/commit/212dd4e)] +* Tests: Use the new components.js file directly [[`0e1a8b7`](https://github.com/PrismJS/prism/commit/0e1a8b7)] +* Update .npmignore Close [#1274](https://github.com/PrismJS/prism/issues/1274) [[`a52319a`](https://github.com/PrismJS/prism/commit/a52319a)] +* Add a loadLanguages() function for easy component loading on NodeJS ([#1359](https://github.com/PrismJS/prism/issues/1359)) [[`a5331a6`](https://github.com/PrismJS/prism/commit/a5331a6)] + +## 1.12.2 (2018-03-08) + +### Other changes +* Test against NodeJS 4, 6, 8 and 9 ([#1329](https://github.com/PrismJS/prism/issues/1329)) [[`97b7d0a`](https://github.com/PrismJS/prism/commit/97b7d0a)] +* Stop testing against NodeJS 0.10 and 0.12 [[`df01b1b`](https://github.com/PrismJS/prism/commit/df01b1b)] + +## 1.12.1 (2018-03-08) + +### Updated components +* __C-like__: + * Revert [[`b98e5b9`](https://github.com/PrismJS/prism/commit/b98e5b9)] to fix [#1340](https://github.com/PrismJS/prism/issues/1340). Reopened [#1337](https://github.com/PrismJS/prism/issues/1337). [[`cebacdf`](https://github.com/PrismJS/prism/commit/cebacdf)] +* __JSX__: + * Allow for one level of nested curly braces inside tag attribute value. Fix [#1335](https://github.com/PrismJS/prism/issues/1335) [[`05bf67d`](https://github.com/PrismJS/prism/commit/05bf67d)] +* __Ruby__: + * Ensure module syntax is not confused with symbols. Fix [#1336](https://github.com/PrismJS/prism/issues/1336) [[`31a2a69`](https://github.com/PrismJS/prism/commit/31a2a69)] + +## 1.12.0 (2018-03-07) + +### New components +* __ARFF__ ([#1327](https://github.com/PrismJS/prism/issues/1327)) [[`0bc98ac`](https://github.com/PrismJS/prism/commit/0bc98ac)] +* __Clojure__ ([#1311](https://github.com/PrismJS/prism/issues/1311)) [[`8b4d3bd`](https://github.com/PrismJS/prism/commit/8b4d3bd)] +* __Liquid__ ([#1326](https://github.com/PrismJS/prism/issues/1326)) [[`f0b2c9e`](https://github.com/PrismJS/prism/commit/f0b2c9e)] + +### Updated components +* __Bash__: + * Add shell as an alias ([#1321](https://github.com/PrismJS/prism/issues/1321)) [[`67e16a2`](https://github.com/PrismJS/prism/commit/67e16a2)] + * Add support for quoted command substitution. Fix [#1287](https://github.com/PrismJS/prism/issues/1287) [[`63fc215`](https://github.com/PrismJS/prism/commit/63fc215)] +* __C#__: + * Add "dotnet" alias. [[`405867c`](https://github.com/PrismJS/prism/commit/405867c)] +* __C-like__: + * Change order of comment patterns and make multi-line one greedy. Fix [#1337](https://github.com/PrismJS/prism/issues/1337) [[`b98e5b9`](https://github.com/PrismJS/prism/commit/b98e5b9)] +* __NSIS__: + * Add support for NSIS 3.03 ([#1288](https://github.com/PrismJS/prism/issues/1288)) [[`bd1e98b`](https://github.com/PrismJS/prism/commit/bd1e98b)] + * Add missing NSIS commands ([#1289](https://github.com/PrismJS/prism/issues/1289)) [[`ad2948f`](https://github.com/PrismJS/prism/commit/ad2948f)] +* __PHP__: + * Add support for string interpolation inside double-quoted strings. Fix [#1146](https://github.com/PrismJS/prism/issues/1146) [[`9f1f8d6`](https://github.com/PrismJS/prism/commit/9f1f8d6)] + * Add support for Heredoc and Nowdoc strings [[`5d7223c`](https://github.com/PrismJS/prism/commit/5d7223c)] + * Fix shell-comment failure now that strings are greedy [[`ad25d22`](https://github.com/PrismJS/prism/commit/ad25d22)] +* __PowerShell__: + * Add support for two levels of nested brackets inside namespace pattern. Fixes [#1317](https://github.com/PrismJS/prism/issues/1317) [[`3bc3e9c`](https://github.com/PrismJS/prism/commit/3bc3e9c)] +* __Ruby__: + * Add keywords "protected", "private" and "public" [[`4593837`](https://github.com/PrismJS/prism/commit/4593837)] +* __Rust__: + * Add support for lifetime-annotation and => operator. Fix [#1339](https://github.com/PrismJS/prism/issues/1339) [[`926f6f8`](https://github.com/PrismJS/prism/commit/926f6f8)] +* __Scheme__: + * Don't highlight first number of a list as a function. Fix [#1331](https://github.com/PrismJS/prism/issues/1331) [[`51bff80`](https://github.com/PrismJS/prism/commit/51bff80)] +* __SQL__: + * Add missing keywords and functions, fix numbers [[`de29d4a`](https://github.com/PrismJS/prism/commit/de29d4a)] + +### Updated plugins +* __Autolinker__: + * Allow more chars in query string and hash to match more URLs. Fix [#1142](https://github.com/PrismJS/prism/issues/1142) [[`109bd6f`](https://github.com/PrismJS/prism/commit/109bd6f)] +* __Copy to Clipboard__: + * Bump ClipboardJS to 2.0.0 and remove hack ([#1314](https://github.com/PrismJS/prism/issues/1314)) [[`e9f410e`](https://github.com/PrismJS/prism/commit/e9f410e)] +* __Toolbar__: + * Prevent scrolling toolbar with content ([#1305](https://github.com/PrismJS/prism/issues/1305), [#1314](https://github.com/PrismJS/prism/issues/1314)) [[`84eeb89`](https://github.com/PrismJS/prism/commit/84eeb89)] +* __Unescaped Markup__: + * Use msMatchesSelector for IE11 and below. Fix [#1302](https://github.com/PrismJS/prism/issues/1302) [[`c246c1a`](https://github.com/PrismJS/prism/commit/c246c1a)] +* __WebPlatform Docs__: + * WebPlatform Docs plugin: Fix links. Fixes [#1290](https://github.com/PrismJS/prism/issues/1290) [[`7a9dbe0`](https://github.com/PrismJS/prism/commit/7a9dbe0)] + +### Other changes +* Fix Autoloader's demo page [[`3dddac9`](https://github.com/PrismJS/prism/commit/3dddac9)] +* Download page: Use hash instead of query-string for redownload URL. Fix [#1263](https://github.com/PrismJS/prism/issues/1263) [[`b03c02a`](https://github.com/PrismJS/prism/commit/b03c02a)] +* Core: Don't thow an error if lookbehing is used without anything matching. [[`e0cd47f`](https://github.com/PrismJS/prism/commit/e0cd47f)] +* Docs: Fix link to the `` element specification in HTML5 [[`a84263f`](https://github.com/PrismJS/prism/commit/a84263f)] +* Docs: Mention support for `lang-xxxx` class. Close [#1312](https://github.com/PrismJS/prism/issues/1312) [[`a9e76db`](https://github.com/PrismJS/prism/commit/a9e76db)] +* Docs: Add note on `async` parameter to clarify the requirement of using a single bundled file. Closes [#1249](https://github.com/PrismJS/prism/issues/1249) [[`eba0235`](https://github.com/PrismJS/prism/commit/eba0235)] + +## 1.11.0 (2018-02-05) + +### New components +* __Content-Security-Policy (CSP)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __HTTP Public-Key-Pins (HPKP)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __HTTP String-Transport-Security (HSTS)__ ([#1275](https://github.com/PrismJS/prism/issues/1275)) [[`b08cae5`](https://github.com/PrismJS/prism/commit/b08cae5)] +* __React TSX__ ([#1280](https://github.com/PrismJS/prism/issues/1280)) [[`fbe82b8`](https://github.com/PrismJS/prism/commit/fbe82b8)] + +### Updated components +* __C++__: + * Add C++ platform-independent types ([#1271](https://github.com/PrismJS/prism/issues/1271)) [[`3da238f`](https://github.com/PrismJS/prism/commit/3da238f)] +* __TypeScript__: + * Improve typescript with builtins ([#1277](https://github.com/PrismJS/prism/issues/1277)) [[`5de1b1f`](https://github.com/PrismJS/prism/commit/5de1b1f)] + +### Other changes +* Fix passing of non-enumerable Error properties from the child test runner ([#1276](https://github.com/PrismJS/prism/issues/1276)) [[`38df653`](https://github.com/PrismJS/prism/commit/38df653)] + +## 1.10.0 (2018-01-17) + +### New components +* __6502 Assembly__ ([#1245](https://github.com/PrismJS/prism/issues/1245)) [[`2ece18b`](https://github.com/PrismJS/prism/commit/2ece18b)] +* __Elm__ ([#1174](https://github.com/PrismJS/prism/issues/1174)) [[`d6da70e`](https://github.com/PrismJS/prism/commit/d6da70e)] +* __IchigoJam BASIC__ ([#1246](https://github.com/PrismJS/prism/issues/1246)) [[`cf840be`](https://github.com/PrismJS/prism/commit/cf840be)] +* __Io__ ([#1251](https://github.com/PrismJS/prism/issues/1251)) [[`84ed3ed`](https://github.com/PrismJS/prism/commit/84ed3ed)] + +### Updated components +* __BASIC__: + * Make strings greedy [[`60114d0`](https://github.com/PrismJS/prism/commit/60114d0)] +* __C++__: + * Add C++11 raw string feature ([#1254](https://github.com/PrismJS/prism/issues/1254)) [[`71595be`](https://github.com/PrismJS/prism/commit/71595be)] + +### Updated plugins +* __Autoloader__: + * Add support for `data-autoloader-path` ([#1242](https://github.com/PrismJS/prism/issues/1242)) [[`39360d6`](https://github.com/PrismJS/prism/commit/39360d6)] +* __Previewers__: + * New plugin combining previous plugins Previewer: Base, Previewer: Angle, Previewer: Color, Previewer: Easing, Previewer: Gradient and Previewer: Time. ([#1244](https://github.com/PrismJS/prism/issues/1244)) [[`28e4b4c`](https://github.com/PrismJS/prism/commit/28e4b4c)] +* __Unescaped Markup__: + * Make it work with any language ([#1265](https://github.com/PrismJS/prism/issues/1265)) [[`7bcdae7`](https://github.com/PrismJS/prism/commit/7bcdae7)] + +### Other changes +* Add attribute `style` in `package.json` ([#1256](https://github.com/PrismJS/prism/issues/1256)) [[`a9b6785`](https://github.com/PrismJS/prism/commit/a9b6785)] + +## 1.9.0 (2017-12-06) + +### New components +* __Flow__ [[`d27b70d`](https://github.com/PrismJS/prism/commit/d27b70d)] + +### Updated components +* __CSS__: + * Unicode characters in CSS properties ([#1227](https://github.com/PrismJS/prism/issues/1227)) [[`f234ea4`](https://github.com/PrismJS/prism/commit/f234ea4)] +* __JSX__: + * JSX: Improve highlighting support. Fix [#1235](https://github.com/PrismJS/prism/issues/1235) and [#1236](https://github.com/PrismJS/prism/issues/1236) [[`f41c5cd`](https://github.com/PrismJS/prism/commit/f41c5cd)] +* __Markup__: + * Make CSS and JS inclusions in Markup greedy. Fix [#1240](https://github.com/PrismJS/prism/issues/1240) [[`7dc1e45`](https://github.com/PrismJS/prism/commit/7dc1e45)] +* __PHP__: + * Add support for multi-line strings. Fix [#1233](https://github.com/PrismJS/prism/issues/1233) [[`9a542a0`](https://github.com/PrismJS/prism/commit/9a542a0)] + +### Updated plugins +* __Copy to clipboard__: + * Fix test for native Clipboard. Fix [#1241](https://github.com/PrismJS/prism/issues/1241) [[`e7b5e82`](https://github.com/PrismJS/prism/commit/e7b5e82)] + * Copy to clipboard: Update to v1.7.1. Fix [#1220](https://github.com/PrismJS/prism/issues/1220) [[`a1b85e3`](https://github.com/PrismJS/prism/commit/a1b85e3), [`af50e44`](https://github.com/PrismJS/prism/commit/af50e44)] +* __Line highlight__: + * Fixes to compatibility of line number and line higlight plugins ([#1194](https://github.com/PrismJS/prism/issues/1194)) [[`e63058f`](https://github.com/PrismJS/prism/commit/e63058f), [`3842a91`](https://github.com/PrismJS/prism/commit/3842a91)] +* __Unescaped Markup__: + * Fix ambiguity in documentation by improving examples. Fix [#1197](https://github.com/PrismJS/prism/issues/1197) [[`924784a`](https://github.com/PrismJS/prism/commit/924784a)] + +### Other changes +* Allow any element being root instead of document. ([#1230](https://github.com/PrismJS/prism/issues/1230)) [[`69f2e2c`](https://github.com/PrismJS/prism/commit/69f2e2c), [`6e50d44`](https://github.com/PrismJS/prism/commit/6e50d44)] +* Coy Theme: The 'height' element makes code blocks the height of the browser canvas. ([#1224](https://github.com/PrismJS/prism/issues/1224)) [[`ac219d7`](https://github.com/PrismJS/prism/commit/ac219d7)] +* Download page: Fix implicitly declared variable [[`f986551`](https://github.com/PrismJS/prism/commit/f986551)] +* Download page: Add version number at the beginning of the generated files. Fix [#788](https://github.com/PrismJS/prism/issues/788) [[`928790d`](https://github.com/PrismJS/prism/commit/928790d)] + +## 1.8.4 (2017-11-05) + +### Updated components + +* __ABAP__: + * Regexp optimisation [[`7547f83`](https://github.com/PrismJS/prism/commit/7547f83)] +* __ActionScript__: + * Fix XML regex + optimise [[`75d00d7`](https://github.com/PrismJS/prism/commit/75d00d7)] +* __Ada__: + * Regexp simplification [[`e881fe3`](https://github.com/PrismJS/prism/commit/e881fe3)] +* __Apacheconf__: + * Regexp optimisation [[`a065e61`](https://github.com/PrismJS/prism/commit/a065e61)] +* __APL__: + * Regexp simplification [[`33297c4`](https://github.com/PrismJS/prism/commit/33297c4)] +* __AppleScript__: + * Regexp optimisation [[`d879f36`](https://github.com/PrismJS/prism/commit/d879f36)] +* __Arduino__: + * Don't use captures if not needed [[`16b338f`](https://github.com/PrismJS/prism/commit/16b338f)] +* __ASP.NET__: + * Regexp optimisation [[`438926c`](https://github.com/PrismJS/prism/commit/438926c)] +* __AutoHotkey__: + * Regexp simplification + don't use captures if not needed [[`5edfd2f`](https://github.com/PrismJS/prism/commit/5edfd2f)] +* __Bash__: + * Regexp optimisation and simplification [[`75b9b29`](https://github.com/PrismJS/prism/commit/75b9b29)] +* __Bro__: + * Regexp simplification + don't use captures if not needed [[`d4b9003`](https://github.com/PrismJS/prism/commit/d4b9003)] +* __C__: + * Regexp optimisation + don't use captures if not needed [[`f61d487`](https://github.com/PrismJS/prism/commit/f61d487)] +* __C++__: + * Fix operator regexp + regexp simplification + don't use captures if not needed [[`ffeb26e`](https://github.com/PrismJS/prism/commit/ffeb26e)] +* __C#__: + * Remove duplicates in keywords + regexp optimisation + don't use captures if not needed [[`d28d178`](https://github.com/PrismJS/prism/commit/d28d178)] +* __C-like__: + * Regexp simplification + don't use captures if not needed [[`918e0ff`](https://github.com/PrismJS/prism/commit/918e0ff)] +* __CoffeeScript__: + * Regexp optimisation + don't use captures if not needed [[`5895978`](https://github.com/PrismJS/prism/commit/5895978)] +* __Crystal__: + * Remove trailing comma [[`16979a3`](https://github.com/PrismJS/prism/commit/16979a3)] +* __CSS__: + * Regexp simplification + don't use captures if not needed + handle multi-line style attributes [[`43d9f36`](https://github.com/PrismJS/prism/commit/43d9f36)] +* __CSS Extras__: + * Regexp simplification [[`134ed70`](https://github.com/PrismJS/prism/commit/134ed70)] +* __D__: + * Regexp optimisation [[`fbe39c9`](https://github.com/PrismJS/prism/commit/fbe39c9)] +* __Dart__: + * Regexp optimisation [[`f24e919`](https://github.com/PrismJS/prism/commit/f24e919)] +* __Django__: + * Regexp optimisation [[`a95c51d`](https://github.com/PrismJS/prism/commit/a95c51d)] +* __Docker__: + * Regexp optimisation [[`27f99ff`](https://github.com/PrismJS/prism/commit/27f99ff)] +* __Eiffel__: + * Regexp optimisation [[`b7cdea2`](https://github.com/PrismJS/prism/commit/b7cdea2)] +* __Elixir__: + * Regexp optimisation + uniform behavior between ~r and ~s [[`5d12e80`](https://github.com/PrismJS/prism/commit/5d12e80)] +* __Erlang__: + * Regexp optimisation [[`e7b411e`](https://github.com/PrismJS/prism/commit/e7b411e)] +* __F#__: + * Regexp optimisation + don't use captures if not needed [[`7753fc4`](https://github.com/PrismJS/prism/commit/7753fc4)] +* __Gherkin__: + * Regexp optimisation + don't use captures if not needed + added explanation comment on table-body regexp [[`f26197a`](https://github.com/PrismJS/prism/commit/f26197a)] +* __Git__: + * Regexp optimisation [[`b9483b9`](https://github.com/PrismJS/prism/commit/b9483b9)] +* __GLSL__: + * Regexp optimisation [[`e66d21b`](https://github.com/PrismJS/prism/commit/e66d21b)] +* __Go__: + * Regexp optimisation + don't use captures if not needed [[`88caabb`](https://github.com/PrismJS/prism/commit/88caabb)] +* __GraphQL__: + * Regexp optimisation and simplification [[`2474f06`](https://github.com/PrismJS/prism/commit/2474f06)] +* __Groovy__: + * Regexp optimisation + don't use captures if not needed [[`e74e00c`](https://github.com/PrismJS/prism/commit/e74e00c)] +* __Haml__: + * Regexp optimisation + don't use captures if not needed + fix typo in comment [[`23e3b43`](https://github.com/PrismJS/prism/commit/23e3b43)] +* __Handlebars__: + * Regexp optimisation + don't use captures if not needed [[`09dbfce`](https://github.com/PrismJS/prism/commit/09dbfce)] +* __Haskell__: + * Regexp simplification + don't use captures if not needed [[`f11390a`](https://github.com/PrismJS/prism/commit/f11390a)] +* __HTTP__: + * Regexp simplification + don't use captures if not needed [[`37ef24e`](https://github.com/PrismJS/prism/commit/37ef24e)] +* __Icon__: + * Regexp optimisation [[`9cf64a0`](https://github.com/PrismJS/prism/commit/9cf64a0)] +* __J__: + * Regexp simplification [[`de15150`](https://github.com/PrismJS/prism/commit/de15150)] +* __Java__: + * Don't use captures if not needed [[`96b35c8`](https://github.com/PrismJS/prism/commit/96b35c8)] +* __JavaScript__: + * Regexp optimisation + don't use captures if not needed [[`93d4002`](https://github.com/PrismJS/prism/commit/93d4002)] +* __Jolie__: + * Regexp optimisation + don't use captures if not needed + remove duplicates in keywords [[`a491f9e`](https://github.com/PrismJS/prism/commit/a491f9e)] +* __JSON__: + * Make strings greedy, remove negative look-ahead for ":". Fix [#1204](https://github.com/PrismJS/prism/issues/1204) [[`98acd2d`](https://github.com/PrismJS/prism/commit/98acd2d)] + * Regexp optimisation + don't use captures if not needed [[`8fc1b03`](https://github.com/PrismJS/prism/commit/8fc1b03)] +* __JSX__: + * Regexp optimisation + handle spread operator as a whole [[`28de4e2`](https://github.com/PrismJS/prism/commit/28de4e2)] +* __Julia__: + * Regexp optimisation and simplification [[`12684c0`](https://github.com/PrismJS/prism/commit/12684c0)] +* __Keyman__: + * Regexp optimisation + don't use captures if not needed [[`9726087`](https://github.com/PrismJS/prism/commit/9726087)] +* __Kotlin__: + * Regexp simplification [[`12ff8dc`](https://github.com/PrismJS/prism/commit/12ff8dc)] +* __LaTeX__: + * Regexp optimisation and simplification [[`aa426b0`](https://github.com/PrismJS/prism/commit/aa426b0)] +* __LiveScript__: + * Make interpolated strings greedy + fix variable and identifier regexps [[`c581049`](https://github.com/PrismJS/prism/commit/c581049)] +* __LOLCODE__: + * Don't use captures if not needed [[`52903af`](https://github.com/PrismJS/prism/commit/52903af)] +* __Makefile__: + * Regexp optimisation [[`20ae2e5`](https://github.com/PrismJS/prism/commit/20ae2e5)] +* __Markdown__: + * Don't use captures if not needed [[`f489a1e`](https://github.com/PrismJS/prism/commit/f489a1e)] +* __Markup__: + * Regexp optimisation + fix punctuation inside attr-value [[`ea380c6`](https://github.com/PrismJS/prism/commit/ea380c6)] +* __MATLAB__: + * Make strings greedy + handle line feeds better [[`4cd4f01`](https://github.com/PrismJS/prism/commit/4cd4f01)] +* __Monkey__: + * Don't use captures if not needed [[`7f47140`](https://github.com/PrismJS/prism/commit/7f47140)] +* __N4JS__: + * Don't use captures if not needed [[`2d3f9df`](https://github.com/PrismJS/prism/commit/2d3f9df)] +* __NASM__: + * Regexp optimisation and simplification + don't use captures if not needed [[`9937428`](https://github.com/PrismJS/prism/commit/9937428)] +* __nginx__: + * Remove trailing comma + remove duplicates in keywords [[`c6e7195`](https://github.com/PrismJS/prism/commit/c6e7195)] +* __NSIS__: + * Regexp optimisation + don't use captures if not needed [[`beeb107`](https://github.com/PrismJS/prism/commit/beeb107)] +* __Objective-C__: + * Don't use captures if not needed [[`9be0f88`](https://github.com/PrismJS/prism/commit/9be0f88)] +* __OCaml__: + * Regexp simplification [[`5f5f38c`](https://github.com/PrismJS/prism/commit/5f5f38c)] +* __OpenCL__: + * Don't use captures if not needed [[`5e70f1d`](https://github.com/PrismJS/prism/commit/5e70f1d)] +* __Oz__: + * Fix atom regexp [[`9320e92`](https://github.com/PrismJS/prism/commit/9320e92)] +* __PARI/GP__: + * Regexp optimisation [[`2c7b59b`](https://github.com/PrismJS/prism/commit/2c7b59b)] +* __Parser__: + * Regexp simplification [[`569d511`](https://github.com/PrismJS/prism/commit/569d511)] +* __Perl__: + * Regexp optimisation and simplification + don't use captures if not needed [[`0fe4cf6`](https://github.com/PrismJS/prism/commit/0fe4cf6)] +* __PHP__: + * Don't use captures if not needed Golmote [[`5235f18`](https://github.com/PrismJS/prism/commit/5235f18)] +* __PHP Extras__: + * Add word boundary after global keywords + don't use captures if not needed [[`9049a2a`](https://github.com/PrismJS/prism/commit/9049a2a)] +* __PowerShell__: + * Regexp optimisation + don't use captures if not needed [[`0d05957`](https://github.com/PrismJS/prism/commit/0d05957)] +* __Processing__: + * Regexp simplification [[`8110d38`](https://github.com/PrismJS/prism/commit/8110d38)] +* __.properties__: + * Regexp optimisation [[`678b621`](https://github.com/PrismJS/prism/commit/678b621)] +* __Protocol Buffers__: + * Don't use captures if not needed [[`3e256d8`](https://github.com/PrismJS/prism/commit/3e256d8)] +* __Pug__: + * Don't use captures if not needed [[`76dc925`](https://github.com/PrismJS/prism/commit/76dc925)] +* __Pure__: + * Make inline-lang greedy [[`92318b0`](https://github.com/PrismJS/prism/commit/92318b0)] +* __Python__: + * Add Python builtin function highlighting ([#1205](https://github.com/PrismJS/prism/issues/1205)) [[`2169c99`](https://github.com/PrismJS/prism/commit/2169c99)] + * Python: Add highlighting to functions with space between name and parentheses ([#1207](https://github.com/PrismJS/prism/issues/1207)) [[`3badd8a`](https://github.com/PrismJS/prism/commit/3badd8a)] + * Make triple-quoted strings greedy + regexp optimisation and simplification [[`f09f9f5`](https://github.com/PrismJS/prism/commit/f09f9f5)] +* __Qore__: + * Regexp simplification [[`69459f0`](https://github.com/PrismJS/prism/commit/69459f0)] +* __R__: + * Regexp optimisation [[`06a9da4`](https://github.com/PrismJS/prism/commit/06a9da4)] +* __Reason__: + * Regexp optimisation + don't use capture if not needed [[`19d79b4`](https://github.com/PrismJS/prism/commit/19d79b4)] +* __Ren'py__: + * Make strings greedy + don't use captures if not needed [[`91d84d9`](https://github.com/PrismJS/prism/commit/91d84d9)] +* __reST__: + * Regexp simplification + don't use captures if not needed [[`1a8b3e9`](https://github.com/PrismJS/prism/commit/1a8b3e9)] +* __Rip__: + * Regexp optimisation [[`d7f0ee8`](https://github.com/PrismJS/prism/commit/d7f0ee8)] +* __Ruby__: + * Regexp optimisation and simplification + don't use captures if not needed [[`4902ed4`](https://github.com/PrismJS/prism/commit/4902ed4)] +* __Rust__: + * Regexp optimisation and simplification + don't use captures if not needed [[`cc9d874`](https://github.com/PrismJS/prism/commit/cc9d874)] +* __Sass__: + * Regexp simplification Golmote [[`165d957`](https://github.com/PrismJS/prism/commit/165d957)] +* __Scala__: + * Regexp optimisation Golmote [[`5f50c12`](https://github.com/PrismJS/prism/commit/5f50c12)] +* __Scheme__: + * Regexp optimisation [[`bd19b04`](https://github.com/PrismJS/prism/commit/bd19b04)] +* __SCSS__: + * Regexp simplification [[`c60b7d4`](https://github.com/PrismJS/prism/commit/c60b7d4)] +* __Smalltalk__: + * Regexp simplification [[`41a2c76`](https://github.com/PrismJS/prism/commit/41a2c76)] +* __Smarty__: + * Regexp optimisation and simplification [[`e169be9`](https://github.com/PrismJS/prism/commit/e169be9)] +* __SQL__: + * Regexp optimisation [[`a6244a4`](https://github.com/PrismJS/prism/commit/a6244a4)] +* __Stylus__: + * Regexp optimisation [[`df9506c`](https://github.com/PrismJS/prism/commit/df9506c)] +* __Swift__: + * Don't use captures if not needed [[`a2d737a`](https://github.com/PrismJS/prism/commit/a2d737a)] +* __Tcl__: + * Regexp simplification + don't use captures if not needed [[`f0b8a33`](https://github.com/PrismJS/prism/commit/f0b8a33)] +* __Textile__: + * Regexp optimisation + don't use captures if not needed [[`08139ad`](https://github.com/PrismJS/prism/commit/08139ad)] +* __Twig__: + * Regexp optimisation and simplification + don't use captures if not needed [[`0b10fd0`](https://github.com/PrismJS/prism/commit/0b10fd0)] +* __TypeScript__: + * Don't use captures if not needed [[`e296caf`](https://github.com/PrismJS/prism/commit/e296caf)] +* __Verilog__: + * Regexp simplification [[`1b24b34`](https://github.com/PrismJS/prism/commit/1b24b34)] +* __VHDL__: + * Regexp optimisation and simplification [[`7af36df`](https://github.com/PrismJS/prism/commit/7af36df)] +* __vim__: + * Remove duplicates in keywords [[`700505e`](https://github.com/PrismJS/prism/commit/700505e)] +* __Wiki markup__: + * Fix escaping consistency [[`1fd690d`](https://github.com/PrismJS/prism/commit/1fd690d)] +* __YAML__: + * Regexp optimisation + don't use captures if not needed [[`1fd690d`](https://github.com/PrismJS/prism/commit/1fd690d)] + +### Other changes +* Remove comments spellcheck for AMP validation ([#1106](https://github.com/PrismJS/prism/issues/1106)) [[`de996d7`](https://github.com/PrismJS/prism/commit/de996d7)] +* Prevent error from throwing when element does not have a parentNode in highlightElement. [[`c33be19`](https://github.com/PrismJS/prism/commit/c33be19)] +* Provide a way to load Prism from inside a Worker without listening to messages. ([#1188](https://github.com/PrismJS/prism/issues/1188)) [[`d09982d`](https://github.com/PrismJS/prism/commit/d09982d)] + +## 1.8.3 (2017-10-19) + +### Other changes + +* Fix inclusion tests for Pug [[`955c2ab`](https://github.com/PrismJS/prism/commit/955c2ab)] + +## 1.8.2 (2017-10-19) + +### Updated components +* __Jade__: + * Jade has been renamed to __Pug__ ([#1201](https://github.com/PrismJS/prism/issues/1201)) [[`bcfef7c`](https://github.com/PrismJS/prism/commit/bcfef7c)] +* __JavaScript__: + * Better highlighting of functions ([#1190](https://github.com/PrismJS/prism/issues/1190)) [[`8ee2cd3`](https://github.com/PrismJS/prism/commit/8ee2cd3)] + +### Update plugins +* __Copy to clipboard__: + * Fix error occurring when using in Chrome 61+ ([#1206](https://github.com/PrismJS/prism/issues/1206)) [[`b41d571`](https://github.com/PrismJS/prism/commit/b41d571)] +* __Show invisibles__: + * Prevent error when using with Autoloader plugin ([#1195](https://github.com/PrismJS/prism/issues/1195)) [[`ed8bdb5`](https://github.com/PrismJS/prism/commit/ed8bdb5)] + +## 1.8.1 (2017-09-16) + +### Other changes + +* Add Arduino to components.js [[`290a3c6`](https://github.com/PrismJS/prism/commit/290a3c6)] + +## 1.8.0 (2017-09-16) + +### New components + +* __Arduino__ ([#1184](https://github.com/PrismJS/prism/issues/1184)) [[`edf2454`](https://github.com/PrismJS/prism/commit/edf2454)] +* __OpenCL__ ([#1175](https://github.com/PrismJS/prism/issues/1175)) [[`131e8fa`](https://github.com/PrismJS/prism/commit/131e8fa)] + +### Updated plugins + +* __Autolinker__: + * Silently catch any error thrown by decodeURIComponent. Fixes [#1186](https://github.com/PrismJS/prism/issues/1186) [[`2e43fcf`](https://github.com/PrismJS/prism/commit/2e43fcf)] + +## 1.7.0 (2017-09-09) + +### New components + +* __Django/Jinja2__ ([#1085](https://github.com/PrismJS/prism/issues/1085)) [[`345b1b2`](https://github.com/PrismJS/prism/commit/345b1b2)] +* __N4JS__ ([#1141](https://github.com/PrismJS/prism/issues/1141)) [[`eaa8ebb`](https://github.com/PrismJS/prism/commit/eaa8ebb)] +* __Ren'py__ ([#658](https://github.com/PrismJS/prism/issues/658)) [[`7ab4013`](https://github.com/PrismJS/prism/commit/7ab4013)] +* __VB.Net__ ([#1122](https://github.com/PrismJS/prism/issues/1122)) [[`5400651`](https://github.com/PrismJS/prism/commit/5400651)] + +### Updated components + +* __APL__: + * Add left shoe underbar and right shoe underbar ([#1072](https://github.com/PrismJS/prism/issues/1072)) [[`12238c5`](https://github.com/PrismJS/prism/commit/12238c5)] + * Update prism-apl.js ([#1126](https://github.com/PrismJS/prism/issues/1126)) [[`a5f3cdb`](https://github.com/PrismJS/prism/commit/a5f3cdb)] +* __C__: + * Add more keywords and constants for C. ([#1029](https://github.com/PrismJS/prism/issues/1029)) [[`43a388e`](https://github.com/PrismJS/prism/commit/43a388e)] +* __C#__: + * Fix wrong highlighting when three slashes appear inside string. Fix [#1091](https://github.com/PrismJS/prism/issues/1091) [[`dfb6f17`](https://github.com/PrismJS/prism/commit/dfb6f17)] +* __C-like__: + * Add support for unclosed block comments. Close [#828](https://github.com/PrismJS/prism/issues/828) [[`3426ed1`](https://github.com/PrismJS/prism/commit/3426ed1)] +* __Crystal__: + * Update Crystal keywords ([#1092](https://github.com/PrismJS/prism/issues/1092)) [[`125bff1`](https://github.com/PrismJS/prism/commit/125bff1)] +* __CSS Extras__: + * Support CSS #RRGGBBAA ([#1139](https://github.com/PrismJS/prism/issues/1139)) [[`07a6806`](https://github.com/PrismJS/prism/commit/07a6806)] +* __Docker__: + * Add dockerfile alias for docker language ([#1164](https://github.com/PrismJS/prism/issues/1164)) [[`601c47f`](https://github.com/PrismJS/prism/commit/601c47f)] + * Update the list of keywords for dockerfiles ([#1180](https://github.com/PrismJS/prism/issues/1180)) [[`f0d73e0`](https://github.com/PrismJS/prism/commit/f0d73e0)] +* __Eiffel__: + * Add class-name highlighting for Eiffel ([#471](https://github.com/PrismJS/prism/issues/471)) [[`cd03587`](https://github.com/PrismJS/prism/commit/cd03587)] +* __Handlebars__: + * Check for possible pre-existing marker strings in Handlebars [[`7a1a404`](https://github.com/PrismJS/prism/commit/7a1a404)] +* __JavaScript__: + * Properly match every operator as a whole token. Fix [#1133](https://github.com/PrismJS/prism/issues/1133) [[`9f649fb`](https://github.com/PrismJS/prism/commit/9f649fb)] + * Allows uppercase prefixes in JS number literals ([#1151](https://github.com/PrismJS/prism/issues/1151)) [[`d4ee904`](https://github.com/PrismJS/prism/commit/d4ee904)] + * Reduced backtracking in regex pattern. Fix [#1159](https://github.com/PrismJS/prism/issues/1159) [[`ac09e97`](https://github.com/PrismJS/prism/commit/ac09e97)] +* __JSON__: + * Fix property and string patterns performance. Fix [#1080](https://github.com/PrismJS/prism/issues/1080) [[`0ca1353`](https://github.com/PrismJS/prism/commit/0ca1353)] +* __JSX__: + * JSX spread operator break. Fixes [#1061](https://github.com/PrismJS/prism/issues/1061) ([#1094](https://github.com/PrismJS/prism/issues/1094)) [[`561bceb`](https://github.com/PrismJS/prism/commit/561bceb)] + * Fix highlighting of attributes containing spaces [[`867ea42`](https://github.com/PrismJS/prism/commit/867ea42)] + * Improved performance for tags (when not matching) Fix [#1152](https://github.com/PrismJS/prism/issues/1152) [[`b0fe103`](https://github.com/PrismJS/prism/commit/b0fe103)] +* __LOLCODE__: + * Make strings greedy Golmote [[`1a5e7a4`](https://github.com/PrismJS/prism/commit/1a5e7a4)] +* __Markup__: + * Support HTML entities in attribute values ([#1143](https://github.com/PrismJS/prism/issues/1143)) [[`1d5047d`](https://github.com/PrismJS/prism/commit/1d5047d)] +* __NSIS__: + * Update patterns ([#1033](https://github.com/PrismJS/prism/issues/1033)) [[`01a59d8`](https://github.com/PrismJS/prism/commit/01a59d8)] + * Add support for NSIS 3.02 ([#1169](https://github.com/PrismJS/prism/issues/1169)) [[`393b5f7`](https://github.com/PrismJS/prism/commit/393b5f7)] +* __PHP__: + * Fix the PHP language ([#1100](https://github.com/PrismJS/prism/issues/1100)) [[`1453fa7`](https://github.com/PrismJS/prism/commit/1453fa7)] + * Check for possible pre-existing marker strings in PHP [[`36bc560`](https://github.com/PrismJS/prism/commit/36bc560)] +* __Ruby__: + * Fix slash regex performance. Fix [#1083](https://github.com/PrismJS/prism/issues/1083) [[`a708730`](https://github.com/PrismJS/prism/commit/a708730)] + * Add support for =begin =end comments. Manual merge of [#1121](https://github.com/PrismJS/prism/issues/1121). [[`62cdaf8`](https://github.com/PrismJS/prism/commit/62cdaf8)] +* __Smarty__: + * Check for possible pre-existing marker strings in Smarty [[`5df26e2`](https://github.com/PrismJS/prism/commit/5df26e2)] +* __TypeScript__: + * Update typescript keywords ([#1064](https://github.com/PrismJS/prism/issues/1064)) [[`52020a0`](https://github.com/PrismJS/prism/commit/52020a0)] + * Chmod -x prism-typescript component ([#1145](https://github.com/PrismJS/prism/issues/1145)) [[`afe0542`](https://github.com/PrismJS/prism/commit/afe0542)] +* __YAML__: + * Make strings greedy (partial fix for [#1075](https://github.com/PrismJS/prism/issues/1075)) [[`565a2cc`](https://github.com/PrismJS/prism/commit/565a2cc)] + +### Updated plugins + +* __Autolinker__: + * Fixed an rendering issue for encoded urls ([#1173](https://github.com/PrismJS/prism/issues/1173)) [[`abc007f`](https://github.com/PrismJS/prism/commit/abc007f)] +* __Custom Class__: + * Add missing noCSS property for the Custom Class plugin [[`ba64f8d`](https://github.com/PrismJS/prism/commit/ba64f8d)] + * Added a default for classMap. Fixes [#1137](https://github.com/PrismJS/prism/issues/1137). ([#1157](https://github.com/PrismJS/prism/issues/1157)) [[`5400af9`](https://github.com/PrismJS/prism/commit/5400af9)] +* __Keep Markup__: + * Store highlightedCode after reinserting markup. Fix [#1127](https://github.com/PrismJS/prism/issues/1127) [[`6df2ceb`](https://github.com/PrismJS/prism/commit/6df2ceb)] +* __Line Highlight__: + * Cleanup left-over line-highlight tags before other plugins run [[`79b723d`](https://github.com/PrismJS/prism/commit/79b723d)] + * Avoid conflict between line-highlight and other plugins [[`224fdb8`](https://github.com/PrismJS/prism/commit/224fdb8)] +* __Line Numbers__: + * Support soft wrap for line numbers plugin ([#584](https://github.com/PrismJS/prism/issues/584)) [[`849f1d6`](https://github.com/PrismJS/prism/commit/849f1d6)] + * Plugins fixes (unescaped-markup, line-numbers) ([#1012](https://github.com/PrismJS/prism/issues/1012)) [[`3fb7cf8`](https://github.com/PrismJS/prism/commit/3fb7cf8)] +* __Normalize Whitespace__: + * Add Node.js support for the normalize-whitespace plugin [[`6c7dae2`](https://github.com/PrismJS/prism/commit/6c7dae2)] +* __Unescaped Markup__: + * Plugins fixes (unescaped-markup, line-numbers) ([#1012](https://github.com/PrismJS/prism/issues/1012)) [[`3fb7cf8`](https://github.com/PrismJS/prism/commit/3fb7cf8)] + +### Updated themes +* __Coy__: + * Scroll 'Coy' background with contents ([#1163](https://github.com/PrismJS/prism/issues/1163)) [[`310990b`](https://github.com/PrismJS/prism/commit/310990b)] + +### Other changes + +* Initial implementation of manual highlighting ([#1087](https://github.com/PrismJS/prism/issues/1087)) [[`bafc4cb`](https://github.com/PrismJS/prism/commit/bafc4cb)] +* Remove dead link in Third-party tutorials section. Fixes [#1028](https://github.com/PrismJS/prism/issues/1028) [[`dffadc6`](https://github.com/PrismJS/prism/commit/dffadc6)] +* Most languages now use the greedy flag for better highlighting [[`7549ecc`](https://github.com/PrismJS/prism/commit/7549ecc)] +* .npmignore: Unignore components.js ([#1108](https://github.com/PrismJS/prism/issues/1108)) [[`1f699e7`](https://github.com/PrismJS/prism/commit/1f699e7)] +* Run before-highlight and after-highlight hooks even when no grammar is found. Fix [#1134](https://github.com/PrismJS/prism/issues/1134) [[`70cb472`](https://github.com/PrismJS/prism/commit/70cb472)] +* Replace [\w\W] with [\s\S] and [0-9] with \d in regexes ([#1107](https://github.com/PrismJS/prism/issues/1107)) [[`8aa2cc4`](https://github.com/PrismJS/prism/commit/8aa2cc4)] +* Fix corner cases for the greedy flag ([#1095](https://github.com/PrismJS/prism/issues/1095)) [[`6530709`](https://github.com/PrismJS/prism/commit/6530709)] +* Add Third Party Tutorial ([#1156](https://github.com/PrismJS/prism/issues/1156)) [[`c34e57b`](https://github.com/PrismJS/prism/commit/c34e57b)] +* Add Composer support ([#648](https://github.com/PrismJS/prism/issues/648)) [[`2989633`](https://github.com/PrismJS/prism/commit/2989633)] +* Remove IE8 plugin ([#992](https://github.com/PrismJS/prism/issues/992)) [[`25788eb`](https://github.com/PrismJS/prism/commit/25788eb)] +* Website: remove width and height on logo.svg, so it becomes scalable. Close [#1005](https://github.com/PrismJS/prism/issues/1005) [[`0621ff7`](https://github.com/PrismJS/prism/commit/0621ff7)] +* Remove yarn.lock ([#1098](https://github.com/PrismJS/prism/issues/1098)) [[`11eed25`](https://github.com/PrismJS/prism/commit/11eed25)] + +## 1.6.0 (2016-12-03) + +### New components + +* __.properties__ ([#980](https://github.com/PrismJS/prism/issues/980)) [[`be6219a`](https://github.com/PrismJS/prism/commit/be6219a)] +* __Ada__ ([#949](https://github.com/PrismJS/prism/issues/949)) [[`65619f7`](https://github.com/PrismJS/prism/commit/65619f7)] +* __GraphQL__ ([#971](https://github.com/PrismJS/prism/issues/971)) [[`e018087`](https://github.com/PrismJS/prism/commit/e018087)] +* __Jolie__ ([#1014](https://github.com/PrismJS/prism/issues/1014)) [[`dfc1941`](https://github.com/PrismJS/prism/commit/dfc1941)] +* __LiveScript__ ([#982](https://github.com/PrismJS/prism/issues/982)) [[`62e258c`](https://github.com/PrismJS/prism/commit/62e258c)] +* __Reason__ (Fixes [#1046](https://github.com/PrismJS/prism/issues/1046)) [[`3cae6ce`](https://github.com/PrismJS/prism/commit/3cae6ce)] +* __Xojo__ ([#994](https://github.com/PrismJS/prism/issues/994)) [[`0224b7c`](https://github.com/PrismJS/prism/commit/0224b7c)] + +### Updated components + +* __APL__: + * Add iota underbar ([#1024](https://github.com/PrismJS/prism/issues/1024)) [[`3c5c89a`](https://github.com/PrismJS/prism/commit/3c5c89a), [`ac21d33`](https://github.com/PrismJS/prism/commit/ac21d33)] +* __AsciiDoc__: + * Optimized block regexps to prevent struggling on large files. Fixes [#1001](https://github.com/PrismJS/prism/issues/1001). [[`1a86d34`](https://github.com/PrismJS/prism/commit/1a86d34)] +* __Bash__: + * Add `npm` to function list ([#969](https://github.com/PrismJS/prism/issues/969)) [[`912bdfe`](https://github.com/PrismJS/prism/commit/912bdfe)] +* __CSS__: + * Make CSS strings greedy. Fix [#1013](https://github.com/PrismJS/prism/issues/1013). [[`e57e26d`](https://github.com/PrismJS/prism/commit/e57e26d)] +* __CSS Extras__: + * Match attribute inside selectors [[`13fed76`](https://github.com/PrismJS/prism/commit/13fed76)] +* _Groovy__: + * Fix order of decoding entities in groovy. Fixes [#1049](https://github.com/PrismJS/prism/issues/1049) ([#1050](https://github.com/PrismJS/prism/issues/1050)) [[`d75da8e`](https://github.com/PrismJS/prism/commit/d75da8e)] +* __Ini__: + * Remove important token in ini definition ([#1047](https://github.com/PrismJS/prism/issues/1047)) [[`fe8ad8b`](https://github.com/PrismJS/prism/commit/fe8ad8b)] +* __JavaScript__: + * Add exponentiation & spread/rest operator ([#991](https://github.com/PrismJS/prism/issues/991)) [[`b2de65a`](https://github.com/PrismJS/prism/commit/b2de65a), [`268d01e`](https://github.com/PrismJS/prism/commit/268d01e)] +* __JSON_: + * JSON: Fixed issues with properties and strings + added tests. Fix [#1025](https://github.com/PrismJS/prism/issues/1025) [[`25a541d`](https://github.com/PrismJS/prism/commit/25a541d)] +* __Markup__: + * Allow for dots in Markup tag names, but not in HTML tags included in Textile. Fixes [#888](https://github.com/PrismJS/prism/issues/888). [[`31ea66b`](https://github.com/PrismJS/prism/commit/31ea66b)] + * Make doctype case-insensitive ([#1009](https://github.com/PrismJS/prism/issues/1009)) [[`3dd7219`](https://github.com/PrismJS/prism/commit/3dd7219)] +* __NSIS__: + * Updated patterns ([#1032](https://github.com/PrismJS/prism/issues/1032)) [[`76ba1b8`](https://github.com/PrismJS/prism/commit/76ba1b8)] +* __PHP__: + * Make comments greedy. Fix [#197](https://github.com/PrismJS/prism/issues/197) [[`318aab3`](https://github.com/PrismJS/prism/commit/318aab3)] +* __PowerShell__: + * Fix highlighting of empty comments ([#977](https://github.com/PrismJS/prism/issues/977)) [[`4fda477`](https://github.com/PrismJS/prism/commit/4fda477)] +* __Puppet__: + * Fix over-greedy regexp detection ([#978](https://github.com/PrismJS/prism/issues/978)) [[`105be25`](https://github.com/PrismJS/prism/commit/105be25)] +* __Ruby__: + * Fix typo `Fload` to `Float` in prism-ruby.js ([#1023](https://github.com/PrismJS/prism/issues/1023)) [[`22cb018`](https://github.com/PrismJS/prism/commit/22cb018)] + * Make strings greedy. Fixes [#1048](https://github.com/PrismJS/prism/issues/1048) [[`8b0520a`](https://github.com/PrismJS/prism/commit/8b0520a)] +* __SCSS__: + * Alias statement as keyword. Fix [#246](https://github.com/PrismJS/prism/issues/246) [[`fd09391`](https://github.com/PrismJS/prism/commit/fd09391)] + * Highlight variables inside selectors and properties. [[`d6b5c2f`](https://github.com/PrismJS/prism/commit/d6b5c2f)] + * Highlight parent selector [[`8f5f1fa`](https://github.com/PrismJS/prism/commit/8f5f1fa)] +* __TypeScript__: + * Add missing `from` keyword to typescript & set `ts` as alias. ([#1042](https://github.com/PrismJS/prism/issues/1042)) [[`cba78f3`](https://github.com/PrismJS/prism/commit/cba78f3)] + +### New plugins + +* __Copy to Clipboard__ ([#891](https://github.com/PrismJS/prism/issues/891)) [[`07b81ac`](https://github.com/PrismJS/prism/commit/07b81ac)] +* __Custom Class__ ([#950](https://github.com/PrismJS/prism/issues/950)) [[`a0bd686`](https://github.com/PrismJS/prism/commit/a0bd686)] +* __Data-URI Highlight__ ([#996](https://github.com/PrismJS/prism/issues/996)) [[`bdca61b`](https://github.com/PrismJS/prism/commit/bdca61b)] +* __Toolbar__ ([#891](https://github.com/PrismJS/prism/issues/891)) [[`07b81ac`](https://github.com/PrismJS/prism/commit/07b81ac)] + +### Updated plugins + +* __Autoloader__: + * Updated documentation for Autoloader plugin [[`b4f3423`](https://github.com/PrismJS/prism/commit/b4f3423)] + * Download all grammars as a zip from Autoloader plugin page ([#981](https://github.com/PrismJS/prism/issues/981)) [[`0d0a007`](https://github.com/PrismJS/prism/commit/0d0a007), [`5c815d3`](https://github.com/PrismJS/prism/commit/5c815d3)] + * Removed duplicated script on Autoloader plugin page [[`9671996`](https://github.com/PrismJS/prism/commit/9671996)] + * Don't try to load "none" component. Fix [#1000](https://github.com/PrismJS/prism/issues/1000) [[`f89b0b9`](https://github.com/PrismJS/prism/commit/f89b0b9)] +* __WPD__: + * Fix at-rule detection + don't process if language is not handled [[`2626728`](https://github.com/PrismJS/prism/commit/2626728)] + +### Other changes + +* Improvement to greedy-flag ([#967](https://github.com/PrismJS/prism/issues/967)) [[`500121b`](https://github.com/PrismJS/prism/commit/500121b), [`9893489`](https://github.com/PrismJS/prism/commit/9893489)] +* Add setTimeout fallback for requestAnimationFrame. Fixes [#987](https://github.com/PrismJS/prism/issues/987). ([#988](https://github.com/PrismJS/prism/issues/988)) [[`c9bdcd3`](https://github.com/PrismJS/prism/commit/c9bdcd3)] +* Added aria-hidden attributes on elements created by the Line Highlight and Line Numbers plugins. Fixes [#574](https://github.com/PrismJS/prism/issues/574). [[`e5587a7`](https://github.com/PrismJS/prism/commit/e5587a7)] +* Don't insert space before ">" when there is no attributes [[`3dc8c9e`](https://github.com/PrismJS/prism/commit/3dc8c9e)] +* Added missing hooks-related tests for AsciiDoc, Groovy, Handlebars, Markup, PHP and Smarty [[`c1a0c1b`](https://github.com/PrismJS/prism/commit/c1a0c1b)] +* Fix issue when using Line numbers plugin and Normalise whitespace plugin together with Handlebars, PHP or Smarty. Fix [#1018](https://github.com/PrismJS/prism/issues/1018), [#997](https://github.com/PrismJS/prism/issues/997), [#935](https://github.com/PrismJS/prism/issues/935). Revert [#998](https://github.com/PrismJS/prism/issues/998). [[`86aa3d2`](https://github.com/PrismJS/prism/commit/86aa3d2)] +* Optimized logo ([#990](https://github.com/PrismJS/prism/issues/990)) ([#1002](https://github.com/PrismJS/prism/issues/1002)) [[`f69e570`](https://github.com/PrismJS/prism/commit/f69e570), [`218fd25`](https://github.com/PrismJS/prism/commit/218fd25)] +* Remove unneeded prefixed CSS ([#989](https://github.com/PrismJS/prism/issues/989)) [[`5e56833`](https://github.com/PrismJS/prism/commit/5e56833)] +* Optimize images ([#1007](https://github.com/PrismJS/prism/issues/1007)) [[`b2fa6d5`](https://github.com/PrismJS/prism/commit/b2fa6d5)] +* Add yarn.lock to .gitignore ([#1035](https://github.com/PrismJS/prism/issues/1035)) [[`03ecf74`](https://github.com/PrismJS/prism/commit/03ecf74)] +* Fix greedy flag bug. Fixes [#1039](https://github.com/PrismJS/prism/issues/1039) [[`32cd99f`](https://github.com/PrismJS/prism/commit/32cd99f)] +* Ruby: Fix test after [#1023](https://github.com/PrismJS/prism/issues/1023) [[`b15d43b`](https://github.com/PrismJS/prism/commit/b15d43b)] +* Ini: Fix test after [#1047](https://github.com/PrismJS/prism/issues/1047) [[`25cdd3f`](https://github.com/PrismJS/prism/commit/25cdd3f)] +* Reduce risk of XSS ([#1051](https://github.com/PrismJS/prism/issues/1051)) [[`17e33bc`](https://github.com/PrismJS/prism/commit/17e33bc)] +* env.code can be modified by before-sanity-check hook even when using language-none. Fix [#1066](https://github.com/PrismJS/prism/issues/1066) [[`83bafbd`](https://github.com/PrismJS/prism/commit/83bafbd)] + + +## 1.5.1 (2016-06-05) + +### Updated components + +* __Normalize Whitespace__: + * Add class that disables the normalize whitespace plugin [[`9385c54`](https://github.com/PrismJS/prism/commit/9385c54)] +* __JavaScript Language__: + * Rearrange the `string` and `template-string` token in JavaScript [[`1158e46`](https://github.com/PrismJS/prism/commit/1158e46)] +* __SQL Language__: + * add delimeter and delimeters keywords to sql ([#958](https://github.com/PrismJS/prism/pull/958)) [[`a9ef24e`](https://github.com/PrismJS/prism/commit/a9ef24e)] + * add AUTO_INCREMENT and DATE keywords to sql ([#954](https://github.com/PrismJS/prism/pull/954)) [[`caea2af`](https://github.com/PrismJS/prism/commit/caea2af)] +* __Diff Language__: + * Highlight diff lines with only + or - ([#952](https://github.com/PrismJS/prism/pull/952)) [[`4d0526f`](https://github.com/PrismJS/prism/commit/4d0526f)] + +### Other changes + +* Allow for asynchronous loading of prism.js ([#959](https://github.com/PrismJS/prism/pull/959)) +* Use toLowerCase on language names ([#957](https://github.com/PrismJS/prism/pull/957)) [[`acd9508`](https://github.com/PrismJS/prism/commit/acd9508)] +* link to index for basic usage - fixes [#945](https://github.com/PrismJS/prism/issues/945) ([#946](https://github.com/PrismJS/prism/pull/946)) [[`6c772d8`](https://github.com/PrismJS/prism/commit/6c772d8)] +* Fixed monospace typo ([#953](https://github.com/PrismJS/prism/pull/953)) [[`e6c3498`](https://github.com/PrismJS/prism/commit/e6c3498)] + +## 1.5.0 (2016-05-01) + +### New components + +* __Bro Language__ ([#925](https://github.com/PrismJS/prism/pull/925)) +* __Protocol Buffers Language__ ([#938](https://github.com/PrismJS/prism/pull/938)) [[`ae4a4f2`](https://github.com/PrismJS/prism/commit/ae4a4f2)] + +### Updated components + +* __Keep Markup__: + * Fix Keep Markup plugin incorrect highlighting ([#880](https://github.com/PrismJS/prism/pull/880)) [[`24841ef`](https://github.com/PrismJS/prism/commit/24841ef)] +* __Groovy Language__: + * Fix double HTML-encoding bug in Groovy language [[`24a0936`](https://github.com/PrismJS/prism/commit/24a0936)] +* __Java Language__: + * Adding annotation token for Java ([#905](https://github.com/PrismJS/prism/pull/905)) [[`367ace6`](https://github.com/PrismJS/prism/commit/367ace6)] +* __SAS Language__: + * Add missing keywords for SAS ([#922](https://github.com/PrismJS/prism/pull/922)) +* __YAML Language__: + * fix hilighting of YAML keys on first line of code block ([#943](https://github.com/PrismJS/prism/pull/943)) [[`f19db81`](https://github.com/PrismJS/prism/commit/f19db81)] +* __C# Language__: + * Support for generic methods in csharp [[`6f75735`](https://github.com/PrismJS/prism/commit/6f75735)] + +### New plugins + +* __Unescaped Markup__ [[`07d77e5`](https://github.com/PrismJS/prism/commit/07d77e5)] +* __Normalize Whitespace__ ([#847](https://github.com/PrismJS/prism/pull/847)) [[`e86ec01`](https://github.com/PrismJS/prism/commit/e86ec01)] + +### Other changes + +* Add JSPM support [[`ad048ab`](https://github.com/PrismJS/prism/commit/ad048ab)] +* update linear-gradient syntax from `left` to `to right` [[`cd234dc`](https://github.com/PrismJS/prism/commit/cd234dc)] +* Add after-property to allow ordering of plugins [[`224b7a1`](https://github.com/PrismJS/prism/commit/224b7a1)] +* Partial solution for the "Comment-like substrings"-problem [[`2705c50`](https://github.com/PrismJS/prism/commit/2705c50)] +* Add property 'aliasTitles' to components.js [[`54400fb`](https://github.com/PrismJS/prism/commit/54400fb)] +* Add before-highlightall hook [[`70a8602`](https://github.com/PrismJS/prism/commit/70a8602)] +* Fix catastrophic backtracking regex issues in JavaScript [[`ab65be2`](https://github.com/PrismJS/prism/commit/ab65be2)] + +## 1.4.1 (2016-02-03) + +### Other changes + +* Fix DFS bug in Prism core [[`b86c727`](https://github.com/PrismJS/prism/commit/b86c727)] + +## 1.4.0 (2016-02-03) + +### New components + +* __Solarized Light__ ([#855](https://github.com/PrismJS/prism/pull/855)) [[`70846ba`](https://github.com/PrismJS/prism/commit/70846ba)] +* __JSON__ ([#370](https://github.com/PrismJS/prism/pull/370)) [[`ad2fcd0`](https://github.com/PrismJS/prism/commit/ad2fcd0)] + +### Updated components + +* __Show Language__: + * Remove data-language attribute ([#840](https://github.com/PrismJS/prism/pull/840)) [[`eb9a83c`](https://github.com/PrismJS/prism/commit/eb9a83c)] + * Allow custom label without a language mapping ([#837](https://github.com/PrismJS/prism/pull/837)) [[`7e74aef`](https://github.com/PrismJS/prism/commit/7e74aef)] +* __JSX__: + * Better Nesting in JSX attributes ([#842](https://github.com/PrismJS/prism/pull/842)) [[`971dda7`](https://github.com/PrismJS/prism/commit/971dda7)] +* __File Highlight__: + * Defer File Highlight until the full DOM has loaded. ([#844](https://github.com/PrismJS/prism/pull/844)) [[`6f995ef`](https://github.com/PrismJS/prism/commit/6f995ef)] +* __Coy Theme__: + * Fix coy theme shadows ([#865](https://github.com/PrismJS/prism/pull/865)) [[`58d2337`](https://github.com/PrismJS/prism/commit/58d2337)] +* __Show Invisibles__: + * Ensure show-invisibles compat with autoloader ([#874](https://github.com/PrismJS/prism/pull/874)) [[`c3cfb1f`](https://github.com/PrismJS/prism/commit/c3cfb1f)] + * Add support for the space character for the show-invisibles plugin ([#876](https://github.com/PrismJS/prism/pull/876)) [[`05442d3`](https://github.com/PrismJS/prism/commit/05442d3)] + +### New plugins + +* __Command Line__ ([#831](https://github.com/PrismJS/prism/pull/831)) [[`8378906`](https://github.com/PrismJS/prism/commit/8378906)] + +### Other changes + +* Use document.currentScript instead of document.getElementsByTagName() [[`fa98743`](https://github.com/PrismJS/prism/commit/fa98743)] +* Add prefix for Firefox selection and move prefixed rule first [[`6d54717`](https://github.com/PrismJS/prism/commit/6d54717)] +* No background for `` in `
` [[`8c310bc`](https://github.com/PrismJS/prism/commit/8c310bc)]
+* Fixing to initial copyright year [[`69cbf7a`](https://github.com/PrismJS/prism/commit/69cbf7a)]
+* Simplify the “lang” regex [[`417f54a`](https://github.com/PrismJS/prism/commit/417f54a)]
+* Fix broken heading links [[`a7f9e62`](https://github.com/PrismJS/prism/commit/a7f9e62)]
+* Prevent infinite recursion in DFS [[`02894e1`](https://github.com/PrismJS/prism/commit/02894e1)]
+* Fix incorrect page title [[`544b56f`](https://github.com/PrismJS/prism/commit/544b56f)]
+* Link scss to webplatform wiki [[`08d979a`](https://github.com/PrismJS/prism/commit/08d979a)]
+* Revert white-space to normal when code is inline instead of in a pre [[`1a971b5`](https://github.com/PrismJS/prism/commit/1a971b5)]
+
+## 1.3.0 (2015-10-26)
+
+### New components
+
+* __AsciiDoc__ ([#800](https://github.com/PrismJS/prism/issues/800)) [[`6803ca0`](https://github.com/PrismJS/prism/commit/6803ca0)]
+* __Haxe__ ([#811](https://github.com/PrismJS/prism/issues/811)) [[`bd44341`](https://github.com/PrismJS/prism/commit/bd44341)]
+* __Icon__ ([#803](https://github.com/PrismJS/prism/issues/803)) [[`b43c5f3`](https://github.com/PrismJS/prism/commit/b43c5f3)]
+* __Kotlin ([#814](https://github.com/PrismJS/prism/issues/814)) [[`e8a31a5`](https://github.com/PrismJS/prism/commit/e8a31a5)]
+* __Lua__ ([#804](https://github.com/PrismJS/prism/issues/804)) [[`a36bc4a`](https://github.com/PrismJS/prism/commit/a36bc4a)]
+* __Nix__ ([#795](https://github.com/PrismJS/prism/issues/795)) [[`9b275c8`](https://github.com/PrismJS/prism/commit/9b275c8)]
+* __Oz__ ([#805](https://github.com/PrismJS/prism/issues/805)) [[`388c53f`](https://github.com/PrismJS/prism/commit/388c53f)]
+* __PARI/GP__ ([#802](https://github.com/PrismJS/prism/issues/802)) [[`253c035`](https://github.com/PrismJS/prism/commit/253c035)]
+* __Parser__ ([#808](https://github.com/PrismJS/prism/issues/808)) [[`a953b3a`](https://github.com/PrismJS/prism/commit/a953b3a)]
+* __Puppet__ ([#813](https://github.com/PrismJS/prism/issues/813)) [[`81933ee`](https://github.com/PrismJS/prism/commit/81933ee)]
+* __Roboconf__ ([#812](https://github.com/PrismJS/prism/issues/812)) [[`f5db346`](https://github.com/PrismJS/prism/commit/f5db346)]
+
+### Updated components
+
+* __C__:
+	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
+* __C#__:
+	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
+	* Fix detection of float numbers ([#806](https://github.com/PrismJS/prism/issues/806)) [[`1dae72b`](https://github.com/PrismJS/prism/commit/1dae72b)]
+* __F#__:
+	* Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
+* __JavaScript__:
+	* Highlight true and false as booleans ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)]
+* __Python__:
+	* Highlight triple-quoted strings before comments. Fix [#815](https://github.com/PrismJS/prism/issues/815) [[`90fbf0b`](https://github.com/PrismJS/prism/commit/90fbf0b)]
+
+### New plugins
+
+* __Previewer: Time__ ([#790](https://github.com/PrismJS/prism/issues/790)) [[`88173de`](https://github.com/PrismJS/prism/commit/88173de)]
+* __Previewer: Angle__ ([#791](https://github.com/PrismJS/prism/issues/791)) [[`a434c86`](https://github.com/PrismJS/prism/commit/a434c86)]
+
+### Other changes
+
+* Increase mocha's timeout [[`f1c41db`](https://github.com/PrismJS/prism/commit/f1c41db)]
+* Prevent most errors in IE8. Fix [#9](https://github.com/PrismJS/prism/issues/9) [[`9652d75`](https://github.com/PrismJS/prism/commit/9652d75)]
+* Add U.S. Web Design Standards on homepage. Fix [#785](https://github.com/PrismJS/prism/issues/785) [[`e10d48b`](https://github.com/PrismJS/prism/commit/e10d48b), [`79ebbf8`](https://github.com/PrismJS/prism/commit/79ebbf8), [`2f7088d`](https://github.com/PrismJS/prism/commit/2f7088d)]
+* Added gulp task to autolink PRs and commits in changelog [[`5ec4e4d`](https://github.com/PrismJS/prism/commit/5ec4e4d)]
+* Use child processes to run each set of tests, in order to deal with the memory leak in vm.runInNewContext() [[`9a4b6fa`](https://github.com/PrismJS/prism/commit/9a4b6fa)]
+
+## 1.2.0 (2015-10-07)
+
+### New components
+
+* __Batch__ ([#781](https://github.com/PrismJS/prism/issues/781)) [[`eab5b06`](https://github.com/PrismJS/prism/commit/eab5b06)]
+
+### Updated components
+
+* __ASP.NET__:
+	* Simplified pattern for `
+
+
+
+
+
+
+
+
+ +

Customize your download

+

Select your compression level, as well as the languages and plugins you need.

+
+ +
+
+

+ Compression level: + + +

+ +
+ +

+ Total filesize: ( JavaScript + CSS) +

+

Note: The filesizes displayed refer to non-gizipped files and include any CSS code required. The CSS code is not minified.

+ +
+
+
+
+ Download JS +
+ +
+
+ Download CSS +
+
+ +
+ +
+ +
+ + + + + + + + + + diff --git a/docs/_style/prism-master/download.js b/docs/_style/prism-master/download.js new file mode 100644 index 0000000000..054da79d33 --- /dev/null +++ b/docs/_style/prism-master/download.js @@ -0,0 +1,598 @@ +/** + * Manage downloads + */ + +(function() { + +var cache = {}; +var form = $('form'); +var minified = true; + +var dependencies = {}; + +var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/gh-pages?recursive=1'; +var treePromise = new Promise(function(resolve) { + $u.xhr({ + url: treeURL, + callback: function(xhr) { + if (xhr.status < 400) { + resolve(JSON.parse(xhr.responseText).tree); + } + } + }); +}); + +var hstr = window.location.hash.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); +if (hstr) { + hstr.forEach(function(str) { + var kv = str.split('=', 2), + category = kv[0], + ids = kv[1].split('+'); + if (category !== 'meta' && category !== 'core' && components[category]) { + for (var id in components[category]) { + if (components[category][id].option) { + delete components[category][id].option; + } + } + if (category === 'themes' && ids.length) { + var themeInput = $('#theme input[value="' + ids[0] + '"]'); + if (themeInput) { + themeInput.checked = true; + } + setTheme(ids[0]); + } + var makeDefault = function (id) { + if (id !== 'meta') { + if (components[category][id]) { + if (components[category][id].option !== 'default') { + if (typeof components[category][id] === 'string') { + components[category][id] = { title: components[category][id] } + } + components[category][id].option = 'default'; + } + if (components[category][id].require) { + var deps = components[category][id].require; + if ($u.type(deps) !== 'array') { + deps = [deps]; + } + deps.forEach(makeDefault); + } + } + } + }; + ids.forEach(makeDefault); + } + }); +} + +// Stay compatible with old querystring feature +var qstr = window.location.search.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); +if (qstr && !hstr) { + window.location.hash = window.location.search.replace(/^\?/, ''); + window.location.search = ''; +} + +var storedTheme = localStorage.getItem('theme'); + +for (var category in components) { + var all = components[category]; + + all.meta.section = $u.element.create('section', { + className: 'options', + id: 'category-' + category, + contents: { + tag: 'h1', + contents: category.charAt(0).toUpperCase() + category.slice(1) + }, + inside: '#components' + }); + + if (all.meta.addCheckAll) { + $u.element.create('label', { + attributes: { + 'data-id': 'check-all-' + category + }, + contents: [ + { + tag: 'input', + properties: { + type: 'checkbox', + name: 'check-all-' + category, + value: '', + checked: false, + onclick: (function(category, all){ + return function () { + var checkAll = this; + $$('input[name="download-' + category + '"]').forEach(function(input) { + all[input.value].enabled = input.checked = checkAll.checked; + }); + + update(category); + }; + })(category, all) + } + }, + 'Select/unselect all' + ], + inside: all.meta.section + }); + } + + for (var id in all) { + if(id === 'meta') { + continue; + } + + var checked = false, disabled = false; + var option = all[id].option || all.meta.option; + + switch (option) { + case 'mandatory': disabled = true; // fallthrough + case 'default': checked = true; + } + if (category === 'themes' && storedTheme) { + checked = id === storedTheme; + } + + var filepath = all.meta.path.replace(/\{id}/g, id); + + var info = all[id] = { + title: all[id].title || all[id], + aliasTitles: all[id].aliasTitles, + noCSS: all[id].noCSS || all.meta.noCSS, + noJS: all[id].noJS || all.meta.noJS, + enabled: checked, + require: $u.type(all[id].require) === 'string' ? [all[id].require] : all[id].require, + after: $u.type(all[id].after) === 'string' ? [all[id].after] : all[id].after, + peerDependencies: $u.type(all[id].peerDependencies) === 'string' ? [all[id].peerDependencies] : all[id].peerDependencies, + owner: all[id].owner, + files: { + minified: { + paths: [], + size: 0 + }, + dev: { + paths: [], + size: 0 + } + } + }; + + if (info.require) { + info.require.forEach(function (v) { + dependencies[v] = (dependencies[v] || []).concat(id); + }); + } + + if (!all[id].noJS && !/\.css$/.test(filepath)) { + info.files.minified.paths.push(filepath.replace(/(\.js)?$/, '.min.js')); + info.files.dev.paths.push(filepath.replace(/(\.js)?$/, '.js')); + } + + + if ((!all[id].noCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) { + var cssFile = filepath.replace(/(\.css)?$/, '.css'); + + info.files.minified.paths.push(cssFile); + info.files.dev.paths.push(cssFile); + } + + function getLanguageTitle(lang) { + if (!lang.aliasTitles) + return lang.title; + + var titles = [lang.title]; + for (var alias in lang.aliasTitles) + if (lang.aliasTitles.hasOwnProperty(alias)) + titles.push(lang.aliasTitles[alias]); + return titles.join(" + "); + } + + var label = $u.element.create('label', { + attributes: { + 'data-id': id + }, + contents: [ + { + tag: 'input', + properties: { + type: all.meta.exclusive? 'radio' : 'checkbox', + name: 'download-' + category, + value: id, + checked: checked, + disabled: disabled, + onclick: (function(id, category, all){ + return function () { + $$('input[name="' + this.name + '"]').forEach(function(input) { + all[input.value].enabled = input.checked; + }); + + if (all[id].require && this.checked) { + all[id].require.forEach(function(v) { + var input = $('label[data-id="' + v + '"] > input'); + input.checked = true; + + input.onclick(); + }); + } + + if (dependencies[id] && !this.checked) { // It’s required by others + dependencies[id].forEach(function(dependent) { + var input = $('label[data-id="' + dependent + '"] > input'); + input.checked = false; + + input.onclick(); + }); + } + + update(category, id); + }; + })(id, category, all) + } + }, + all.meta.link? { + tag: 'a', + properties: { + href: all.meta.link.replace(/\{id}/g, id), + className: 'name' + }, + contents: info.title + } : { + tag: 'span', + properties: { + className: 'name' + }, + contents: getLanguageTitle(info) + }, + ' ', + all[id].owner? { + tag: 'a', + properties: { + href: 'https://github.com/' + all[id].owner, + className: 'owner', + target: '_blank' + }, + contents: all[id].owner + } : ' ', + { + tag: 'strong', + className: 'filesize' + } + ], + inside: all.meta.section + }); + + // Add click events on main theme selector too. + (function (label) { + if (category === 'themes') { + var themeInput = $('#theme input[value="' + id + '"]'); + var input = $('input', label); + if (themeInput) { + var themeInputOnclick = themeInput.onclick; + themeInput.onclick = function () { + input.checked = true; + input.onclick(); + themeInputOnclick && themeInputOnclick.call(themeInput); + }; + } + } + }(label)); + } +} + +form.elements.compression[0].onclick = +form.elements.compression[1].onclick = function() { + minified = !!+this.value; + + getFilesSizes(); +}; + +function getFileSize(filepath) { + return treePromise.then(function(tree) { + for(var i=0, l=tree.length; i i) { + notNow = true; + break; + } + } + if (notNow) { + var tmp = sorted[i]; + sorted[i] = sorted[indexOfRequirement]; + sorted[indexOfRequirement] = tmp; + } + else { + i++; + } + } + return sorted; +} + +function getSortedComponentsByRequirements(components, afterName) { + var sorted = getSortedComponents(components, afterName); + return getSortedComponents(components, "require", sorted); +} + +function generateCode(){ + var promises = []; + var redownload = {}; + + for (var category in components) { + var all = components[category]; + + // In case if one component requires other, required component should go first. + var sorted = getSortedComponentsByRequirements(all, category === 'languages' ? 'peerDependencies' : 'after'); + + for (var i = 0; i < sorted.length; i++) { + var id = sorted[i]; + + if(id === 'meta') { + continue; + } + + var info = all[id]; + if (info.enabled) { + if (category !== 'core') { + redownload[category] = redownload[category] || []; + redownload[category].push(id); + } + info.files[minified? 'minified' : 'dev'].paths.forEach(function (path) { + if (cache[path]) { + var type = path.match(/\.(\w+)$/)[1]; + + promises.push({ + contentsPromise: cache[path].contentsPromise, + path: path, + type: type + }); + } + }); + } + } + } + + // Hide error message if visible + var error = $('#download .error'); + error.style.display = ''; + + Promise.all([buildCode(promises), getVersion()]).then(function(arr) { + var res = arr[0]; + var version = arr[1]; + var code = res.code; + var errors = res.errors; + + if(errors.length) { + error.style.display = 'block'; + error.innerHTML = ''; + $u.element.contents(error, errors); + } + + var redownloadUrl = window.location.href.split("#")[0] + "#"; + for (var category in redownload) { + redownloadUrl += category + "=" + redownload[category].join('+') + "&"; + } + redownloadUrl = redownloadUrl.replace(/&$/,""); + window.location.replace(redownloadUrl); + + var versionComment = "/* PrismJS " + version + "\n" + redownloadUrl + " */"; + + for (var type in code) { + var codeElement = $('#download-' + type + ' code'); + + codeElement.textContent = versionComment + "\n" + code[type]; + Prism.highlightElement(codeElement, true); + + $('#download-' + type + ' .download-button').href = 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(versionComment + "\n" + code[type]); + } + }); +} + +function buildCode(promises) { + var i = 0, + l = promises.length; + var code = {js: '', css: ''}; + var errors = []; + + var f = function(resolve) { + if(i < l) { + var p = promises[i]; + p.contentsPromise.then(function(contents) { + code[p.type] += contents + (p.type === 'js' && !/;\s*$/.test(contents) ? ';' : '') + '\n'; + i++; + f(resolve); + }); + p.contentsPromise['catch'](function() { + errors.push($u.element.create({ + tag: 'p', + prop: { + textContent: 'An error occurred while fetching the file "' + p.path + '".' + } + })); + i++; + f(resolve); + }); + } else { + resolve({code: code, errors: errors}); + } + }; + + return new Promise(f); +} + +function getVersion() { + return getFileContents('./package.json').then(function (jsonStr) { + return JSON.parse(jsonStr).version; + }); +} + +})(); diff --git a/docs/_style/prism-master/examples.html b/docs/_style/prism-master/examples.html new file mode 100644 index 0000000000..b7dce551ce --- /dev/null +++ b/docs/_style/prism-master/examples.html @@ -0,0 +1,110 @@ + + + + + + +Examples ▲ Prism + + + + + + + + + + +
+
+ +

Examples

+

The examples in this page serve a dual purpose: They act as unit tests, making it easy to spot bugs, and at the same time demonstrate what Prism can do, on simple and on edge cases.

+
+ +
+

Different markup

+ +

code.language-css

+ p { color: red; } + +

pre.language-css > code

+
p { color: red; }
+ +

pre > code.language-css

+
p { color: red; }
+ +

pre.language-css > code.language-*

+
p { color: red; }
+ +

code.lang-css

+ p { color: red; } + +

pre.lang-css > code

+
p { color: red; }
+ +

pre > code

+

No language, should inherit .language-markup

+
<p>hi!</p>
+ +

code.language-*

+

No language, should inherit .language-markup

+ <p>hi!</p> + +

code.language-none

+

Should not be highlighted.

+ <p>hi!</p> +
+ +
+

Per language examples

+
+
+
+ +
+ + + + + + + + + + diff --git a/docs/_style/prism-master/examples.js b/docs/_style/prism-master/examples.js new file mode 100644 index 0000000000..ba275c5559 --- /dev/null +++ b/docs/_style/prism-master/examples.js @@ -0,0 +1,217 @@ +/** + * Manage examples + */ + +(function() { + +var examples = {}; + +var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/gh-pages?recursive=1'; +var treePromise = new Promise(function (resolve) { + $u.xhr({ + url: treeURL, + callback: function (xhr) { + if (xhr.status < 400) { + resolve(JSON.parse(xhr.responseText).tree); + } + } + }); +}); + +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; + } + + language.enabled = checked; + 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); + } + } + }, + language.title + ], + inside: '#languages' + }); + examples[id] = $u.element.create('section', { + 'id': 'language-' + id, + 'className': 'language-' + id, + inside: '#examples' + }); + if (checked) { + update(id); + } + }); + }(id)); +} + +function fileExists(filepath) { + return treePromise.then(function (tree) { + for (var i = 0, l = tree.length; i < l; i++) { + if (tree[i].path === filepath) { + return true; + } + } + return false; + }); +} + +function getFileContents(filepath) { + return new Promise(function (resolve, reject) { + $u.xhr({ + url: filepath, + callback: function (xhr) { + if (xhr.status < 400 && xhr.responseText) { + resolve(xhr.responseText); + } else { + reject(); + } + } + }); + }); +} + +function buildContentsHeader(id) { + var language = languages[id]; + var header = '

' + language.title + '

'; + if (language.overrideExampleHeader) { + return header; + } + if (language.alias) { + var alias = language.alias; + if (Prism.util.type(alias) !== 'Array') { + alias = [alias]; + } + + header += '

To use this language, use one of the following classes:

'; + header += '
  • "language-' + id + '"
  • '; + alias.forEach(function (alias) { + header += '
  • "language-' + alias + '"
  • '; + }); + header += '
'; + } else { + header += '

To use this language, use the class "language-' + id + '".

'; + } + if (language.require) { + var require = language.require; + if (Prism.util.type(require) !== 'Array') { + require = [require]; + } + + header += '

Dependencies: The following dependencies need to be loaded before this component: '; + header += require.map(function (dep) { + return '' + dep + ''; + }).join(', '); + header += '.

'; + } + return header; +} + +function update(id) { + var language = languages[id]; + if (language.enabled) { + if (!language.examplesPromise) { + language.examplesPromise = getFileContents(language.examplesPath); + } + language.examplesPromise.then(function (contents) { + 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); + } + }); + }); + } else { + examples[id].innerHTML = ''; + } +} + +/** + * 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 + */ +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..) + // + // We load an array of all dependencies and call recursively this function on each entry + // + // dependencies is now an (possibly empty) array of loading-promises + var dependencies = getDependenciesOfLanguage(lang).map(loadLanguage); + + // We create a promise, which will resolve, as soon as all dependencies are loaded. + // They need to be fully loaded because the main language may extend them. + return Promise.all(dependencies) + .then(function () { + + // If the main language itself isn't already loaded, load it now + // and return the newly created promise (we chain the promises). + // If the language is already loaded, just do nothing - the next .then() + // will immediately be called + if (!Prism.languages[lang]) { + return new Promise(function (resolve) { + $u.script('components/prism-' + lang + '.js', resolve); + }); + } + }); +} + + +/** + * Returns all dependencies (as identifiers) of a specific language + * + * @param {string} lang + * @returns {Array.} the list of dependencies. Empty if the language has none. + */ +function getDependenciesOfLanguage (lang) +{ + if (!components.languages[lang] || !components.languages[lang].require) + { + return []; + } + + return ($u.type(components.languages[lang].require) === "array") + ? components.languages[lang].require + : [components.languages[lang].require]; +} + +}()); diff --git a/docs/_style/prism-master/examples/prism-abap.html b/docs/_style/prism-master/examples/prism-abap.html new file mode 100644 index 0000000000..dfda1f7f18 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-abap.html @@ -0,0 +1,65 @@ +

Comments

+

+* Line Comments
+" End of line comment used as line comment.
+value = 1. " End of line comment
+
+DATA:
+  "! ABAPDoc comment
+  value TYPE i.
+
+ +

Strings

+ +

+my_string = 'Simple string'.
+my_string = 'String with an escaped '' inside'.
+my_string = |A string template: { nvalue } times|.
+my_string = |A string template: { nvalue } times|.
+my_string = |Characters \|, \{, and \} have to be escaped by \\ in literal text.|. 
+
+ +

Numbers and Operators

+ +

+value = 001 + 2 - 3 * 4 / 5 ** 6.
+
+IF value < 1 OR
+   value = 2 OR
+   value > 3 OR
+   value <> 4 OR
+   value <= 5 OR
+   value >= 6.
+ENDIF.
+
+" Dynamic object assignment (with type cast check)
+lo_interface ?= lo_class.
+
+ +

Structures and Classes

+ +

+DATA:
+  BEGIN OF my_structure,
+    scomponent TYPE i,
+  END OF my_structure.
+
+CLASS lcl_my_class DEFINITION.
+  PUBLIC SECTION.
+    METHODS my_method
+      RETURNING
+        VALUE(ret_value) TYPE i.
+ENDCLASS.
+
+CLASS lcl_my_class IMPLEMENTATION.
+  METHOD my_method.
+    ret_value = 1.
+  ENDMETHOD
+ENDCLASS.
+
+DATA lo_instace TYPE REF TO lcl_my_class.
+
+CREATE OBJECT lo_instace.
+
+my_structure-component = lo_instace->my_method( ).
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-actionscript.html b/docs/_style/prism-master/examples/prism-actionscript.html new file mode 100644 index 0000000000..abb5804dbb --- /dev/null +++ b/docs/_style/prism-master/examples/prism-actionscript.html @@ -0,0 +1,133 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Literal values

+
17
+"hello"
+-3
+9.4
+null
+true
+false
+ +

Classes

+
class A {}
+class B extends A {}
+ +

Inline XML

+
var employees:XML =
+    <employees>
+        <employee ssn="123-123-1234">
+            <name first="John" last="Doe"/>
+            <address>
+                <city>San Francisco</city>
+                <state>CA</state>
+                <zip>98765</zip>
+            </address>
+        </employee>
+        <employee ssn="789-789-7890">
+            <name first="Mary" last="Roe"/>
+            <address>
+                <city>Newton</city>
+                <state>MA</state>
+                <zip>01234</zip>
+            </address>
+        </employee>
+    </employees>;
+ +

Full example

+
package {
+  import flash.display.*;
+  import flash.events.*;
+  import flash.filters.BlurFilter;
+  import flash.geom.*;
+  import flash.ui.*;
+  public class ch23ex2 extends Sprite {
+    protected const BMP_SCALE:Number = 1/2;
+    protected const D:Number = 1.015;
+    protected const DIM_EFFECT:ColorTransform = new ColorTransform(D, D, D);
+    protected const B:int = 16;
+    protected const BLUR_EFFECT:BlurFilter = new BlurFilter(B, B, 1);
+    protected var RLUT:Array, GLUT:Array, BLUT:Array;
+    protected var sourceBmp:BitmapData;
+    protected var colorBmp:BitmapData;
+    protected var touches:Array = new Array();
+    protected var fingerShape:Shape = new Shape();
+    public function ch23ex2() {
+      try {
+        var test:Class = Multitouch;
+        if (Multitouch.supportsTouchEvents) {
+          Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
+          init();
+        } else {
+          trace("Sorry, this example requires multitouch.");
+        }
+      } catch (error:ReferenceError) {
+        trace("Sorry, but multitouch is not supported in this runtime.");
+      }
+    }
+    protected function init():void {
+      //create a black-and-white bitmap and a color bitmap, only show the color
+      sourceBmp = new BitmapData(
+        stage.stageWidth*BMP_SCALE, stage.stageHeight*BMP_SCALE, false, 0);
+      colorBmp = sourceBmp.clone();
+      var bitmap:Bitmap = new Bitmap(colorBmp, PixelSnapping.ALWAYS, true);
+      bitmap.width = stage.stageWidth; bitmap.height = stage.stageHeight;
+      addChild(bitmap);
+
+      //create finger shape to paste onto the bitmap under your touches
+      fingerShape.graphics.beginFill(0xffffff, 0.1);
+      fingerShape.graphics.drawEllipse(-15, -20, 30, 40);
+      fingerShape.graphics.endFill();
+
+      //create the palette map from a gradient
+      var gradient:Shape = new Shape();
+      var m:Matrix = new Matrix();
+      m.createGradientBox(256, 10);
+      gradient.graphics.beginGradientFill(GradientType.LINEAR,
+        [0x313ad8, 0x2dce4a, 0xdae234, 0x7a1c1c, 0x0f0303],
+        [1, 1, 1, 1, 1], [0, 0.4*256, 0.75*256, 0.9*256, 255], m);
+      gradient.graphics.drawRect(0, 0, 256, 10);
+      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++) {
+        var pixelColor:uint = gradientBmp.getPixel(i, 0);
+        //I drew the gradient backwards, so sue me
+        RLUT[256-i] = pixelColor & 0xff0000;
+        GLUT[256-i] = pixelColor & 0x00ff00;
+        BLUT[256-i] = pixelColor & 0x0000ff;
+      }
+
+      stage.addEventListener(TouchEvent.TOUCH_BEGIN, assignTouch);
+      stage.addEventListener(TouchEvent.TOUCH_MOVE, assignTouch);
+      stage.addEventListener(TouchEvent.TOUCH_END, removeTouch);
+      stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
+    }
+    protected function assignTouch(event:TouchEvent):void {
+      touches[event.touchPointID] = event;
+    }
+    protected function removeTouch(event:TouchEvent):void {
+      delete touches[event.touchPointID];
+    }
+    protected function onEnterFrame(event:Event):void {
+      for (var key:String in touches) {
+        var touch:TouchEvent = touches[key] as TouchEvent;
+        if (touch) {
+          //plaster the finger image under your finger
+          var m:Matrix = new Matrix();
+          m.translate(touch.stageX*BMP_SCALE, touch.stageY*BMP_SCALE);
+          sourceBmp.draw(fingerShape, m, null, BlendMode.ADD);
+        }
+      }
+      var O:Point = new Point(0, 0);
+      //blur and ever-so-slightly brighten the image to make the color last
+      sourceBmp.applyFilter(sourceBmp, sourceBmp.rect, O, BLUR_EFFECT);
+      sourceBmp.colorTransform(sourceBmp.rect, DIM_EFFECT);
+      //we've calculated the image in grayscale brightnesses, now make it color
+      colorBmp.paletteMap(sourceBmp, sourceBmp.rect, O, RLUT, GLUT, BLUT, null);
+    }
+  }
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-ada.html b/docs/_style/prism-master/examples/prism-ada.html new file mode 100644 index 0000000000..1783027e7e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-ada.html @@ -0,0 +1,35 @@ +

Strings

+
"foo ""bar"" baz"
+"Multi-line strings are appended with a " &
+"ampersand symbole."
+ +

Ada83 example

+
WITH ADA.TEXT_IO;
+
+--  Comments look like this.
+
+PROCEDURE TEST IS
+BEGIN
+   ADA.TEXT_IO.PUT_LINE ("Hello");   --  Comments look like this.
+END TEST;
+ +

Ada 2012 full example

+
with Ada.Text_IO; Use Ada.Text_IO;
+
+--  Comments look like this.
+procedure Test is
+   procedure Bah with
+    Import        => True,   --  Shows the new aspect feature of the language.
+    Convention    => C,
+    External_Name => "bah";
+
+   type Things is range 1 .. 10;
+begin
+   Put_Line ("Hello");   --  Comments look like this.
+
+   Bah;  -- Call C function.
+
+   for Index in Things'Range loop
+      null;
+   end loop;
+end Test;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-apacheconf.html b/docs/_style/prism-master/examples/prism-apacheconf.html new file mode 100644 index 0000000000..f6953e1b0d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-apacheconf.html @@ -0,0 +1,54 @@ +

Comments

+
# This is a comment
+# <VirtualHost *:80>
+
+ +

Directives

+
<Files .htaccess>
+	Order allow,deny
+	Deny from all
+</Files>
+
+ +

Variables

+
RewriteCond %{REQUEST_FILENAME}.php -f
+ +

Regex

+
^(.*)$
+!^www\.
+ +

Directive flags

+
[NC]
+[RC=301,L]
+ +

Strings

+
AuthName "Fichiers réservés"
+ +

Full example

+
## BASIC PASSWORD PROTECTION
+AuthType basic
+AuthName "prompt"
+AuthUserFile /.htpasswd
+AuthGroupFile /dev/null
+Require valid-user
+
+## ALLOW FROM IP OR VALID PASSWORD
+Require valid-user
+Allow from 192.168.1.23
+Satisfy Any
+
+## PROTECT FILES
+Order Allow,Deny
+Deny from all
+
+## REQUIRE SUBDOMAIN
+RewriteCond %{HTTP_HOST} !^$
+RewriteCond %{HTTP_HOST} !^subdomain\.domain\.tld$ [NC]
+RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1 [L,R=301]
+
+ErrorDocument 403 http://www.example.com/logo.gif
+ErrorDocument 403 /images/you_bad_hotlinker.gif
+
+## REDIRECT UPLOADS
+RewriteCond %{REQUEST_METHOD} ^(PUT|POST)$ [NC]
+RewriteRule ^(.*)$ /cgi-bin/form-upload-processor.cgi?p=$1 [L,QSA]
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-apl.html b/docs/_style/prism-master/examples/prism-apl.html new file mode 100644 index 0000000000..61a7e4694c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-apl.html @@ -0,0 +1,26 @@ +

Comments

+
#!/usr/bin/env runapl
+a←1 2 3 ⍝ this is a comment
+ +

Strings

+
''
+'foobar'
+'foo''bar''baz'
+ +

Numbers

+
42
+3.14159
+¯2
+∞
+2.8e¯4
+2j3
+¯4.3e2J1.9e¯4
+ +

Primitive functions

+
a+b×c⍴⍳10
+ +

Operators

+
+/ f⍣2
+ +

Dfns

+
{0=⍴⍴⍺:'hello' ⋄ ∇¨⍵}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-applescript.html b/docs/_style/prism-master/examples/prism-applescript.html new file mode 100644 index 0000000000..c88390e819 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-applescript.html @@ -0,0 +1,41 @@ +

Comments

+
-- Single line comment
+#!/usr/bin/osascript
+(* Here is
+a block
+comment *)
+ +

Strings

+
"foo \"bar\" baz"
+ +

Operators

+
a ≠ b
+12 + 2 * 5
+"DUMPtruck" is equal to "dumptruck"
+"zebra" comes after "aardvark"
+{ "this", "is", 2, "cool" } starts with "this"
+{ "is", 2} is contained by { "this", "is", 2, "cool" }
+set docRef to a reference to the first document
+
+ +

Classes and units

+
tell application "Finder"
+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
+
+ +

Known failures

+

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. +

+ +

Comments only support one level of nesting

+
(* Nested block
+	(* comments
+		(* on more than
+		2 levels *)
+	are *)
+not supported *)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-arduino.html b/docs/_style/prism-master/examples/prism-arduino.html new file mode 100644 index 0000000000..915f700f48 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-arduino.html @@ -0,0 +1,63 @@ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings ending with a \
+are supported too."
+ +

Macro statements

+
#include <Bridge.h>
+#define SOME_PIN 11
+
+ +

Booleans

+
true;
+false;
+ +

Operators

+
a < b;
+c && d;
+ +

Full example

+
#include <Bridge.h>
+
+// pin of the piezo speaker
+int piezo = 8;
+
+/**
+ * setups
+ * runs once before everyhing else
+ */
+void setup() {
+    pinMode(piezo, OUTPUT);     
+}
+
+/**
+ * loop
+ * this will run forever and do what we want
+ */
+void loop() {
+    playMelody(1);
+    delay(1000);
+}
+
+/**
+ * playMelody
+ * will play a simple melody on piezo speaker
+ */
+void playMelody(int times) {
+    int melody[] = { 4699, 4699, 3520, 4699 };
+    int duration = 6;
+
+    for( int t = 0; t < times; t++ ) {
+        for( int i = 0; i < 4; i++ ) {
+            // pass tone to selected pin
+            tone(piezoPin, melody[i], 1000/duration);
+
+            // get a bit of time between the tones
+            delay(1000 / duration * 1.30 + 80);
+
+            // and don't forget to switch of the tone afterwards
+            noTone(piezoPin);
+        }
+    }
+}
diff --git a/docs/_style/prism-master/examples/prism-arff.html b/docs/_style/prism-master/examples/prism-arff.html new file mode 100644 index 0000000000..418120996a --- /dev/null +++ b/docs/_style/prism-master/examples/prism-arff.html @@ -0,0 +1,46 @@ +

Comments

+
%
+% Some comments
+%
+%
+ +

Keywords

+
@attribute
+@data
+@relation
+ +

Numbers

+
42
+0.14
+ +

Strings

+
'Single \'quoted\' string'
+"Double \"quoted\" string"
+ +

Full example

+
% 1. Title: Iris Plants Database
+%
+% 2. Sources:
+%      (a) Creator: R.A. Fisher
+%      (b) Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)
+%      (c) Date: July, 1988
+%
+@RELATION iris
+
+@ATTRIBUTE sepallength  NUMERIC
+@ATTRIBUTE sepalwidth   NUMERIC
+@ATTRIBUTE petallength  NUMERIC
+@ATTRIBUTE petalwidth   NUMERIC
+@ATTRIBUTE class        {Iris-setosa,Iris-versicolor,Iris-virginica}
+
+@DATA
+5.1,3.5,1.4,0.2,Iris-setosa
+4.9,3.0,1.4,0.2,Iris-setosa
+4.7,3.2,1.3,0.2,Iris-setosa
+4.6,3.1,1.5,0.2,Iris-setosa
+5.0,3.6,1.4,0.2,Iris-setosa
+5.4,3.9,1.7,0.4,Iris-setosa
+4.6,3.4,1.4,0.3,Iris-setosa
+5.0,3.4,1.5,0.2,Iris-setosa
+4.4,2.9,1.4,0.2,Iris-setosa
+4.9,3.1,1.5,0.1,Iris-setosa
diff --git a/docs/_style/prism-master/examples/prism-asciidoc.html b/docs/_style/prism-master/examples/prism-asciidoc.html new file mode 100644 index 0000000000..d6df3021b5 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-asciidoc.html @@ -0,0 +1,104 @@ +

Comments

+
/////
+Comment block
+/////
+
+// Comment line
+ +

Titles

+
Level 0
+========
+Level 1
+--------
+Level 2
+~~~~~~~~
+Level 3
+^^^^^^^^
+Level 4
+++++++++
+
+= Document Title (level 0) =
+== Section title (level 1) ==
+=== Section title (level 2) ===
+==== Section title (level 3) ====
+===== Section title (level 4) =====
+
+.Notes
+ +

Blocks

+
++++++++++++++++++++++++++
+Passthrough block
+++++++++++++++++++++++++++
+
+--------------------------
+Listing block
+--------------------------
+
+..........................
+Literal block
+No *highlighting* _here_
+..........................
+
+**************************
+Sidebar block
+**************************
+
+[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
+_____________________________________________________________________
+Sir, a woman's preaching is like a dog's walking on his hind legs. It
+is not done well; but you are surprised to find it done at all.
+_____________________________________________________________________
+
+==========================
+Example block
+==========================
+ +

Lists

+
- List item.
+* List item.
+** List item.
+*** List item.
+**** List item.
+***** List item.
+
+1.   Arabic (decimal) numbered list item.
+a.   Lower case alpha (letter) numbered list item.
+F.   Upper case alpha (letter) numbered list item.
+iii) Lower case roman numbered list item.
+IX)  Upper case roman numbered list item.
+
+. Arabic (decimal) numbered list item.
+.. Lower case alpha (letter) numbered list item.
+... Lower case roman numbered list item.
+.... Upper case alpha (letter) numbered list item.
+..... Upper case roman numbered list item.
+
+Dolor::
+  Donec eget arcu bibendum nunc consequat lobortis.
+  Suspendisse;;
+    A massa id sem aliquam auctor.
+  Morbi;;
+    Pretium nulla vel lorem.
+  In;;
+    Dictum mauris in urna.
+    Vivamus::: Fringilla mi eu lacus.
+    Donec:::   Eget arcu bibendum nunc consequat lobortis.
+ +

Tables

+
[cols="e,m,^,>s",width="25%"]
+|============================
+|1 >s|2 |3 |4
+^|5 2.2+^.^|6 .3+<.>m|7
+^|8
+|9 2+>|10
+|============================
+ +

Inline styles

+
*Some bold text*
+This is an _emphasis_
+[[[walsh-muellner]]]
+ +

Attribute entries

+
:Author Initials: JB
+{authorinitials}
+:Author Initials!:
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-asm6502.html b/docs/_style/prism-master/examples/prism-asm6502.html new file mode 100644 index 0000000000..21f4b687f8 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-asm6502.html @@ -0,0 +1,39 @@ +

Comments

+
; This is a comment
+ +

Labels

+
label1:   ; a label
+ +

Opcodes

+

+SEI
+CLC
+
+; lowercase
+inx
+bne label1
+
+ +

Assembler directives

+

+.segment CODE
+.word $07d3
+
+ +

Registers

+

+ASL A  ; "A"
+LDA label1,x  ; "x"
+
+ +

Strings

+

+.include "header.asm"
+
+ +

Numbers

+

+LDA #127
+STA $80f0
+LDY #%01011000
+
diff --git a/docs/_style/prism-master/examples/prism-aspnet.html b/docs/_style/prism-master/examples/prism-aspnet.html new file mode 100644 index 0000000000..d9c30fcf96 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-aspnet.html @@ -0,0 +1,36 @@ +

Comments

+
<%-- This is a comment --%>
+<%-- This is a
+multi-line comment --%>
+ +

Page directives

+
<%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"  CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
+
+ +

Directive tag

+
<%: Page.Title %>
+<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
+<span>
+    <%#:Item.ProductName%>
+</span>
+ +

Highlighted C# inside scripts

+

This requires the C# component to be loaded. + On this page, check C# before checking ASP.NET should make + the example below work properly.

+
<script runat="server">
+    // 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;
+
+        return inpt * factor;
+    }
+</script>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-autohotkey.html b/docs/_style/prism-master/examples/prism-autohotkey.html new file mode 100644 index 0000000000..620edb2eab --- /dev/null +++ b/docs/_style/prism-master/examples/prism-autohotkey.html @@ -0,0 +1,68 @@ +

Comments

+
; This is a comment
+ +

Strings

+
"foo ""bar"" baz"
+ +

Numbers

+
123
+123.456
+123.456e789
+0xAF
+ +

Full example

+
;----Open the selected favorite
+f_OpenFavorite:
+; Fetch the array element that corresponds to the selected menu item:
+StringTrimLeft, f_path, f_path%A_ThisMenuItemPos%, 0
+if f_path =
+    return
+if f_class = #32770    ; It's a dialog.
+{
+    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:
+        WinActivate ahk_id %f_window_id%
+        ; Retrieve any filename that might already be in the field so
+        ; that it can be restored after the switch to the new folder:
+        ControlGetText, f_text, Edit1, ahk_id %f_window_id%
+        ControlSetText, Edit1, %f_path%, ahk_id %f_window_id%
+        ControlSend, Edit1, {Enter}, ahk_id %f_window_id%
+        Sleep, 100  ; It needs extra time on some dialogs or in some cases.
+        ControlSetText, Edit1, %f_text%, ahk_id %f_window_id%
+        return
+    }
+    ; else fall through to the bottom of the subroutine to take standard action.
+}
+else if f_class in ExploreWClass,CabinetWClass  ; In Explorer, switch folders.
+{
+    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
+        ; then the addressbar shows http://www.L:\folder.com. To solve this,
+        ; I added a {right} before {Enter}":
+        ControlSend, Edit1, {Right}{Enter}, ahk_id %f_window_id%
+        return
+    }
+    ; else fall through to the bottom of the subroutine to take standard action.
+}
+else if f_class = ConsoleWindowClass ; In a console window, CD to that directory
+{
+    WinActivate, ahk_id %f_window_id% ; Because sometimes the mclick deactivates it.
+    SetKeyDelay, 0  ; This will be in effect only for the duration of this thread.
+    IfInString, f_path, :  ; It contains a drive letter
+    {
+        StringLeft, f_path_drive, f_path, 1
+        Send %f_path_drive%:{enter}
+    }
+    Send, cd %f_path%{Enter}
+    return
+}
+; Since the above didn't return, one of the following is true:
+; 1) It's an unsupported window type but f_AlwaysShowMenu is y (yes).
+; 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
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-autoit.html b/docs/_style/prism-master/examples/prism-autoit.html new file mode 100644 index 0000000000..51220b421c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-autoit.html @@ -0,0 +1,52 @@ +

Comments

+
; Single-line comment
+#comments-start
+	Multi-line
+	comment
+#comments-end
+#cs
+	Multi-line
+	comment
+#ce
+;#comments-start
+	foo()
+;#comments-end
+ +

Strings

+
"foo'bar'baz"
+"foo""bar""baz"
+'foo"bar"baz'
+'foo''bar''baz'
+ +

Numbers

+
2
+4.566
+1.5e3
+0x4fff
+ +

Booleans

+
True
+False
+ +

Keywords and variables

+
; Display all the numbers for 1 to 10 but skip displaying  7.
+For $i = 1 To 10
+    If $i = 7 Then
+        ContinueLoop ; Skip displaying the message box when $i is equal to 7.
+    EndIf
+    MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i)
+Next
+ +

Known failures

+

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. +

+ +

Nested block comments

+
#cs
+	#cs
+		foo()
+	#ce
+#ce
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-bash.html b/docs/_style/prism-master/examples/prism-bash.html new file mode 100644 index 0000000000..3e0febfaba --- /dev/null +++ b/docs/_style/prism-master/examples/prism-bash.html @@ -0,0 +1,49 @@ +

Shebang

+
#!/bin/bash
+ +

Comments

+
# This is a comment
+ +

Strings

+
STRING="Hello World"
+'Single and
+multi-line strings are supported.'
+"Single and
+multi-line strings are supported."
+cat << EOF
+Here-Documents
+are also supported
+EOF
+ +

Variables

+
echo $STRING
+args=("$@")
+echo ${args[0]} ${args[1]} ${args[2]}
+ +

Keywords

+
for (( i=0;i<$ELEMENTS;i++)); do
+	echo ${ARRAY[${i}]}
+done
+while read LINE; do
+    ARRAY[$count]=$LINE
+    ((count++))
+done
+if [ -d $directory ]; then
+	echo "Directory exists"
+else
+	echo "Directory does not exists"
+fi
+
+ +

Some well-known commands

+
crontab -l -u USER | grep -v 'YOUR JOB COMMAND or PATTERN' | crontab -u USER -
+
+groups user1 user2|cut -d: -f2|xargs -n1|sort|uniq -d
+
+wget -q -O - http://www.example.com/automation/remotescript.sh | bash /dev/stdin parameter1 parameter2
+
+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
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-basic.html b/docs/_style/prism-master/examples/prism-basic.html new file mode 100644 index 0000000000..3630a8a2c0 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-basic.html @@ -0,0 +1,69 @@ +

Note: this component focuses on first and second-generation BASICs (such as MSX BASIC, GW-BASIC, SuperBASIC, QuickBASIC, PowerBASIC...).

+ +

Comments

+
! This is a comment
+REM This is a remark
+ +

Strings

+
"This a string."
+"This is a string with ""quotes"" in it."
+ +

Numbers

+
42
+3.14159
+-42
+-3.14159
+.5
+10.
+2E10
+4.2E-14
+-3E+2
+ +

Dartmouth Basic example

+
5 LET S = 0
+10 MAT INPUT V
+20 LET N = NUM
+30 IF N = 0 THEN 99
+40 FOR I = 1 TO N
+45 LET S = S + V(I)
+50 NEXT I
+60 PRINT S/N
+70 GO TO 5
+99 END
+ +

GW-BASIC example

+
10 INPUT "What is your name: ", U$
+20 PRINT "Hello "; U$
+30 INPUT "How many stars do you want: ", N
+40 S$ = ""
+50 FOR I = 1 TO N
+60 S$ = S$ + "*"
+70 NEXT I
+80 PRINT S$
+90 INPUT "Do you want more stars? ", A$
+100 IF LEN(A$) = 0 THEN GOTO 90
+110 A$ = LEFT$(A$, 1)
+120 IF A$ = "Y" OR A$ = "y" THEN GOTO 30
+130 PRINT "Goodbye "; U$
+140 END
+ +

QuickBASIC example

+
DECLARE SUB PrintSomeStars (StarCount!)
+REM QuickBASIC example
+INPUT "What is your name: ", UserName$
+PRINT "Hello "; UserName$
+DO
+   INPUT "How many stars do you want: ", NumStars
+   CALL PrintSomeStars(NumStars)
+   DO
+      INPUT "Do you want more stars? ", Answer$
+   LOOP UNTIL Answer$ <> ""
+   Answer$ = LEFT$(Answer$, 1)
+LOOP WHILE UCASE$(Answer$) = "Y"
+PRINT "Goodbye "; UserName$
+
+SUB PrintSomeStars (StarCount)
+   REM This procedure uses a local variable called Stars$
+   Stars$ = STRING$(StarCount, "*")
+   PRINT Stars$
+END SUB
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-batch.html b/docs/_style/prism-master/examples/prism-batch.html new file mode 100644 index 0000000000..13f9018c00 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-batch.html @@ -0,0 +1,17 @@ +

Comments

+
::
+:: Foo bar
+REM This is a comment too
+REM Multi-line ^
+comment
+ +

Labels

+
:foobar
+GOTO :EOF
+ +

Commands

+
@ECHO OFF
+FOR /l %%a in (5,-1,1) do (TITLE %title% -- closing in %%as)
+SET title=%~n0
+if /i "%InstSize:~0,1%"=="M" set maxcnt=3
+ping -n 2 -w 1 127.0.0.1
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-bison.html b/docs/_style/prism-master/examples/prism-bison.html new file mode 100644 index 0000000000..9c7edeb8da --- /dev/null +++ b/docs/_style/prism-master/examples/prism-bison.html @@ -0,0 +1,104 @@ +

Comments

+
// Single-line comment
+/* Multi-line
+comment */
+ +

C prologue and Bison declarations

+
%{
+  #include <stdio.h>
+  #include <math.h>
+  int yylex (void);
+  void yyerror (char const *);
+%}
+
+%define api.value.type {double}
+%token NUM
+%union { char *string; }
+%%
+%%
+ +

Grammar rules

+
%%
+exp:
+  NUM           { $$ = $1;           }
+| exp exp '+'   { $$ = $1 + $2;      }
+| exp exp '-'   { $$ = $1 - $2;      }
+| exp exp '*'   { $$ = $1 * $2;      }
+| exp exp '/'   { $$ = $1 / $2;      }
+| exp exp '^'   { $$ = pow($1, $2);  }  /* Exponentiation */
+| exp 'n'       { $$ = -$1;          }  /* Unary minus    */
+;
+
+$@1: %empty { a(); };
+$@2: %empty { c(); };
+$@3: %empty { d(); };
+exp: $@1 "b" $@2 $@3 "e" { f(); };
+%%
+ +

Full example

+
/* Mini Calculator */
+/* calc.y */
+
+%{
+#include "heading.h"
+int yyerror(char *s);
+int yylex(void);
+%}
+
+%union{
+  int		int_val;
+  string*	op_val;
+}
+
+%start	input 
+
+%token	<int_val>	INTEGER_LITERAL
+%type	<int_val>	exp
+%left	PLUS
+%left	MULT
+
+%%
+
+input:		/* empty */
+		| exp	{ cout << "Result: " << $1 << endl; }
+		;
+
+exp:		INTEGER_LITERAL	{ $$ = $1; }
+		| exp PLUS exp	{ $$ = $1 + $3; }
+		| exp MULT exp	{ $$ = $1 * $3; }
+		;
+
+%%
+
+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);
+}
+
+int yyerror(char *s)
+{
+  return yyerror(string(s));
+}
+ +

Known failures

+

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. +

+ +

Two levels of nesting inside C section

+
{
+	if($1) {
+		if($2) {
+
+		}
+	}
+} // <- Broken
+%%
+%%
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-brainfuck.html b/docs/_style/prism-master/examples/prism-brainfuck.html new file mode 100644 index 0000000000..89a435c92f --- /dev/null +++ b/docs/_style/prism-master/examples/prism-brainfuck.html @@ -0,0 +1,37 @@ +

Full example

+
+++++ +++               Set Cell #0 to 8
+[
+    >++++               Add 4 to Cell #1; this will always set Cell #1 to 4
+    [                   as the cell will be cleared by the loop
+        >++             Add 2 to Cell #2
+        >+++            Add 3 to Cell #3
+        >+++            Add 3 to Cell #4
+        >+              Add 1 to Cell #5
+        <<<<-           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
+                        be Cell #1 which was cleared by the previous loop
+    <-                  Decrement the loop Counter in Cell #0
+]                       Loop till Cell #0 is zero; number of iterations is 8
+
+The result of this is:
+Cell No :   0   1   2   3   4   5   6
+Contents:   0   0  72 104  88  32   8
+Pointer :   ^
+
+>>.                     Cell #2 has value 72 which is 'H'
+>---.                   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'
++++.------.--------.    Cell #3 for 'rl' and 'd'
+>>+.                    Add 1 to Cell #5 gives us an exclamation point
+>++.                    And finally a newline from Cell #6
+ +

One-line example

+
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
diff --git a/docs/_style/prism-master/examples/prism-bro.html b/docs/_style/prism-master/examples/prism-bro.html new file mode 100644 index 0000000000..83d6374e67 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-bro.html @@ -0,0 +1,645 @@ +

Comments

+
# Single line comment
+
+ +

Strings

+

+"a", "b"
+
+ +

Numbers

+
123
+123.456
+-123.456
+
+ +

Misc

+

+@ifndef ourexp
+@load-sigs somesigs
+
+ +

Full example

+

+##! Scan detector ported from Bro 1.x.
+##!
+##! This script has evolved over many years and is quite a mess right now. We
+##! have adapted it to work with Bro 2.x, but eventually Bro 2.x will
+##! get its own rewritten and generalized scan detector.
+
+@load base/frameworks/notice/main
+
+module Scan;
+
+export {
+	redef enum Notice::Type += {
+		## The source has scanned a number of ports.
+		PortScan,
+		## The source has scanned a number of addresses.
+		AddressScan,
+		## Apparent flooding backscatter seen from source.
+		BackscatterSeen,
+
+		## Summary of scanning activity.
+		ScanSummary,
+		## Summary of distinct ports per scanner.
+		PortScanSummary,
+		## Summary of distinct low ports per scanner.
+		LowPortScanSummary,
+
+		## Source reached :bro:id:`Scan::shut_down_thresh`
+		ShutdownThresh,
+		## Source touched privileged ports.
+		LowPortTrolling,
+	};
+
+	# Whether to consider UDP "connections" for scan detection.
+	# Can lead to false positives due to UDP fanout from some P2P apps.
+	const suppress_UDP_scan_checks = F &redef;
+
+	const activate_priv_port_check = T &redef;
+	const activate_landmine_check = F &redef;
+	const landmine_thresh_trigger = 5 &redef;
+
+	const landmine_address: set[addr] &redef;
+
+	const scan_summary_trigger = 25 &redef;
+	const port_summary_trigger = 20 &redef;
+	const lowport_summary_trigger = 10 &redef;
+
+	# Raise ShutdownThresh after this many failed attempts
+	const shut_down_thresh = 100 &redef;
+
+	# Which services should be analyzed when detecting scanning
+	# (not consulted if analyze_all_services is set).
+	const analyze_services: set[port] &redef;
+	const analyze_all_services = T &redef;
+
+	# Track address scaners only if at least these many hosts contacted.
+	const addr_scan_trigger = 0 &redef;
+
+	# Ignore address scanners for further scan detection after
+	# scanning this many hosts.
+	# 0 disables.
+	const ignore_scanners_threshold = 0 &redef;
+
+	# Report a scan of peers at each of these points.
+	const report_peer_scan: vector of count = {
+		20, 100, 1000, 10000, 50000, 100000, 250000, 500000, 1000000,
+	} &redef;
+
+	const report_outbound_peer_scan: vector of count = {
+		100, 1000, 10000,
+	} &redef;
+
+	# Report a scan of ports at each of these points.
+	const report_port_scan: vector of count = {
+		50, 250, 1000, 5000, 10000, 25000, 65000,
+	} &redef;
+
+	# Once a source has scanned this many different ports (to however many
+	# different remote hosts), start tracking its per-destination access.
+	const possible_port_scan_thresh = 20 &redef;
+
+	# Threshold for scanning privileged ports.
+	const priv_scan_trigger = 5 &redef;
+	const troll_skip_service = {
+		25/tcp, 21/tcp, 22/tcp, 20/tcp, 80/tcp,
+	} &redef;
+
+	const report_accounts_tried: vector of count = {
+		20, 100, 1000, 10000, 100000, 1000000,
+	} &redef;
+
+	const report_remote_accounts_tried: vector of count = {
+		100, 500,
+	} &redef;
+
+	# Report a successful password guessing if the source attempted
+	# at least this many.
+	const password_guessing_success_threshhold = 20 &redef;
+
+	const skip_accounts_tried: set[addr] &redef;
+
+	const addl_web = {
+		81/tcp, 443/tcp, 8000/tcp, 8001/tcp, 8080/tcp, }
+	&redef;
+
+	const skip_services = { 113/tcp, } &redef;
+	const skip_outbound_services = { 21/tcp, addl_web, }
+		&redef;
+
+	const skip_scan_sources = {
+		255.255.255.255,	# who knows why we see these, but we do
+	} &redef;
+
+	const skip_scan_nets: set[subnet] = {} &redef;
+
+	# List of well known local server/ports to exclude for scanning
+	# purposes.
+	const skip_dest_server_ports: set[addr, port] = {} &redef;
+
+	# Reverse (SYN-ack) scans seen from these ports are considered
+	# to reflect possible SYN-flooding backscatter, and not true
+	# (stealth) scans.
+	const backscatter_ports = {
+		80/tcp, 8080/tcp, 53/tcp, 53/udp, 179/tcp, 6666/tcp, 6667/tcp,
+	} &redef;
+
+	const report_backscatter: vector of count = {
+		20,
+	} &redef;
+
+	global check_scan:
+		function(c: connection, established: bool, reverse: bool): bool;
+
+	# The following tables are defined here so that we can redef
+	# the expire timeouts.
+	# FIXME: should we allow redef of attributes on IDs which
+	# are not exported?
+
+	# How many different hosts connected to with a possible
+	# backscatter signature.
+	global distinct_backscatter_peers: table[addr] of table[addr] of count
+		&read_expire = 15 min;
+
+	# Expire functions that trigger summaries.
+	global scan_summary:
+		function(t: table[addr] of set[addr], orig: addr): interval;
+	global port_summary:
+		function(t: table[addr] of set[port], orig: addr): interval;
+	global lowport_summary:
+		function(t: table[addr] of set[port], orig: addr): interval;
+
+	# Indexed by scanner address, yields # distinct peers scanned.
+	# pre_distinct_peers tracks until addr_scan_trigger hosts first.
+	global pre_distinct_peers: table[addr] of set[addr]
+		&read_expire = 15 mins &redef;
+
+	global distinct_peers: table[addr] of set[addr]
+		&read_expire = 15 mins &expire_func=scan_summary &redef;
+	global distinct_ports: table[addr] of set[port]
+		&read_expire = 15 mins &expire_func=port_summary &redef;
+	global distinct_low_ports: table[addr] of set[port]
+		&read_expire = 15 mins &expire_func=lowport_summary &redef;
+
+	# Indexed by scanner address, yields a table with scanned hosts
+	# (and ports).
+	global scan_triples: table[addr] of table[addr] of set[port];
+
+	global remove_possible_source:
+		function(s: set[addr], idx: addr): interval;
+	global possible_scan_sources: set[addr]
+		&expire_func=remove_possible_source &read_expire = 15 mins;
+
+	# Indexed by source address, yields user name & password tried.
+	global accounts_tried: table[addr] of set[string, string]
+		&read_expire = 1 days;
+
+	global ignored_scanners: set[addr] &create_expire = 1 day &redef;
+
+	# These tables track whether a threshold has been reached.
+	# More precisely, the counter is the next index of threshold vector.
+	global shut_down_thresh_reached: table[addr] of bool &default=F;
+	global rb_idx: table[addr] of count
+			&default=1 &read_expire = 1 days &redef;
+	global rps_idx: table[addr] of count
+			&default=1 &read_expire = 1 days &redef;
+	global rops_idx: table[addr] of count
+			&default=1 &read_expire = 1 days &redef;
+	global rpts_idx: table[addr,addr] of count
+			&default=1 &read_expire = 1 days &redef;
+	global rat_idx: table[addr] of count
+			&default=1 &read_expire = 1 days &redef;
+	global rrat_idx: table[addr] of count
+			&default=1 &read_expire = 1 days &redef;
+}
+
+global thresh_check: function(v: vector of count, idx: table[addr] of count,
+				orig: addr, n: count): bool;
+global thresh_check_2: function(v: vector of count,
+				idx: table[addr,addr] of count, orig: addr,
+				resp: addr, n: count): bool;
+
+function scan_summary(t: table[addr] of set[addr], orig: addr): interval
+	{
+	local num_distinct_peers = orig in t ? |t[orig]| : 0;
+
+	if ( num_distinct_peers >= scan_summary_trigger )
+		NOTICE([$note=ScanSummary, $src=orig, $n=num_distinct_peers,
+			$identifier=fmt("%s", orig),
+			$msg=fmt("%s scanned a total of %d hosts",
+					orig, num_distinct_peers)]);
+
+	return 0 secs;
+	}
+
+function port_summary(t: table[addr] of set[port], orig: addr): interval
+	{
+	local num_distinct_ports = orig in t ? |t[orig]| : 0;
+
+	if ( num_distinct_ports >= port_summary_trigger )
+		NOTICE([$note=PortScanSummary, $src=orig, $n=num_distinct_ports,
+			$identifier=fmt("%s", orig),
+			$msg=fmt("%s scanned a total of %d ports",
+					orig, num_distinct_ports)]);
+
+	return 0 secs;
+	}
+
+function lowport_summary(t: table[addr] of set[port], orig: addr): interval
+	{
+	local num_distinct_lowports = orig in t ? |t[orig]| : 0;
+
+	if ( num_distinct_lowports >= lowport_summary_trigger )
+		NOTICE([$note=LowPortScanSummary, $src=orig,
+			$n=num_distinct_lowports,
+			$identifier=fmt("%s", orig),
+			$msg=fmt("%s scanned a total of %d low ports",
+					orig, num_distinct_lowports)]);
+
+	return 0 secs;
+	}
+
+function clear_addr(a: addr)
+	{
+	delete distinct_peers[a];
+	delete distinct_ports[a];
+	delete distinct_low_ports[a];
+	delete scan_triples[a];
+	delete possible_scan_sources[a];
+	delete distinct_backscatter_peers[a];
+	delete pre_distinct_peers[a];
+	delete rb_idx[a];
+	delete rps_idx[a];
+	delete rops_idx[a];
+	delete rat_idx[a];
+	delete rrat_idx[a];
+	delete shut_down_thresh_reached[a];
+	delete ignored_scanners[a];
+	}
+
+function ignore_addr(a: addr)
+	{
+	clear_addr(a);
+	add ignored_scanners[a];
+	}
+
+function check_scan(c: connection, established: bool, reverse: bool): bool
+	{
+	local id = c$id;
+
+	local service = "ftp-data" in c$service ? 20/tcp
+			: (reverse ? id$orig_p : id$resp_p);
+	local rev_service = reverse ? id$resp_p : id$orig_p;
+	local orig = reverse ? id$resp_h : id$orig_h;
+	local resp = reverse ? id$orig_h : id$resp_h;
+	local outbound = Site::is_local_addr(orig);
+
+	# The following works better than using get_conn_transport_proto()
+	# 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 )
+		return F;
+
+	if ( service in skip_services && ! outbound )
+		return F;
+
+	if ( outbound && service in skip_outbound_services )
+		return F;
+
+	if ( orig in skip_scan_sources )
+		return F;
+
+	if ( orig in skip_scan_nets )
+		return F;
+
+	# Don't include well known server/ports for scanning purposes.
+	if ( ! outbound && [resp, service] in skip_dest_server_ports )
+		return F;
+
+	if ( orig in ignored_scanners)
+		return F;
+
+	if ( ! established &&
+		# not established, service not expressly allowed
+
+		# not known peer set
+		(orig !in distinct_peers || resp !in distinct_peers[orig]) &&
+
+		# want to consider service for scan detection
+		(analyze_all_services || service in analyze_services) )
+		{
+		if ( reverse && rev_service in backscatter_ports &&
+		     # reverse, non-priv backscatter port
+		     service >= 1024/tcp )
+			{
+			if ( orig !in distinct_backscatter_peers )
+				{
+				local empty_bs_table:
+					table[addr] of count &default=0;
+				distinct_backscatter_peers[orig] =
+					empty_bs_table;
+				}
+
+			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.
+
+			     distinct_backscatter_peers[orig][resp] == 1 &&
+
+			     # Looks like backscatter, and it's not scanning
+			     # a privileged port.
+
+			     thresh_check(report_backscatter, rb_idx, orig,
+					|distinct_backscatter_peers[orig]|)
+			   )
+				{
+				NOTICE([$note=BackscatterSeen, $src=orig,
+					$p=rev_service,
+					$identifier=fmt("%s", orig),
+					$msg=fmt("backscatter seen from %s (%d hosts; %s)",
+						orig, |distinct_backscatter_peers[orig]|, rev_service)]);
+				}
+
+			if ( ignore_scanners_threshold > 0 &&
+			     |distinct_backscatter_peers[orig]| >
+					ignore_scanners_threshold )
+				ignore_addr(orig);
+			}
+
+		else
+			{ # done with backscatter check
+			local ignore = F;
+
+			if ( orig !in distinct_peers && addr_scan_trigger > 0 )
+				{
+				if ( orig !in pre_distinct_peers )
+					pre_distinct_peers[orig] = set();
+
+				add pre_distinct_peers[orig][resp];
+				if ( |pre_distinct_peers[orig]| < addr_scan_trigger )
+					ignore = T;
+				}
+
+			if ( ! ignore )
+				{ # XXXXX
+
+				if ( orig !in distinct_peers )
+					distinct_peers[orig] = set() &mergeable;
+
+				if ( resp !in distinct_peers[orig] )
+					add distinct_peers[orig][resp];
+
+				local n = |distinct_peers[orig]|;
+
+				# Check for threshold if not outbound.
+				if ( ! shut_down_thresh_reached[orig] &&
+				     n >= shut_down_thresh &&
+				     ! outbound && orig !in Site::neighbor_nets )
+					{
+					shut_down_thresh_reached[orig] = T;
+					local msg = fmt("shutdown threshold reached for %s", orig);
+					NOTICE([$note=ShutdownThresh, $src=orig,
+						$identifier=fmt("%s", orig),
+						$p=service, $msg=msg]);
+					}
+
+				else
+					{
+					local address_scan = F;
+					if ( outbound &&
+					     # inside host scanning out?
+					     thresh_check(report_outbound_peer_scan, rops_idx, orig, n) )
+						address_scan = T;
+
+					if ( ! outbound &&
+					     thresh_check(report_peer_scan, rps_idx, orig, n) )
+						address_scan = T;
+
+					if ( address_scan )
+						NOTICE([$note=AddressScan,
+							$src=orig, $p=service,
+							$n=n,
+							$identifier=fmt("%s-%d", orig, n),
+							$msg=fmt("%s has scanned %d hosts (%s)",
+								orig, n, service)]);
+
+					if ( address_scan &&
+					     ignore_scanners_threshold > 0 &&
+					     n > ignore_scanners_threshold )
+						ignore_addr(orig);
+					}
+				}
+			} # XXXX
+		}
+
+	if ( established )
+		# Don't consider established connections for port scanning,
+		# it's too easy to be mislead by FTP-like applications that
+		# legitimately gobble their way through the port space.
+		return F;
+
+	# Coarse search for port-scanning candidates: those that have made
+	# connections (attempts) to possible_port_scan_thresh or more
+	# distinct ports.
+	if ( orig !in distinct_ports || service !in distinct_ports[orig] )
+		{
+		if ( orig !in distinct_ports )
+			distinct_ports[orig] = set() &mergeable;
+
+		if ( service !in distinct_ports[orig] )
+			add distinct_ports[orig][service];
+
+		if ( |distinct_ports[orig]| >= possible_port_scan_thresh &&
+			orig !in scan_triples )
+			{
+			scan_triples[orig] = table() &mergeable;
+			add possible_scan_sources[orig];
+			}
+		}
+
+	# Check for low ports.
+	if ( activate_priv_port_check && ! outbound && service < 1024/tcp &&
+	     service !in troll_skip_service )
+		{
+		if ( orig !in distinct_low_ports ||
+		     service !in distinct_low_ports[orig] )
+			{
+			if ( orig !in distinct_low_ports )
+				distinct_low_ports[orig] = set() &mergeable;
+
+			add distinct_low_ports[orig][service];
+
+			if ( |distinct_low_ports[orig]| == priv_scan_trigger &&
+			     orig !in Site::neighbor_nets )
+				{
+				local svrc_msg = fmt("low port trolling %s %s", orig, service);
+				NOTICE([$note=LowPortTrolling, $src=orig,
+					$identifier=fmt("%s", orig),
+					$p=service, $msg=svrc_msg]);
+				}
+
+			if ( ignore_scanners_threshold > 0 &&
+			     |distinct_low_ports[orig]| >
+					ignore_scanners_threshold )
+				ignore_addr(orig);
+			}
+		}
+
+	# For sources that have been identified as possible scan sources,
+	# keep track of per-host scanning.
+	if ( orig in possible_scan_sources )
+		{
+		if ( orig !in scan_triples )
+			scan_triples[orig] = table() &mergeable;
+
+		if ( resp !in scan_triples[orig] )
+			scan_triples[orig][resp] = set() &mergeable;
+
+		if ( service !in scan_triples[orig][resp] )
+			{
+			add scan_triples[orig][resp][service];
+
+			if ( thresh_check_2(report_port_scan, rpts_idx,
+					    orig, resp,
+					    |scan_triples[orig][resp]|) )
+				{
+				local m = |scan_triples[orig][resp]|;
+				NOTICE([$note=PortScan, $n=m, $src=orig,
+					$p=service,
+					$identifier=fmt("%s-%d", orig, n),
+					$msg=fmt("%s has scanned %d ports of %s",
+					orig, m, resp)]);
+				}
+			}
+		}
+
+	return T;
+	}
+
+
+# Hook into the catch&release dropping. When an address gets restored, we reset
+# the source to allow dropping it again.
+event Drop::address_restored(a: addr)
+	{
+	clear_addr(a);
+	}
+
+event Drop::address_cleared(a: addr)
+	{
+	clear_addr(a);
+	}
+
+# When removing a possible scan source, we automatically delete its scanned
+# hosts and ports.  But we do not want the deletion propagated, because every
+# peer calls the expire_function on its own (and thus applies the delete
+# operation on its own table).
+function remove_possible_source(s: set[addr], idx: addr): interval
+	{
+	suspend_state_updates();
+	delete scan_triples[idx];
+	resume_state_updates();
+
+	return 0 secs;
+	}
+
+# To recognize whether a certain threshhold vector (e.g. report_peer_scans)
+# has been transgressed, a global variable containing the next vector index
+# (idx) must be incremented.  This cumbersome mechanism is necessary because
+# values naturally don't increment by one (e.g. replayed table merges).
+function thresh_check(v: vector of count, idx: table[addr] of count,
+			orig: addr, n: count): bool
+	{
+	if ( ignore_scanners_threshold > 0 && n > ignore_scanners_threshold )
+		{
+		ignore_addr(orig);
+		return F;
+		}
+
+	if ( idx[orig] <= |v| && n >= v[idx[orig]] )
+		{
+		++idx[orig];
+		return T;
+		}
+	else
+		return F;
+	}
+
+# Same as above, except the index has a different type signature.
+function thresh_check_2(v: vector of count, idx: table[addr, addr] of count,
+			orig: addr, resp: addr, n: count): bool
+	{
+	if ( ignore_scanners_threshold > 0 && n > ignore_scanners_threshold )
+		{
+		ignore_addr(orig);
+		return F;
+		}
+
+	if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] )
+		{
+		++idx[orig,resp];
+		return T;
+		}
+	else
+		return F;
+	}
+
+event connection_established(c: connection)
+	{
+	local is_reverse_scan = (c$orig$state == TCP_INACTIVE);
+	Scan::check_scan(c, T, is_reverse_scan);
+	}
+
+event partial_connection(c: connection)
+	{
+	Scan::check_scan(c, T, F);
+	}
+
+event connection_attempt(c: connection)
+	{
+	Scan::check_scan(c, F, c$orig$state == TCP_INACTIVE);
+	}
+
+event connection_half_finished(c: connection)
+	{
+	# Half connections never were "established", so do scan-checking here.
+	Scan::check_scan(c, F, F);
+	}
+
+event connection_rejected(c: connection)
+	{
+	local is_reverse_scan = c$orig$state == TCP_RESET;
+
+	Scan::check_scan(c, F, is_reverse_scan);
+	}
+
+event connection_reset(c: connection)
+	{
+	if ( c$orig$state == TCP_INACTIVE || c$resp$state == TCP_INACTIVE )
+		# We never heard from one side - that looks like a scan.
+		Scan::check_scan(c, c$orig$size + c$resp$size > 0,
+				c$orig$state == TCP_INACTIVE);
+	}
+
+event connection_pending(c: connection)
+	{
+	if ( c$orig$state == TCP_PARTIAL && c$resp$state == TCP_INACTIVE )
+		Scan::check_scan(c, F, F);
+	}
+
+# Report the remaining entries in the tables.
+event bro_done()
+	{
+	for ( orig in distinct_peers )
+		scan_summary(distinct_peers, orig);
+
+	for ( orig in distinct_ports )
+		port_summary(distinct_ports, orig);
+
+	for ( orig in distinct_low_ports )
+		lowport_summary(distinct_low_ports, orig);
+	}
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-c.html b/docs/_style/prism-master/examples/prism-c.html new file mode 100644 index 0000000000..aee1c06a87 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-c.html @@ -0,0 +1,22 @@ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings ending with a \
+are supported too."
+ +

Macro statements

+
# include <stdio.h>
+#define PG_locked   0
+#define PG_error    1
+
+ +

Full example

+
#include <stdio.h>
+main(int argc, char *argv[])
+{
+   int c;
+   printf("Number of command line arguments passed: %d\n", argc);
+   for ( c = 0 ; c < argc ; c++)
+      printf("%d. Command line argument passed is %s\n", c+1, argv[c]);
+   return 0;
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-clike.html b/docs/_style/prism-master/examples/prism-clike.html new file mode 100644 index 0000000000..79a8076409 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-clike.html @@ -0,0 +1,28 @@ +

The C-like component is not really a language on its own, + it is the basis of many other components. To use it directly, however, + use the class "language-clike".

+ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz";
+'foo \'bar\' baz';
+ +

Numbers

+
123
+123.456
+-123.456
+1e-23
+123.456E789
+0xaf
+0xAF
+
+ +

Functions

+
foo();
+Bar();
+_456();
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-clojure.html b/docs/_style/prism-master/examples/prism-clojure.html new file mode 100644 index 0000000000..abc50194b3 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-clojure.html @@ -0,0 +1,386 @@ +

Full example

+

+; This code is copied from https://learnxinyminutes.com/docs/clojure/
+
+; Comments start with semicolons.
+
+; Clojure is written in "forms", which are just
+; lists of things inside parentheses, separated by whitespace.
+;
+; The clojure reader assumes that the first thing is a
+; function or macro to call, and the rest are arguments.
+
+; The first call in a file should be ns, to set the namespace
+(ns learnclojure)
+
+; More basic examples:
+
+; str will create a string out of all its arguments
+(str "Hello" " " "World") ; => "Hello World"
+
+; Math is straightforward
+(+ 1 1) ; => 2
+(- 2 1) ; => 1
+(* 1 2) ; => 2
+(/ 2 1) ; => 2
+
+; Equality is =
+(= 1 1) ; => true
+(= 2 1) ; => false
+
+; You need not for logic, too
+(not true) ; => false
+
+; Nesting forms works as you expect
+(+ 1 (- 3 2)) ; = 1 + (3 - 2) => 2
+
+; Types
+;;;;;;;;;;;;;
+
+; Clojure uses Java's object types for booleans, strings and numbers.
+; Use `class` to inspect them.
+(class 1) ; Integer literals are java.lang.Long by default
+(class 1.); Float literals are java.lang.Double
+(class ""); Strings always double-quoted, and are java.lang.String
+(class false) ; Booleans are java.lang.Boolean
+(class nil); The "null" value is called nil
+
+; If you want to create a literal list of data, use ' to stop it from
+; being evaluated
+'(+ 1 2) ; => (+ 1 2)
+; (shorthand for (quote (+ 1 2)))
+
+; You can eval a quoted list
+(eval '(+ 1 2)) ; => 3
+
+; Collections & Sequences
+;;;;;;;;;;;;;;;;;;;
+
+; Lists are linked-list data structures, while Vectors are array-backed.
+; Vectors and Lists are java classes too!
+(class [1 2 3]); => clojure.lang.PersistentVector
+(class '(1 2 3)); => clojure.lang.PersistentList
+
+; A list would be written as just (1 2 3), but we have to quote
+; it to stop the reader thinking it's a function.
+; Also, (list 1 2 3) is the same as '(1 2 3)
+
+; "Collections" are just groups of data
+; Both lists and vectors are collections:
+(coll? '(1 2 3)) ; => true
+(coll? [1 2 3]) ; => true
+
+; "Sequences" (seqs) are abstract descriptions of lists of data.
+; Only lists are seqs.
+(seq? '(1 2 3)) ; => true
+(seq? [1 2 3]) ; => false
+
+; A seq need only provide an entry when it is accessed.
+; So, seqs which can be lazy -- they can define infinite series:
+(range 4) ; => (0 1 2 3)
+(range) ; => (0 1 2 3 4 ...) (an infinite series)
+(take 4 (range)) ;  (0 1 2 3)
+
+; Use cons to add an item to the beginning of a list or vector
+(cons 4 [1 2 3]) ; => (4 1 2 3)
+(cons 4 '(1 2 3)) ; => (4 1 2 3)
+
+; Conj will add an item to a collection in the most efficient way.
+; For lists, they insert at the beginning. For vectors, they insert at the end.
+(conj [1 2 3] 4) ; => [1 2 3 4]
+(conj '(1 2 3) 4) ; => (4 1 2 3)
+
+; Use concat to add lists or vectors together
+(concat [1 2] '(3 4)) ; => (1 2 3 4)
+
+; Use filter, map to interact with collections
+(map inc [1 2 3]) ; => (2 3 4)
+(filter even? [1 2 3]) ; => (2)
+
+; Use reduce to reduce them
+(reduce + [1 2 3 4])
+; = (+ (+ (+ 1 2) 3) 4)
+; => 10
+
+; Reduce can take an initial-value argument too
+(reduce conj [] '(3 2 1))
+; = (conj (conj (conj [] 3) 2) 1)
+; => [3 2 1]
+
+; Functions
+;;;;;;;;;;;;;;;;;;;;;
+
+; Use fn to create new functions. A function always returns
+; its last statement.
+(fn [] "Hello World") ; => fn
+
+; (You need extra parens to call it)
+((fn [] "Hello World")) ; => "Hello World"
+
+; You can create a var using def
+(def x 1)
+x ; => 1
+
+; Assign a function to a var
+(def hello-world (fn [] "Hello World"))
+(hello-world) ; => "Hello World"
+
+; You can shorten this process by using defn
+(defn hello-world [] "Hello World")
+
+; The [] is the list of arguments for the function.
+(defn hello [name]
+  (str "Hello " name))
+(hello "Steve") ; => "Hello Steve"
+
+; You can also use this shorthand to create functions:
+(def hello2 #(str "Hello " %1))
+(hello2 "Fanny") ; => "Hello Fanny"
+
+; You can have multi-variadic functions, too
+(defn hello3
+  ([] "Hello World")
+  ([name] (str "Hello " name)))
+(hello3 "Jake") ; => "Hello Jake"
+(hello3) ; => "Hello World"
+
+; Functions can pack extra arguments up in a seq for you
+(defn count-args [& args]
+  (str "You passed " (count args) " args: " args))
+(count-args 1 2 3) ; => "You passed 3 args: (1 2 3)"
+
+; You can mix regular and packed arguments
+(defn hello-count [name & args]
+  (str "Hello " name ", you passed " (count args) " extra args"))
+(hello-count "Finn" 1 2 3)
+; => "Hello Finn, you passed 3 extra args"
+
+
+; Maps
+;;;;;;;;;;
+
+; Hash maps and array maps share an interface. Hash maps have faster lookups
+; but don't retain key order.
+(class {:a 1 :b 2 :c 3}) ; => clojure.lang.PersistentArrayMap
+(class (hash-map :a 1 :b 2 :c 3)) ; => clojure.lang.PersistentHashMap
+
+; Arraymaps will automatically become hashmaps through most operations
+; if they get big enough, so you don't need to worry.
+
+; Maps can use any hashable type as a key, but usually keywords are best
+; Keywords are like strings with some efficiency bonuses
+(class :a) ; => clojure.lang.Keyword
+
+(def stringmap {"a" 1, "b" 2, "c" 3})
+stringmap  ; => {"a" 1, "b" 2, "c" 3}
+
+(def keymap {:a 1, :b 2, :c 3})
+keymap ; => {:a 1, :c 3, :b 2}
+
+; By the way, commas are always treated as whitespace and do nothing.
+
+; Retrieve a value from a map by calling it as a function
+(stringmap "a") ; => 1
+(keymap :a) ; => 1
+
+; Keywords can be used to retrieve their value from a map, too!
+(:b keymap) ; => 2
+
+; Don't try this with strings.
+;("a" stringmap)
+; => Exception: java.lang.String cannot be cast to clojure.lang.IFn
+
+; Retrieving a non-present key returns nil
+(stringmap "d") ; => nil
+
+; Use assoc to add new keys to hash-maps
+(def newkeymap (assoc keymap :d 4))
+newkeymap ; => {:a 1, :b 2, :c 3, :d 4}
+
+; But remember, clojure types are immutable!
+keymap ; => {:a 1, :b 2, :c 3}
+
+; Use dissoc to remove keys
+(dissoc keymap :a :b) ; => {:c 3}
+
+; Sets
+;;;;;;
+
+(class #{1 2 3}) ; => clojure.lang.PersistentHashSet
+(set [1 2 3 1 2 3 3 2 1 3 2 1]) ; => #{1 2 3}
+
+; Add a member with conj
+(conj #{1 2 3} 4) ; => #{1 2 3 4}
+
+; Remove one with disj
+(disj #{1 2 3} 1) ; => #{2 3}
+
+; Test for existence by using the set as a function:
+(#{1 2 3} 1) ; => 1
+(#{1 2 3} 4) ; => nil
+
+; There are more functions in the clojure.sets namespace.
+
+; Useful forms
+;;;;;;;;;;;;;;;;;
+
+; Logic constructs in clojure are just macros, and look like
+; everything else
+(if false "a" "b") ; => "b"
+(if false "a") ; => nil
+
+; Use let to create temporary bindings
+(let [a 1 b 2]
+  (> a b)) ; => false
+
+; Group statements together with do
+(do
+  (print "Hello")
+  "World") ; => "World" (prints "Hello")
+
+; Functions have an implicit do
+(defn print-and-say-hello [name]
+  (print "Saying hello to " name)
+  (str "Hello " name))
+(print-and-say-hello "Jeff") ;=> "Hello Jeff" (prints "Saying hello to Jeff")
+
+; So does let
+(let [name "Urkel"]
+  (print "Saying hello to " name)
+  (str "Hello " name)) ; => "Hello Urkel" (prints "Saying hello to Urkel")
+
+
+; Use the threading macros (-> and ->>) to express transformations of
+; data more clearly.
+
+; The "Thread-first" macro (->) inserts into each form the result of
+; the previous, as the first argument (second item)
+(->  
+   {: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)
+
+; This expression could be written as:
+; (dissoc (assoc {:a 1 :b 2} :c 3) :b)
+; and evaluates to {:a 1 :c 3}
+
+; The double arrow does the same thing, but inserts the result of
+; each line at the *end* of the form. This is useful for collection
+; operations in particular:
+(->>
+   (range 10)
+   (map inc)     ;=> (map inc (range 10)
+   (filter odd?) ;=> (filter odd? (map inc (range 10))
+   (into []))    ;=> (into [] (filter odd? (map inc (range 10)))
+                 ; 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 
+; 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:
+
+(as-> [1 2 3] input
+  (map inc input);=> You can use last transform's output at the last position
+  (nth input 2) ;=>  and at the second position, in the same expression
+  (conj [4 5 6] input [8 9 10])) ;=> or in the middle !
+
+
+
+; Modules
+;;;;;;;;;;;;;;;
+
+; Use "use" to get all functions from the module
+(use 'clojure.set)
+
+; Now we can use set operations
+(intersection #{1 2 3} #{2 3 4}) ; => #{2 3}
+(difference #{1 2 3} #{2 3 4}) ; => #{1}
+
+; You can choose a subset of functions to import, too
+(use '[clojure.set :only [intersection]])
+
+; Use require to import a module
+(require 'clojure.string)
+
+; Use / to call functions from a module
+; Here, the module is clojure.string and the function is blank?
+(clojure.string/blank? "") ; => true
+
+; You can give a module a shorter name on import
+(require '[clojure.string :as str])
+(str/replace "This is a test." #"[a-o]" str/upper-case) ; => "THIs Is A tEst."
+; (#"" denotes a regular expression literal)
+
+; You can use require (and use, but don't) from a namespace using :require.
+; You don't need to quote your modules if you do it this way.
+(ns test
+  (:require
+    [clojure.string :as str]
+    [clojure.set :as set]))
+
+; Java
+;;;;;;;;;;;;;;;;;
+
+; Java has a huge and useful standard library, so
+; you'll want to learn how to get at it.
+
+; Use import to load a java module
+(import java.util.Date)
+
+; You can import from an ns too.
+(ns test
+  (:import java.util.Date
+           java.util.Calendar))
+
+; Use the class name with a "." at the end to make a new instance
+(Date.) ; 
+
+; Use . to call methods. Or, use the ".method" shortcut
+(. (Date.) getTime) ; 
+(.getTime (Date.)) ; exactly the same thing.
+
+; Use / to call static methods
+(System/currentTimeMillis) ;  (system is always present)
+
+; Use doto to make dealing with (mutable) classes more tolerable
+(import java.util.Calendar)
+(doto (Calendar/getInstance)
+  (.set 2000 1 1 0 0 0)
+  .getTime) ; => A Date. set to 2000-01-01 00:00:00
+
+; STM
+;;;;;;;;;;;;;;;;;
+
+; Software Transactional Memory is the mechanism clojure uses to handle
+; persistent state. There are a few constructs in clojure that use this.
+
+; An atom is the simplest. Pass it an initial value
+(def my-atom (atom {}))
+
+; Update an atom with swap!.
+; swap! takes a function and calls it with the current value of the atom
+; as the first argument, and any trailing arguments as the second
+(swap! my-atom assoc :a 1) ; Sets my-atom to the result of (assoc {} :a 1)
+(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 ; => {:a 1 :b 2}
+
+; Here's a simple counter using an atom
+(def counter (atom 0))
+(defn inc-counter []
+  (swap! counter inc))
+
+(inc-counter)
+(inc-counter)
+(inc-counter)
+(inc-counter)
+(inc-counter)
+
+@counter ; => 5
+
+; Other STM constructs are refs and agents.
+; Refs: http://clojure.org/refs
+; Agents: http://clojure.org/agents
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-coffeescript.html b/docs/_style/prism-master/examples/prism-coffeescript.html new file mode 100644 index 0000000000..a710aa990d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-coffeescript.html @@ -0,0 +1,61 @@ +

Comments

+
# This is a comment
+### This is a
+multi-line comment###
+ +

Strings

+
'foo \'bar\' baz'
+"foo \"bar\" baz"
+'Multi-line
+strings are supported'
+"Multi-line
+strings are supported"
+''' 'Block strings'
+are supported too'''
+""" "Block strings"
+are supported too"""
+ +

String interpolation

+
"String #{interpolation} is supported"
+'This works #{only} between double-quoted strings'
+ +

Object properties

+
kids =
+  brother:
+    name: "Max"
+    age:  11
+  sister:
+    name: "Ida"
+    age:  9
+ +

Regexps

+
/normal [r]egexp?/;
+/// ^(
+  mul\t[i-l]ine
+  regexp          # with embedded comment
+) ///
+ +

Classes

+
class Animal
+  constructor: (@name) ->
+  move: (meters) ->
+    alert @name + " moved #{meters}m."
+
+class Snake extends Animal
+  move: ->
+    alert "Slithering..."
+    super 5
+
+class Horse extends Animal
+  move: ->
+    alert "Galloping..."
+    super 45
+
+sam = new Snake "Sammy the Python"
+tom = new Horse "Tommy the Palomino"
+
+sam.move()
+tom.move()
+ +

Inline JavaScript

+
`alert("foo")`
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-cpp.html b/docs/_style/prism-master/examples/prism-cpp.html new file mode 100644 index 0000000000..32bdcbda56 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-cpp.html @@ -0,0 +1,61 @@ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings ending with a \
+are supported too."
+ +

Macro statements

+
# include <stdio.h>
+#define PG_locked   0
+#define PG_error    1
+
+ +

Booleans

+
true;
+false;
+ +

Operators

+
a and b;
+c bitand d;
+ +

Full example

+
/*
+David Cary 2010-09-14
+quick demo for wikibooks
+public domain
+*/
+#include <iostream>
+#include <vector>
+using namespace std;
+
+vector<int> pick_vector_with_biggest_fifth_element(
+    vector<int> left,
+    vector<int> right
+){
+    if( (left[5]) < (right[5]) ){
+        return( right );
+    };
+    // else
+    return( left );
+}
+
+int vector_demo(void){
+    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;
+    vector<int> biggest(
+        pick_vector_with_biggest_fifth_element( left, right )
+    );
+    cout << biggest[5] << endl;
+
+    return 0;
+}
+
+int main(void){
+    vector_demo();
+}
diff --git a/docs/_style/prism-master/examples/prism-crystal.html b/docs/_style/prism-master/examples/prism-crystal.html new file mode 100644 index 0000000000..c3cad166af --- /dev/null +++ b/docs/_style/prism-master/examples/prism-crystal.html @@ -0,0 +1,16 @@ +

Number literals with underscores and postfix

+
1_u32
+123_456.789e-10_f64
+ +

Attributes

+
@[AlwaysInline]
+def foo
+	1
+end
+ +

Macro expansions

+
{% for key, value in {foo: 100, bar: 20} %}
+	def {{ key.id }}
+		{{ value }}
+	end
+{% end %}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-csharp.html b/docs/_style/prism-master/examples/prism-csharp.html new file mode 100644 index 0000000000..c6d76c2b44 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-csharp.html @@ -0,0 +1,60 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+@"Verbatim strings"
+@"Luis: ""Patrick, where did you get that overnight bag?""
+    Patrick: ""Jean Paul Gaultier.""";
+@'Luis: ''Patrick, where did you get that overnight bag?''
+    Patrick: ''Jean Paul Gaultier.''';
+
+ +

Full example

+
using System.Windows.Forms;
+using System.Drawing;
+
+public static DialogResult InputBox(string title, string promptText, ref string value)
+{
+  Form form = new Form();
+  Label label = new Label();
+  TextBox textBox = new TextBox();
+  Button buttonOk = new Button();
+  Button buttonCancel = new Button();
+
+  form.Text = title;
+  label.Text = promptText;
+  textBox.Text = value;
+
+  buttonOk.Text = "OK";
+  buttonCancel.Text = "Cancel";
+  buttonOk.DialogResult = DialogResult.OK;
+  buttonCancel.DialogResult = DialogResult.Cancel;
+
+  label.SetBounds(9, 20, 372, 13);
+  textBox.SetBounds(12, 36, 372, 20);
+  buttonOk.SetBounds(228, 72, 75, 23);
+  buttonCancel.SetBounds(309, 72, 75, 23);
+
+  label.AutoSize = true;
+  textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
+  buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+  buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
+
+  form.ClientSize = new Size(396, 107);
+  form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
+  form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
+  form.FormBorderStyle = FormBorderStyle.FixedDialog;
+  form.StartPosition = FormStartPosition.CenterScreen;
+  form.MinimizeBox = false;
+  form.MaximizeBox = false;
+  form.AcceptButton = buttonOk;
+  form.CancelButton = buttonCancel;
+
+  DialogResult dialogResult = form.ShowDialog();
+  value = textBox.Text;
+  return dialogResult;
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-csp.html b/docs/_style/prism-master/examples/prism-csp.html new file mode 100644 index 0000000000..e10a416b0e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-csp.html @@ -0,0 +1,13 @@ +

A complete policy

+
default-src 'none';
+script-src my.cdn.com;
+img-src 'self' data:;
+child-src 'self' data: ms-appx-web:;
+block-all-mixed-content;
+report-uri https://my-reports.com/submit;
+
+ +

An policy with unsafe source expressions

+
script-src 'self' 'unsafe-eval' 'unsafe-inline';
+style-src 'unsafe-inline' 'unsafe-hashed-attributes' 'self';
+
diff --git a/docs/_style/prism-master/examples/prism-css.html b/docs/_style/prism-master/examples/prism-css.html new file mode 100644 index 0000000000..a36f196676 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-css.html @@ -0,0 +1,34 @@ +

Empty rule

+
*{} * {} p {}
+
ul,
+ol {}
+ +

Simple rule

+
p { color: red; }
+ +

Important rule

+

+p {
+    color: red !important;
+    line-height: normal!important;
+}
+p{position:absolute!important}
+
+ +

@ rule

+
@media screen and (min-width: 100px) {}
+ +

LESS variable

+
@main-color: red;
+.foo {
+	background: @main-color;
+}
+ +

Comment

+
/* Simple comment here */
+ +

String

+
content: 'foo';
+ +

URL

+
content: url(foo.png);
diff --git a/docs/_style/prism-master/examples/prism-d.html b/docs/_style/prism-master/examples/prism-d.html new file mode 100644 index 0000000000..d4bf34cc8c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-d.html @@ -0,0 +1,267 @@ +

Comments

+
// Single line comment
+/* Multi-line
+	comment */
+/+ Mutli-line
+	/+ nestable +/
+	comment +/
+ +

Numbers

+
0 .. 2_147_483_647
+2_147_483_648 .. 9_223_372_036_854_775_807
+0L .. 9_223_372_036_854_775_807L
+0U .. 4_294_967_296U
+4_294_967_296U .. 18_446_744_073_709_551_615U
+0UL .. 18_446_744_073_709_551_615UL
+0x0 .. 0x7FFF_FFFF
+0x8000_0000 .. 0xFFFF_FFFF
+0x1_0000_0000 .. 0x7FFF_FFFF_FFFF_FFFF
+0x8000_0000_0000_0000 .. 0xFFFF_FFFF_FFFF_FFFF
+0x0L .. 0x7FFF_FFFF_FFFF_FFFFL
+0x8000_0000_0000_0000L .. 0xFFFF_FFFF_FFFF_FFFFL
+0x0U .. 0xFFFF_FFFFU
+0x1_0000_0000U .. 0xFFFF_FFFF_FFFF_FFFFU
+0x0UL .. 0xFFFF_FFFF_FFFF_FFFFUL
+
+123_456.567_8          // 123456.5678
+1_2_3_4_5_6_.5_6_7_8   // 123456.5678
+1_2_3_4_5_6_.5e-6_     // 123456.5e-6
+0x1.FFFFFFFFFFFFFp1023 // double.max
+0x1p-52                // double.epsilon
+1.175494351e-38F       // float.min
+6.3i                   // idouble 6.3
+6.3fi                  // ifloat 6.3
+6.3Li                  // ireal 6.3
+4.5 + 6.2i             // complex number (phased out)
+ +

Strings

+
// WYSIWYG strings
+r"hello"
+r"c:\root\foo.exe"
+r"ab\n"
+`hello`
+`c:\root\foo.exe`
+`ab\n`
+
+// Double-quoted strings
+"hello"
+"c:\\root\\foo.exe"
+"ab\n"
+"ab
+"
+
+// Hex strings
+x"0A"
+x"00 FBCD 32FD 0A"
+
+// String postfix characters
+"hello"c  // string
+"hello"w  // wstring
+"hello"d  // dstring
+
+// Delimited strings
+q"(foo(xxx))"
+q"[foo{]"
+q"EOS
+This
+is a multi-line
+heredoc string
+EOS"
+q"/foo]/"
+
+// Token strings
+q{foo}
+q{/*}*/ }
+q{ foo(q{hello}); }
+q{ __TIME__ }
+
+// Character literals
+'a'
+'\u000A'
+ +

Iasm registers

+
AL AH AX EAX
+BL BH BX EBX
+CL CH CX ECX
+DL DH DX EDX
+BP EBP
+SP ESP
+DI EDI
+SI ESI
+ES CS SS DS GS FS
+CR0 CR2 CR3 CR4
+DR0 DR1 DR2 DR3 DR6 DR7
+TR3 TR4 TR5 TR6 TR7
+ST
+ST(0) ST(1) ST(2) ST(3) ST(4) ST(5) ST(6) ST(7)
+MM0  MM1  MM2  MM3  MM4  MM5  MM6  MM7
+XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7
+
+RAX  RBX  RCX  RDX
+BPL  RBP
+SPL  RSP
+DIL  RDI
+SIL  RSI
+R8B  R8W  R8D  R8
+R9B  R9W  R9D  R9
+R10B R10W R10D R10
+R11B R11W R11D R11
+R12B R12W R12D R12
+R13B R13W R13D R13
+R14B R14W R14D R14
+R15B R15W R15D R15
+XMM8 XMM9 XMM10 XMM11 XMM12 XMM13 XMM14 XMM15
+YMM0 YMM1 YMM2  YMM3  YMM4  YMM5  YMM6  YMM7
+YMM8 YMM9 YMM10 YMM11 YMM12 YMM13 YMM14 YMM15
+ +

Full example

+
#!/usr/bin/dmd -run
+/* sh style script syntax is supported! */
+/* Hello World in D
+   To compile:
+     dmd hello.d
+   or to optimize:
+     dmd -O -inline -release hello.d
+   or to get generated documentation:
+     dmd hello.d -D
+  */
+import std.stdio;  // References to  commonly used I/O routines.
+void main(char[][] args)   // 'void' here means return 0 by default.
+{
+    // Write-Formatted-Line
+     writefln("Hello World, "   // automatic concatenation of string literals
+              "Reloaded");
+     // Strings are denoted as a dynamic array of chars 'char[]'
+     // auto type inference and built-in foreach
+     foreach(argc, argv; args)
+    {
+        // OOP is supported, of course! And automatic type inference.
+         auto cl = new CmdLin(argc, argv);
+
+        // 'writefln' is the improved 'printf' !!
+         // user-defined class properties.
+         writefln(cl.argnum, cl.suffix, " arg: %s", cl.argv);
+        // Garbage Collection or explicit memory management - your choice!!!
+         delete cl;
+    }
+     // Nested structs, classes and functions!
+     struct specs
+    {
+        // all vars. automatically initialized
+         int count, allocated;
+    }
+
+    // Note that declarations read right-to-left.
+    // So that 'char[][]' reads as an array of an array of chars.
+
+    specs argspecs(char[][] args)
+    // Optional (built-in) function contracts.
+     in{
+        assert (args.length > 0); // assert built in
+     }
+    out(result){
+        assert(result.count == CmdLin.total);
+        assert(result.allocated > 0);
+    }
+    body{
+        specs* s = new specs;
+        // no need for '->'
+         s.count = args.length;  // The 'length' property is number of elements.
+         s.allocated = typeof(args).sizeof; // built-in properties for native types
+         foreach(argv; args)
+            s.allocated += argv.length * typeof(argv[0]).sizeof;
+        return *s;
+    }
+
+    // built-in string and common string operations, e.g. '~' is concatenate.
+     char[] argcmsg  = "argc = %d";
+    char[] allocmsg = "allocated = %d";
+    writefln(argcmsg ~ ", " ~ allocmsg,
+         argspecs(args).count,argspecs(args).allocated);
+}
+/**
+   Stores a single command line argument.
+ */
+ class CmdLin
+{
+    private {
+     int _argc;
+     char[] _argv;
+     static uint _totalc;
+    }
+
+ public:
+/************
+      Object constructor.
+      params:
+        argc = ordinal count of this argument.
+        argv = text of the parameter
+  *********/
+     this(int argc, char[] argv)
+    {
+        _argc = argc + 1;
+        _argv = argv;
+        _totalc++;
+    }
+
+    ~this() /// Object destructor
+     {
+        // Doesn't actually do anything for this example.
+     }
+
+     int argnum() /// A property that returns arg number
+     {
+        return _argc;
+    }
+     char[] argv() /// A property  that returns arg text
+     {
+        return _argv;
+    }
+     wchar[] suffix() /// A property  that returns ordinal suffix
+     {
+        wchar[] suffix;  // Built in  Unicode strings (utf8,utf16, utf32)
+         switch(_argc)
+        {
+        case 1:
+            suffix = "st";
+            break;
+        case 2:
+            suffix = "nd";
+            break;
+        case 3:
+            suffix = "rd";
+            break;
+        default:  // 'default' is mandatory with "-w" compile switch.
+             suffix = "th";
+        }
+        return suffix;
+    }
+
+/* **************
+      * A property of the whole class, not just an instance.
+      * returns: The total number of commandline args added.
+      *************/
+     static typeof(_totalc) total()
+    {
+        return _totalc;
+    }
+     // Class invariant, things that must be true after any method is run.
+     invariant
+     {
+         assert(_argc > 0);
+         assert(_totalc >= _argc);
+     }
+}
+ +

Known failures

+

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. +

+ +

Comments only support one level of nesting

+
/+ /+ /+ this does not work +/ +/ +/
+ +

Token strings only support one level of nesting

+
q{ q{ q{ this does not work } } }
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-dart.html b/docs/_style/prism-master/examples/prism-dart.html new file mode 100644 index 0000000000..e38d85eae2 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-dart.html @@ -0,0 +1,59 @@ +

Comments

+
// Single line comment
+/// Documentation single line comment
+/* Block comment
+on several lines */
+/** Multi-line
+doc comment */
+ +

Annotations

+
@todo('seth', 'make this do something')
+@deprecated // Metadata; makes Dart Editor warn about using activate().
+ +

Numbers

+
var x = 1;
+var hex = 0xDEADBEEF;
+var bigInt = 346534658346524376592384765923749587398457294759347029438709349347;
+var y = 1.1;
+var exponents = 1.42e5;
+
+ +

Strings

+
var s1 = 'Single quotes work well for string literals.';
+var s2 = "Double quotes work just as well.";
+var s3 = 'It\'s easy to escape the string delimiter.';
+var s4 = "It's even easier to just use the other string delimiter.";
+var s1 = '''
+You can create
+multi-line strings like this one.
+''';
+var s2 = """This is also a
+multi-line string.""";
+var s = r"In a raw string, even \n isn't special.";
+ +

Full example

+
class Logger {
+  final String name;
+  bool mute = false;
+
+  // _cache is library-private, thanks to the _ in front of its name.
+  static final Map<String, Logger> _cache = <String, Logger>{};
+
+  factory Logger(String name) {
+    if (_cache.containsKey(name)) {
+      return _cache[name];
+    } else {
+      final logger = new Logger._internal(name);
+      _cache[name] = logger;
+      return logger;
+    }
+  }
+
+  Logger._internal(this.name);
+
+  void log(String msg) {
+    if (!mute) {
+      print(msg);
+    }
+  }
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-diff.html b/docs/_style/prism-master/examples/prism-diff.html new file mode 100644 index 0000000000..b9229a1740 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-diff.html @@ -0,0 +1,33 @@ +

Normal Diff

+
7c7
+< qt: core
+---
+> qt: core quick
+ +

Context Diff

+
*** qcli.yml	2014-12-16 11:43:41.000000000 +0800
+--- /Users/uranusjr/Desktop/qcli.yml	2014-12-31 11:28:08.000000000 +0800
+***************
+*** 4,8 ****
+  project:
+      sources: "src/*.cpp"
+      headers: "src/*.h"
+!     qt: core
+  public_headers: "src/*.h"
+--- 4,8 ----
+  project:
+      sources: "src/*.cpp"
+      headers: "src/*.h"
+!     qt: core gui
+  public_headers: "src/*.h"
+ +

Unified Diff

+
--- qcli.yml	2014-12-16 11:43:41.000000000 +0800
++++ /Users/uranusjr/Desktop/qcli.yml	2014-12-31 11:28:08.000000000 +0800
+@@ -4,5 +4,5 @@
+ project:
+     sources: "src/*.cpp"
+     headers: "src/*.h"
+-    qt: core
++    qt: core gui
+ public_headers: "src/*.h"
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-django.html b/docs/_style/prism-master/examples/prism-django.html new file mode 100644 index 0000000000..ac9cf0df73 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-django.html @@ -0,0 +1,31 @@ +

Comment

+
{# This is a comment #}
+ +

Variable

+
{{ some_variable }}
+ +

Template Tag

+
{% if some_condition %}
+Conditional block
+{% endif %}
+
+ +

Full Example

+
{# This a Django template example #}
+{% extends "base_generic.html" %}
+
+{% block title %}{{ section.title }}{% endblock %}
+
+{% block content %}
+<h1>{{ section.title }}</h1>
+
+{% for story in story_list %}
+<h2>
+  <a href="{{ story.get_absolute_url }}">
+    {{ story.headline|upper }}
+  </a>
+</h2>
+<p>{{ story.tease|truncatewords:"100" }}</p>
+{% endfor %}
+{% endblock %}
+
diff --git a/docs/_style/prism-master/examples/prism-docker.html b/docs/_style/prism-master/examples/prism-docker.html new file mode 100644 index 0000000000..86511b3889 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-docker.html @@ -0,0 +1,49 @@ +

Comments

+
# These are the comments for a dockerfile.
+# I want to make sure $(variables) don't break out,
+# and we shouldn't see keywords like ADD or ENTRYPOINT
+
+ +

Full example

+
# Nginx
+#
+# VERSION               0.0.1
+
+FROM      ubuntu
+MAINTAINER Victor Vieux 
+
+LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
+RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
+
+# Firefox over VNC
+#
+# VERSION               0.3
+
+FROM ubuntu
+
+# Install vnc, xvfb in order to create a 'fake' display and firefox
+RUN apt-get update && apt-get install -y x11vnc xvfb firefox
+RUN mkdir ~/.vnc
+# Setup a password
+RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
+# Autostart firefox (might not be the best way, but it does the trick)
+RUN bash -c 'echo "firefox" >> /.bashrc'
+
+EXPOSE 5900
+CMD    ["x11vnc", "-forever", "-usepw", "-create"]
+
+# Multiple images example
+#
+# VERSION               0.1
+
+FROM ubuntu
+RUN echo foo > bar
+# Will output something like ===> 907ad6c2736f
+
+FROM ubuntu
+RUN echo moo > oink
+# Will output something like ===> 695d7793cbe4
+
+# You᾿ll now have two images, 907ad6c2736f with /bar, and 695d7793cbe4 with
+# /oink.
+
diff --git a/docs/_style/prism-master/examples/prism-eiffel.html b/docs/_style/prism-master/examples/prism-eiffel.html new file mode 100644 index 0000000000..94c18b22f5 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-eiffel.html @@ -0,0 +1,72 @@ +

Comments

+
-- A comment
+
+ +

Simple string and character

+
"A simple string with %"double quotes%""
+'a'
+
+ +

Verbatim-strings

+
"[
+  A aligned verbatim string
+]"
+"{
+  A non-aligned verbatim string
+}"
+
+ +

Numbers

+
1_000
+1_000.
+1_000.e+1_000
+1_000.1_000e-1_000
+.1
+0b1010_0001
+0xAF_5B
+0c75_22
+
+ +

Class names

+
deferred class
+    A [G]
+
+feature
+    items: G
+        deferred  end
+
+end
+
+ +

Full example

+
note
+  description: "Represents a person."
+
+class
+  PERSON
+
+create
+  make, make_unknown
+
+feature {NONE} -- Creation
+
+  make (a_name: like name)
+      -- Create a person with `a_name' as `name'.
+    do
+      name := a_name
+    ensure
+      name = a_name
+    end
+
+    make_unknown
+    do ensure
+      name = Void
+      end
+
+feature -- Access
+
+  name: detachable STRING
+      -- Full name or Void if unknown.
+
+end
+
diff --git a/docs/_style/prism-master/examples/prism-elixir.html b/docs/_style/prism-master/examples/prism-elixir.html new file mode 100644 index 0000000000..7112fbca5b --- /dev/null +++ b/docs/_style/prism-master/examples/prism-elixir.html @@ -0,0 +1,462 @@ +

Comments

+
# This is a comment
+ +

Atoms

+
:foo
+:bar
+ +

Numbers

+
42
+0b1010
+0o777
+0x1F
+3.14159
+5.2e10
+100_000
+ +

Strings and heredoc

+
'A string with \'quotes\'!'
+"A string with \"quotes\"!"
+"Multi-line
+strings are supported"
+""" "Heredoc" strings are
+also supported.
+"""
+ +

Sigils

+
~s"""This is a sigil
+using heredoc delimiters"""
+~r/a [reg]exp/
+~r(another|regexp)
+~w[some words]s
+~c<a char list>
+ +

Interpolation

+
"This is an #{:atom}"
+~s/#{40+2} is the answer/
+ +

Function capturing

+
fun = &Math.zero?/1
+(&is_function/1).(fun)
+fun = &(&1 + 1)
+fun.(1)
+fun = &List.flatten(&1, &2)
+fun.([1, [[2], 3]], [4, 5])
+ +

Module attributes

+
defmodule MyServer do
+  @vsn 2
+end
+
+defmodule Math do
+  @moduledoc """
+  Provides math-related functions.
+
+      iex> Math.sum(1, 2)
+      3
+
+  """
+
+  @doc """
+  Calculates the sum of two numbers.
+  """
+  def sum(a, b), do: a + b
+end
+ +

Full example

+
# Example from http://learnxinyminutes.com/docs/elixir/
+
+# Single line comments start with a number symbol.
+
+# There's no multi-line comment,
+# but you can stack multiple comments.
+
+# To use the elixir shell use the `iex` command.
+# Compile your modules with the `elixirc` command.
+
+# Both should be in your path if you installed elixir correctly.
+
+## ---------------------------
+## -- Basic types
+## ---------------------------
+
+# There are numbers
+3    # integer
+0x1F # integer
+3.0  # float
+
+# Atoms, that are literals, a constant with name. They start with `:`.
+:hello # atom
+
+# Tuples that are stored contiguously in memory.
+{1,2,3} # tuple
+
+# We can access a tuple element with the `elem` function:
+elem({1, 2, 3}, 0) #=> 1
+
+# Lists that are implemented as linked lists.
+[1,2,3] # list
+
+# We can access the head and tail of a list as follows:
+[head | tail] = [1,2,3]
+head #=> 1
+tail #=> [2,3]
+
+# In elixir, just like in Erlang, the `=` denotes pattern matching and
+# not an assignment.
+#
+# This means that the left-hand side (pattern) is matched against a
+# right-hand side.
+#
+# This is how the above example of accessing the head and tail of a list works.
+
+# A pattern match will error when the sides don't match, in this example
+# the tuples have different sizes.
+# {a, b, c} = {1, 2} #=> ** (MatchError) no match of right hand side value: {1,2}
+
+# There are also binaries
+<<1,2,3>> # binary
+
+# Strings and char lists
+"hello" # string
+'hello' # char list
+
+# Multi-line strings
+"""
+I'm a multi-line
+string.
+"""
+#=> "I'm a multi-line\nstring.\n"
+
+# Strings are all encoded in UTF-8:
+"héllò" #=> "héllò"
+
+# Strings are really just binaries, and char lists are just lists.
+<<?a, ?b, ?c>> #=> "abc"
+[?a, ?b, ?c]   #=> 'abc'
+
+# `?a` in elixir returns the ASCII integer for the letter `a`
+?a #=> 97
+
+# To concatenate lists use `++`, for binaries use `<>`
+[1,2,3] ++ [4,5]     #=> [1,2,3,4,5]
+'hello ' ++ 'world'  #=> 'hello world'
+
+<<1,2,3>> <> <<4,5>> #=> <<1,2,3,4,5>>
+"hello " <> "world"  #=> "hello world"
+
+# Ranges are represented as `start..end` (both inclusive)
+1..10 #=> 1..10
+lower..upper = 1..10 # Can use pattern matching on ranges as well
+[lower, upper] #=> [1, 10]
+
+## ---------------------------
+## -- Operators
+## ---------------------------
+
+# Some math
+1 + 1  #=> 2
+10 - 5 #=> 5
+5 * 2  #=> 10
+10 / 2 #=> 5.0
+
+# In elixir the operator `/` always returns a float.
+
+# To do integer division use `div`
+div(10, 2) #=> 5
+
+# To get the division remainder use `rem`
+rem(10, 3) #=> 1
+
+# There are also boolean operators: `or`, `and` and `not`.
+# These operators expect a boolean as their first argument.
+true and true #=> true
+false or true #=> true
+# 1 and true    #=> ** (ArgumentError) argument error
+
+# Elixir also provides `||`, `&&` and `!` which accept arguments of any type.
+# All values except `false` and `nil` will evaluate to true.
+1 || true  #=> 1
+false && 1 #=> false
+nil && 20  #=> nil
+!true #=> false
+
+# For comparisons we have: `==`, `!=`, `===`, `!==`, `<=`, `>=`, `<` and `>`
+1 == 1 #=> true
+1 != 1 #=> false
+1 < 2  #=> true
+
+# `===` and `!==` are more strict when comparing integers and floats:
+1 == 1.0  #=> true
+1 === 1.0 #=> false
+
+# We can also compare two different data types:
+1 < :hello #=> true
+
+# The overall sorting order is defined below:
+# number < atom < reference < functions < port < pid < tuple < list < bit string
+
+# To quote Joe Armstrong on this: "The actual order is not important,
+# but that a total ordering is well defined is important."
+
+## ---------------------------
+## -- Control Flow
+## ---------------------------
+
+# `if` expression
+if false do
+  "This will never be seen"
+else
+  "This will"
+end
+
+# There's also `unless`
+unless true do
+  "This will never be seen"
+else
+  "This will"
+end
+
+# Remember pattern matching? Many control-flow structures in elixir rely on it.
+
+# `case` allows us to compare a value against many patterns:
+case {:one, :two} do
+  {:four, :five} ->
+    "This won't match"
+  {:one, x} ->
+    "This will match and bind `x` to `:two`"
+  _ ->
+    "This will match any value"
+end
+
+# It's common to bind the value to `_` if we don't need it.
+# For example, if only the head of a list matters to us:
+[head | _] = [1,2,3]
+head #=> 1
+
+# For better readability we can do the following:
+[head | _tail] = [:a, :b, :c]
+head #=> :a
+
+# `cond` lets us check for many conditions at the same time.
+# Use `cond` instead of nesting many `if` expressions.
+cond do
+  1 + 1 == 3 ->
+    "I will never be seen"
+  2 * 5 == 12 ->
+    "Me neither"
+  1 + 2 == 3 ->
+    "But I will"
+end
+
+# It is common to set the last condition equal to `true`, which will always match.
+cond do
+  1 + 1 == 3 ->
+    "I will never be seen"
+  2 * 5 == 12 ->
+    "Me neither"
+  true ->
+    "But I will (this is essentially an else)"
+end
+
+# `try/catch` is used to catch values that are thrown, it also supports an
+# `after` clause that is invoked whether or not a value is caught.
+try do
+  throw(:hello)
+catch
+  message -> "Got #{message}."
+after
+  IO.puts("I'm the after clause.")
+end
+#=> I'm the after clause
+# "Got :hello"
+
+## ---------------------------
+## -- Modules and Functions
+## ---------------------------
+
+# Anonymous functions (notice the dot)
+square = fn(x) -> x * x end
+square.(5) #=> 25
+
+# They also accept many clauses and guards.
+# Guards let you fine tune pattern matching,
+# they are indicated by the `when` keyword:
+f = fn
+  x, y when x > 0 -> x + y
+  x, y -> x * y
+end
+
+f.(1, 3)  #=> 4
+f.(-1, 3) #=> -3
+
+# Elixir also provides many built-in functions.
+# These are available in the current scope.
+is_number(10)    #=> true
+is_list("hello") #=> false
+elem({1,2,3}, 0) #=> 1
+
+# You can group several functions into a module. Inside a module use `def`
+# to define your functions.
+defmodule Math do
+  def sum(a, b) do
+    a + b
+  end
+
+  def square(x) do
+    x * x
+  end
+end
+
+Math.sum(1, 2)  #=> 3
+Math.square(3) #=> 9
+
+# To compile our simple Math module save it as `math.ex` and use `elixirc`
+# in your terminal: elixirc math.ex
+
+# Inside a module we can define functions with `def` and private functions with `defp`.
+# A function defined with `def` is available to be invoked from other modules,
+# a private function can only be invoked locally.
+defmodule PrivateMath do
+  def sum(a, b) do
+    do_sum(a, b)
+  end
+
+  defp do_sum(a, b) do
+    a + b
+  end
+end
+
+PrivateMath.sum(1, 2)    #=> 3
+# PrivateMath.do_sum(1, 2) #=> ** (UndefinedFunctionError)
+
+# Function declarations also support guards and multiple clauses:
+defmodule Geometry do
+  def area({:rectangle, w, h}) do
+    w * h
+  end
+
+  def area({:circle, r}) when is_number(r) do
+    3.14 * r * r
+  end
+end
+
+Geometry.area({:rectangle, 2, 3}) #=> 6
+Geometry.area({:circle, 3})       #=> 28.25999999999999801048
+# Geometry.area({:circle, "not_a_number"})
+#=> ** (FunctionClauseError) no function clause matching in Geometry.area/1
+
+# Due to immutability, recursion is a big part of elixir
+defmodule Recursion do
+  def sum_list([head | tail], acc) do
+    sum_list(tail, acc + head)
+  end
+
+  def sum_list([], acc) do
+    acc
+  end
+end
+
+Recursion.sum_list([1,2,3], 0) #=> 6
+
+# Elixir modules support attributes, there are built-in attributes and you
+# may also add custom ones.
+defmodule MyMod do
+  @moduledoc """
+  This is a built-in attribute on a example module.
+  """
+
+  @my_data 100 # This is a custom attribute.
+  IO.inspect(@my_data) #=> 100
+end
+
+## ---------------------------
+## -- Structs and Exceptions
+## ---------------------------
+
+# Structs are extensions on top of maps that bring default values,
+# compile-time guarantees and polymorphism into Elixir.
+defmodule Person do
+  defstruct name: nil, age: 0, height: 0
+end
+
+joe_info = %Person{ name: "Joe", age: 30, height: 180 }
+#=> %Person{age: 30, height: 180, name: "Joe"}
+
+# Access the value of name
+joe_info.name #=> "Joe"
+
+# Update the value of age
+older_joe_info = %{ joe_info | age: 31 }
+#=> %Person{age: 31, height: 180, name: "Joe"}
+
+# The `try` block with the `rescue` keyword is used to handle exceptions
+try do
+  raise "some error"
+rescue
+  RuntimeError -> "rescued a runtime error"
+  _error -> "this will rescue any error"
+end
+
+# All exceptions have a message
+try do
+  raise "some error"
+rescue
+  x in [RuntimeError] ->
+    x.message
+end
+
+## ---------------------------
+## -- Concurrency
+## ---------------------------
+
+# Elixir relies on the actor model for concurrency. All we need to write
+# concurrent programs in elixir are three primitives: spawning processes,
+# sending messages and receiving messages.
+
+# To start a new process we use the `spawn` function, which takes a function
+# as argument.
+f = fn -> 2 * 2 end #=> #Function<erl_eval.20.80484245>
+spawn(f) #=> #PID<0.40.0>
+
+# `spawn` returns a pid (process identifier), you can use this pid to send
+# messages to the process. To do message passing we use the `send` operator.
+# For all of this to be useful we need to be able to receive messages. This is
+# achieved with the `receive` mechanism:
+defmodule Geometry do
+  def area_loop do
+    receive do
+      {:rectangle, w, h} ->
+        IO.puts("Area = #{w * h}")
+        area_loop()
+      {:circle, r} ->
+        IO.puts("Area = #{3.14 * r * r}")
+        area_loop()
+    end
+  end
+end
+
+# Compile the module and create a process that evaluates `area_loop` in the shell
+pid = spawn(fn -> Geometry.area_loop() end) #=> #PID<0.40.0>
+
+# Send a message to `pid` that will match a pattern in the receive statement
+send pid, {:rectangle, 2, 3}
+#=> Area = 6
+#   {:rectangle,2,3}
+
+send pid, {:circle, 2}
+#=> Area = 12.56000000000000049738
+#   {:circle,2}
+
+# The shell is also a process, you can use `self` to get the current pid
+self() #=> #PID<0.27.0>
+ +

Known failures

+

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. +

+ +

String interpolation in single-quoted strings

+
'#{:atom} <- this should not be highligted'
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-elm.html b/docs/_style/prism-master/examples/prism-elm.html new file mode 100644 index 0000000000..00d0e33314 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-elm.html @@ -0,0 +1,91 @@ +

Comments

+
-- Single line comment
+{- Multi-line
+comment -}
+ +

Strings and characters

+
'a'
+'\n'
+'\x03'
+"foo \" bar"
+"""
+"multiline strings" are also
+supported!
+"""
+ +

Full example

+
module Main exposing (..)
+
+import Html exposing (Html)
+import Svg exposing (..)
+import Svg.Attributes exposing (..)
+import Time exposing (Time, second)
+
+
+main =
+    Html.program
+        { init = init
+        , view = view
+        , update = update
+        , subscriptions = subscriptions
+        }
+
+
+
+-- MODEL
+
+
+type alias Model =
+    Time
+
+
+init : ( Model, Cmd Msg )
+init =
+    ( 0, Cmd.none )
+
+
+
+-- UPDATE
+
+
+type Msg
+    = Tick Time
+
+
+update : Msg -> Model -> ( Model, Cmd Msg )
+update msg model =
+    case msg of
+        Tick newTime ->
+            ( newTime, Cmd.none )
+
+
+
+-- SUBSCRIPTIONS
+
+
+subscriptions : Model -> Sub Msg
+subscriptions model =
+    Time.every second (\time -> Tick time)
+
+
+
+-- VIEW
+
+
+view : Model -> Html Msg
+view model =
+    let
+        angle =
+            turns (Time.inMinutes model)
+
+        handX =
+            toString (50 + 40 * cos angle)
+
+        handY =
+            toString (50 + 40 * sin angle)
+    in
+    svg [ viewBox "0 0 100 100", width "300px" ]
+        [ circle [ cx "50", cy "50", r "45", fill "#0B79CE" ] []
+        , line [ x1 "50", y1 "50", x2 handX, y2 handY, stroke "#023963" ] []
+        ]
+
diff --git a/docs/_style/prism-master/examples/prism-erb.html b/docs/_style/prism-master/examples/prism-erb.html new file mode 100644 index 0000000000..46c0143f7e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-erb.html @@ -0,0 +1,22 @@ +

Full example

+
<%# index.erb %>
+<h1>Listing Books</h1>
+<table>
+  <tr>
+    <th>Title</th>
+    <th>Summary</th>
+    <th></th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @books.each do |book| %>
+  <tr>
+    <td><%= book.title %></td>
+    <td><%= book.content %></td>
+    <td><%= link_to "Show", book %></td>
+    <td><%= link_to "Edit", edit_book_path(book) %></td>
+    <td><%= link_to "Remove", book, method: :delete, data: { confirm: "Are you sure?" } %></td>
+  </tr>
+<% end %>
+</table>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-erlang.html b/docs/_style/prism-master/examples/prism-erlang.html new file mode 100644 index 0000000000..05445adfc2 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-erlang.html @@ -0,0 +1,47 @@ +

Comments

+
% This is a comment
+%% coding: utf-8
+ +

Strings

+
"foo \"bar\" baz"
+ +

Numbers

+
42.
+$A.
+$\n.
+2#101.
+16#1f.
+2.3.
+2.3e3.
+2.3e-3.
+ +

Functions

+
P = spawn(m, loop, []).
+io:format("I am ~p~n", [self()]).
+'weird function'().
+
+ +

Variables

+
P = {adam,24,{july,29}}.
+M1 = #{name=>adam,age=>24,date=>{july,29}}.
+M2 = maps:update(age,25,M1).
+io:format("{~p,~p}: ~p~n", [?MODULE,?LINE,X]).
+ +

Operators

+
1==1.0.
+1=:=1.0.
+1 > a.
++1.
+-1.
+1+1.
+4/2.
+5 div 2.
+5 rem 2.
+2#10 band 2#01.
+2#10 bor 2#01.
+a + 10.
+1 bsl (1 bsl 64).
+not true.
+true and false.
+true xor false.
+true or garbage.
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-flow.html b/docs/_style/prism-master/examples/prism-flow.html new file mode 100644 index 0000000000..76f3e14a18 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-flow.html @@ -0,0 +1,18 @@ +

Primitive types

+
function method(x: number, y: string, z: boolean) {}
+function stringifyBasicValue(value: string | number) {}
+function add(one: any, two: any): number {
+  return one + two;
+}
+
+const bar: number = 2;
+var barVar: number = 2;
+let barLet: number = 2;
+let isOneOf: number | boolean | string = foo;
+ +

Keywords

+
type UnionAlias = 1 | 2 | 3;
+opaque type ID = string;
+declare opaque type PositiveNumber: number;
+type Country = $Keys<typeof countries>;
+type RequiredProps = $Diff<Props, DefaultProps>;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-fortran.html b/docs/_style/prism-master/examples/prism-fortran.html new file mode 100644 index 0000000000..00b23f5ab0 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-fortran.html @@ -0,0 +1,71 @@ +

Comments

+
! This is a comment
+ +

Strings

+
"foo 'bar' baz"
+'foo ''bar'' baz'
+''
+ITALICS_'This is in italics'
+"test &
+	! Some "tricky comment" here
+	&test"
+ +

Numbers

+
473
++56
+-101
+21_2
+21_SHORT
+1976354279568241_8
+B'01110'
+B"010"
+O'047'
+O"642"
+Z'F41A'
+Z"00BC"
+-12.78
++1.6E3
+2.1
+-16.E4_8
+0.45E-4
+10.93E7_QUAD
+.123
+3E4
+ +

Full example

+
MODULE MOD1
+TYPE INITIALIZED_TYPE
+	INTEGER :: I = 1 ! Default initialization
+END TYPE INITIALIZED_TYPE
+SAVE :: SAVED1, SAVED2
+INTEGER :: SAVED1, UNSAVED1
+TYPE(INITIALIZED_TYPE) :: SAVED2, UNSAVED2
+ALLOCATABLE :: SAVED1(:), SAVED2(:), UNSAVED1(:), UNSAVED2(:)
+END MODULE MOD1
+
+PROGRAM MAIN
+CALL SUB1 ! The values returned by the ALLOCATED intrinsic calls
+          ! in the PRINT statement are:
+          ! .FALSE., .FALSE., .FALSE., and .FALSE.
+          ! Module MOD1 is used, and its variables are allocated.
+          ! After return from the subroutine, whether the variables
+          ! which were not specified with the SAVE attribute
+          ! retain their allocation status is processor dependent.
+CALL SUB1 ! The values returned by the first two ALLOCATED intrinsic
+	      ! calls in the PRINT statement are:
+	      ! .TRUE., .TRUE.
+	      ! The values returned by the second two ALLOCATED
+	      ! intrinsic calls in the PRINT statement are
+	      ! processor dependent and each could be either
+	      ! .TRUE. or .FALSE.
+CONTAINS
+	SUBROUTINE SUB1
+	USE MOD1 ! Brings in saved and not saved variables.
+	PRINT *, ALLOCATED(SAVED1), ALLOCATED(SAVED2), &
+	         ALLOCATED(UNSAVED1), ALLOCATED(UNSAVED2)
+	IF (.NOT. ALLOCATED(SAVED1)) ALLOCATE(SAVED1(10))
+	IF (.NOT. ALLOCATED(SAVED2)) ALLOCATE(SAVED2(10))
+	IF (.NOT. ALLOCATED(UNSAVED1)) ALLOCATE(UNSAVED1(10))
+	IF (.NOT. ALLOCATED(UNSAVED2)) ALLOCATE(UNSAVED2(10))
+	END SUBROUTINE SUB1
+END PROGRAM MAIN
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-fsharp.html b/docs/_style/prism-master/examples/prism-fsharp.html new file mode 100644 index 0000000000..6a4330b652 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-fsharp.html @@ -0,0 +1,89 @@ +

Comments

+
// Single line comment
+(* Multi-line
+comment *)
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+@"Verbatim strings"
+"""Alternate "verbatim" strings"""
+
+ +

Numbers

+
//8 bit Int
+86y
+0b00000101y
+//Unsigned 8 bit Int
+86uy
+0b00000101uy
+//16 bit Int
+86s
+//Unsigned 16 bit Int
+86us
+//Int
+86
+86l
+0b10000
+0x2A6
+//Unsigned Int
+86u
+86ul
+//unativeint
+0x00002D3Fun
+//Long
+86L
+//Unsigned Long
+86UL
+//Float
+4.14F
+4.14f
+4.f
+4.F
+0x0000000000000000lf
+//Double
+4.14
+2.3E+32
+2.3e+32
+2.3e-32
+2.3e32
+0x0000000000000000LF
+//BigInt
+9999999999999999999999999999I
+//Decimal
+0.7833M
+0.7833m
+3.m
+3.M
+
+ +

Full example

+
// 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. 
+    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. 
+    new(name:string) = Person(name, 0)
+
+    // A read-only property. 
+    member this.Name = name
+    // A read/write property. 
+    member this.Age
+        with get() = internalAge
+        and set(value) = internalAge <- value
+
+    // Instance methods. 
+    // Increment the person's age. 
+    member this.HasABirthday () = internalAge <- internalAge + 1
+
+    // Check current age against some threshold. 
+    member this.IsOfAge targetAge = internalAge >= targetAge
+
+    // Display the person's name and age. 
+    override this.ToString () = 
+        "Name:  " + name + "\n" + "Age:   " + (string)internalAge
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-gcode.html b/docs/_style/prism-master/examples/prism-gcode.html new file mode 100644 index 0000000000..ebc1561569 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-gcode.html @@ -0,0 +1,22 @@ +

Comments

+
; comment
+(some more comments)
+G28 (even in here) X0
+
+ +

Quoted strings

+
"foo""bar"
+ +

Full example

+
M190 S60 ; Heat bed to 60°C
+G21 ; Set units to millimeters
+G28 ; Move to Origin (Homing)
+G29 ; Auto Bed Leveling
+G28 X0 Y0 ; Home X and Y to min endstops
+M107 ; Fan off
+M109 S200 ; Heat hotend to 200°C
+G92 E0 ; Set current extruder position as zero
+G1 F200 E15 ; Extrude 15mm filament with 200mm/min
+G92 E0 ; Set current extruder position as zero
+G1 F500
+
diff --git a/docs/_style/prism-master/examples/prism-gedcom.html b/docs/_style/prism-master/examples/prism-gedcom.html new file mode 100644 index 0000000000..3fee6ab008 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-gedcom.html @@ -0,0 +1,50 @@ +

Full example

+
0 HEAD
+1 CHAR ASCII
+1 SOUR ID_OF_CREATING_FILE
+1 GEDC
+2 VERS 5.5
+2 FORM Lineage-Linked
+1 SUBM @SUBMITTER@
+0 @SUBMITTER@ SUBM
+1 NAME /Submitter/
+1 ADDR Submitters address
+2 CONT address continued here
+0 @FATHER@ INDI
+1 NAME /Father/
+1 SEX M
+1 BIRT
+2 PLAC birth place
+2 DATE 1 JAN 1899
+1 DEAT
+2 PLAC death place
+2 DATE 31 DEC 1990
+1 FAMS @FAMILY@
+0 @MOTHER@ INDI
+1 NAME /Mother/
+1 SEX F
+1 BIRT
+2 PLAC birth place
+2 DATE 1 JAN 1899
+1 DEAT
+2 PLAC death place
+2 DATE 31 DEC 1990
+1 FAMS @FAMILY@
+0 @CHILD@ INDI
+1 NAME /Child/
+1 BIRT
+2 PLAC birth place
+2 DATE 31 JUL 1950
+1 DEAT
+2 PLAC death place
+2 DATE 29 FEB 2000
+1 FAMC @FAMILY@
+0 @FAMILY@ FAM
+1 MARR
+2 PLAC marriage place
+2 DATE 1 APR 1950
+1 HUSB @FATHER@
+1 WIFE @MOTHER@
+1 CHIL @CHILD@
+0 TRLR
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-gherkin.html b/docs/_style/prism-master/examples/prism-gherkin.html new file mode 100644 index 0000000000..f38446e720 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-gherkin.html @@ -0,0 +1,74 @@ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+
+"""
+Some Title, Eh?
+===============
+Here is the first paragraph of my blog post.
+Lorem ipsum dolor sit amet, consectetur adipiscing
+elit.
+"""
+
+ +

Keywords

+
Feature: Some terse yet descriptive text of what is desired
+    In order to realize a named business value
+    As an explicit system actor
+    I want to gain some beneficial outcome which furthers the goal
+
+    Additional text...
+
+    Scenario: Some determinable business situation
+    Given some precondition
+    And some other precondition
+    When some action by the actor
+    And some other action
+    And yet another action
+    Then some testable outcome is achieved
+    And something else we can check happens too
+
+    Scenario: A different situation
+    ...
+ +

Comments and tags

+
# user.feature
+@users
+Feature: Sign in to the store
+  In order to view my orders list
+  As a visitor
+  I need to be able to log in to the store
+
+  @javascript @login
+  Scenario: Trying to login without credentials
+      Given I am on the store homepage
+        And I follow "Login"
+       When I press "Login"
+       Then I should be on login page
+       # And I should see "Invalid credentials"
+
+ +

Tables and parameters

+
Scenario Outline: Eating
+  Given there are <start> cucumbers
+  When I eat <eat> cucumbers
+  Then I should have <left> cucumbers
+
+  Examples:
+    | start | eat | left |
+    |  12   |  5  |  7   |
+    |  20   |  5  |  15  |
+ +

Localized keywords

+
#language: fr
+Fonctionnalité: Contrôle le format de la valeur saisie d'un champ d'une révision
+  En tant qu'expert ou analyste
+  Je ne dois pas pouvoir soumettre des données au mauvais format
+
+  Contexte:
+    Etant donné que je suis connecté avec le pseudo "p_flore" et le mot de passe "p4flore"
+    Et que la gamme du contrat 27156 supporte les révisions
+    Etant donné que le contrat ayant l'id "27156" a une révision
+    Et je suis sur "/contrat/27156/revision/1"
+    Et que j'attends quelques secondes
+    ...
diff --git a/docs/_style/prism-master/examples/prism-git.html b/docs/_style/prism-master/examples/prism-git.html new file mode 100644 index 0000000000..cd5668d175 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-git.html @@ -0,0 +1,39 @@ +

Comments

+
# On branch prism-examples
+# Changes to be committed:
+#   (use "git reset HEAD <file>..." to unstage)
+#
+#       new file:   examples/prism-git.html
+ +

Inserted and deleted lines

+
- Some deleted line
++ Some added line
+ +

Diff

+
$ git diff
+diff --git file.txt file.txt
+index 6214953..1d54a52 100644
+--- file.txt
++++ file.txt
+@@ -1 +1,2 @@
+-Here's my tetx file
++Here's my text file
++And this is the second line
+ +

Logs

+
$ git log
+commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09
+Author: lgiraudel
+Date:   Mon Feb 17 11:18:34 2014 +0100
+
+    Add of a new line
+
+commit 87edc4ad8c71b95f6e46f736eb98b742859abd95
+Author: lgiraudel
+Date:   Mon Feb 17 11:18:15 2014 +0100
+
+    Typo fix
+
+commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d
+Author: lgiraudel
+Date:   Mon Feb 17 10:58:11 2014 +0100
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-glsl.html b/docs/_style/prism-master/examples/prism-glsl.html new file mode 100644 index 0000000000..7492a422ba --- /dev/null +++ b/docs/_style/prism-master/examples/prism-glsl.html @@ -0,0 +1,65 @@ +

Vertex shader example

+
attribute vec3 vertex;
+attribute vec3 normal;
+
+uniform mat4 _mvProj;
+uniform mat3 _norm;
+
+varying vec3 vColor;
+varying vec3 localPos;
+
+#pragma include "light.glsl"
+
+// constants
+vec3 materialColor = vec3(1.0,0.7,0.8);
+vec3 specularColor = vec3(1.0,1.0,1.0);
+
+void main(void) {
+    // compute position
+    gl_Position = _mvProj * vec4(vertex, 1.0);
+    
+    localPos = vertex;
+    
+    // compute light info
+    vec3 n = normalize(_norm * normal);
+    vec3 diffuse;
+    float specular;
+    float glowingSpecular = 50.0;
+    getDirectionalLight(n, _dLight, glowingSpecular, diffuse, specular);
+    vColor = max(diffuse,_ambient.xyz)*materialColor+specular*specularColor+_ambient;
+}
+ +

Fragment shader example

+
#ifdef GL_ES
+precision highp float;
+#endif
+
+uniform vec3 BrickColor, MortarColor;
+uniform vec3 BrickSize;
+uniform vec3 BrickPct;
+
+varying vec3 vColor;
+varying vec3 localPos;
+void main()
+{
+    vec3 color;
+	vec3 position, useBrick;
+	
+
+	position = localPos / BrickSize.xyz;
+
+	if (fract(position.y * 0.5) > 0.5){
+		position.x += 0.5;
+        position.z += 0.5;
+	}
+    
+	position = fract(position);
+
+	useBrick = step(position, BrickPct.xyz);
+
+	color = mix(MortarColor, BrickColor, useBrick.x * useBrick.y * useBrick.z);
+	color *= vColor;
+
+	gl_FragColor = vec4(color, 1.0);
+}
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-gml.html b/docs/_style/prism-master/examples/prism-gml.html new file mode 100644 index 0000000000..a1649f6b68 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-gml.html @@ -0,0 +1,29 @@ +

Comments

+
// This is a comment
+/* This is a comment
+on multiple lines */
+ +

Functions

+
variable_instance_set(_inst,_var_name,_start+_change);
+ +

Full example

+
if(instance_exists(_inst) || _inst==global){
+	if(_delay<=0){
+		_time+=1;
+		if(_time<_duration){
+			event_user(0);
+		}else{
+			if(_inst!=global){
+				variable_instance_set(_inst,_var_name,_start+_change);
+			}else{
+				variable_global_set(_var_name,_start+_change);
+			}
+			instance_destroy();
+		}
+	}else{
+		_delay-=1;
+	}
+}else{
+	instance_destroy();
+}
+
diff --git a/docs/_style/prism-master/examples/prism-go.html b/docs/_style/prism-master/examples/prism-go.html new file mode 100644 index 0000000000..205a1a7e29 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-go.html @@ -0,0 +1,68 @@ +

Comments

+
// This is a comment
+/* This is a comment
+on multiple lines */
+ +

Numbers

+
42
+0600
+0xBadFace
+170141183460469231731687303715884105727
+0.
+72.40
+072.40
+2.71828
+1.e+0
+6.67428e-11
+1E6
+.25
+.12345E+5
+0i
+011i
+0.i
+2.71828i
+1.e+0i
+6.67428e-11i
+1E6i
+.25i
+.12345E+5i
+ +

Runes and strings

+
'\t'
+'\000'
+'\x07'
+'\u12e4'
+'\U00101234'
+`abc`
+`multi-line
+string`
+"Hello, world!"
+"multi-line
+string"
+ +

Functions

+
func(a, b int, z float64) bool { return a*b < int(z) }
+ +

Full example

+
package main
+import "fmt"
+
+func sum(a []int, c chan int) {
+	sum := 0
+	for _, v := range a {
+		sum += v
+	}
+	c <- sum // send sum to c
+}
+
+func main() {
+	a := []int{7, 2, 8, -9, 4, 0}
+
+	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
+
+	fmt.Println(x, y, x+y)
+}
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-graphql.html b/docs/_style/prism-master/examples/prism-graphql.html new file mode 100644 index 0000000000..12113a9d80 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-graphql.html @@ -0,0 +1,31 @@ +

Comments

+
# This is a comment
+ +

Strings

+
""
+"foo \"bar\" baz"
+ +

Numbers

+
0
+42
+3.14159
+-9e-5
+0.9E+7
+ +

Keywords

+
query withFragments {
+  user(id: 4) {
+    friends(first: 10) {
+      ...friendFields
+    }
+    mutualFriends(first: 10) {
+      ...friendFields
+    }
+  }
+}
+
+fragment friendFields on User {
+  id
+  name
+  profilePic(size: 50)
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-groovy.html b/docs/_style/prism-master/examples/prism-groovy.html new file mode 100644 index 0000000000..3ec1d6d39b --- /dev/null +++ b/docs/_style/prism-master/examples/prism-groovy.html @@ -0,0 +1,93 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo 'bar' baz"
+'foo "bar" baz'
+"""Multi-line
+string"""
+'''Multi-line
+string'''
+"String /containing/ slashes"
+
+ +

Slashy strings (regex)

+
/.*foo.*/
+/regex"containing quotes"/
+$/.*"(.*)".*/(.*)/$
+ +

Interpolation inside GStrings and regex

+
"The answer is ${21*2}"
+"The $foxtype ${foxcolor.join()} fox"
+/foo${21*2}baz/
+'No interpolation here : ${21*2}'
+ +

Full example

+
#!/usr/bin/env groovy
+package model
+
+import groovy.transform.CompileStatic
+import java.util.List as MyList
+
+trait Distributable {
+    void distribute(String version) {}
+}
+
+@CompileStatic
+class Distribution implements Distributable {
+    double number = 1234.234 / 567
+    def otherNumber = 3 / 4
+    boolean archivable = condition ?: true
+    def ternary = a ? b : c
+    String name = "Guillaume"
+    Closure description = null
+    List<DownloadPackage> packages = []
+    String regex = ~/.*foo.*/
+    String multi = '''
+        multi line string
+    ''' + """
+        now with double quotes and ${gstring}
+    """ + $/
+        even with dollar slashy strings
+    /$
+
+    /**
+     * description method
+     * @param cl the closure
+     */
+    void description(Closure cl) { this.description = cl }
+
+    void version(String name, Closure versionSpec) {
+        def closure = { println "hi" } as Runnable
+
+        MyList ml = [1, 2, [a: 1, b:2,c :3]]
+        for (ch in "name") {}
+
+        // single line comment
+        DownloadPackage pkg = new DownloadPackage(version: name)
+
+        check that: true
+
+        label:
+        def clone = versionSpec.rehydrate(pkg, pkg, pkg)
+        /*
+            now clone() in a multiline comment
+        */
+        clone()
+        packages.add(pkg)
+
+        assert 4 / 2 == 2
+    }
+}
+ +

Known failures

+

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. +

+ +

Two divisions on the same line

+
2 / 3 / 4
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-haml.html b/docs/_style/prism-master/examples/prism-haml.html new file mode 100644 index 0000000000..c2cc670c32 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-haml.html @@ -0,0 +1,79 @@ +

Comments

+

+/ This is comment
+    on multiple lines
+/ This is a comment
+but this is not
+-# This is another comment
+    on multiple lines
+ +

Doctype

+
!!! XML
+!!!
+!!! 5
+ +

Tags

+
%div
+	%span
+%span(class="widget_#{@widget.number}")
+%div{:id => [@item.type, @item.number], :class => [@item.type, @item.urgency]}
+%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
+%html{html_attrs('fr-fr')}
+%div[@user, :greeting]
+%img
+%pre><
+  foo
+  bar
+%img
+
+ +

Markup

+
%div
+  <p id="blah">Blah!</p>
+ +

Inline Ruby

+
= ['hi', 'there', 'reader!'].join " "
+- foo = "hello"
+= link_to_remote "Add to cart",
+    :url => { :action => "add", :id => product.id },
+    :update => { :success => "cart", :failure => "error" }
+~ "Foo\n<pre>Bar\nBaz</pre>"
+%p
+  - case 2
+  - when 1
+    = "1!"
+  - when 2
+    = "2?"
+  - when 3
+    = "3."
+- (42...47).each do |i|
+  %p= i
+%p See, I can count!
+
+ +

Filters

+ +
%head
+	:css
+		#content: {
+			background: url('img/background.jpg');
+		}
+		div {
+			color: #333;
+		}
+	:javascript
+		(function() {
+			var test = "Do you like Prism?";
+			if(confirm(test)) {
+				do_something_great();
+			}
+		}());
+%body
+
+ +

Filters require the desired language to be loaded. +On this page, check CoffeeScript before checking Haml should make +the example below work properly.

+
%script
+  :coffee
+    console.log 'This is coffee script'
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-handlebars.html b/docs/_style/prism-master/examples/prism-handlebars.html new file mode 100644 index 0000000000..c39c8b742d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-handlebars.html @@ -0,0 +1,41 @@ +

Comments

+
{{! This is a comment with <p>some markup</p> in it }}
+{{! This is a comment }} {{ this_is_not }}
+ +

Variables

+
<p>{{ text }}</p>
+<h1>{{article.title}}</h1>
+{{{ triple_stash_is_supported }}}
+{{articles.[10].[#comments]}}
+ +

Strings, numbers and booleans

+
{{{link "See more..." story.url}}}
+{{ true }}
+{{ custom_helper 42 href="somepage.html" false }}
+ +

Block helpers

+
<div class="body">
+	{{#bold}}{{body}}{{/bold}}
+</div>
+{{#with story}}
+	<div class="intro">{{{intro}}}</div>
+	<div class="body">{{{body}}}</div>
+{{/with}}
+<div class="{{#if test}}foo{{else}}bar{{/if}}"></div>
+{{#list array}}
+	{{@index}}. {{title}}
+{{/list}}
+{{#block-with-hyphens args=yep}}
+	This should probably work...
+{{/block-with-hyphens}}
+
+ +

Known failures

+

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. +

+ +

Handlebars tag in the middle of an HTML tag

+
<div{{#if test}} class="test"{{/if}}></div>
diff --git a/docs/_style/prism-master/examples/prism-haskell.html b/docs/_style/prism-master/examples/prism-haskell.html new file mode 100644 index 0000000000..de58eb79bf --- /dev/null +++ b/docs/_style/prism-master/examples/prism-haskell.html @@ -0,0 +1,80 @@ +

Comments

+
-- Single line comment
+{- Multi-line
+comment -}
+ +

Strings and characters

+
'a'
+'\n'
+'\^A'
+'\^]'
+'\NUL'
+'\23'
+'\o75'
+'\xFE'
+"Here is a backslant \\ as well as \137, \
+    \a numeric escape character, and \^X, a control character."
+ +

Numbers

+
42
+123.456
+123.456e-789
+1e+3
+0o74
+0XAF
+ +

Full example

+
hGetLine h =
+  wantReadableHandle_ "Data.ByteString.hGetLine" h $
+    \ h_@Handle__{haByteBuffer} -> do
+      flushCharReadBuffer h_
+      buf <- readIORef haByteBuffer
+      if isEmptyBuffer buf
+         then fill h_ buf 0 []
+         else haveBuf h_ buf 0 []
+ where
+
+  fill h_@Handle__{haByteBuffer,haDevice} buf len xss =
+    len `seq` do
+    (r,buf') <- Buffered.fillReadBuffer haDevice buf
+    if r == 0
+       then do writeIORef haByteBuffer buf{ bufR=0, bufL=0 }
+               if len > 0
+                  then mkBigPS len xss
+                  else ioe_EOF
+       else haveBuf h_ buf' len xss
+
+  haveBuf h_@Handle__{haByteBuffer}
+          buf@Buffer{ bufRaw=raw, bufR=w, bufL=r }
+          len xss =
+    do
+        off <- findEOL r w raw
+        let new_len = len + off - r
+        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.
+        if off /= w
+            then do if (w == off + 1)
+                            then writeIORef haByteBuffer buf{ bufL=0, bufR=0 }
+                            else writeIORef haByteBuffer buf{ bufL = off + 1 }
+                    mkBigPS new_len (xs:xss)
+            else do
+                 fill h_ buf{ bufL=0, bufR=0 } new_len (xs:xss)
+
+  -- find the end-of-line character, if there is one
+  findEOL r w raw
+        | r == w = return w
+        | otherwise =  do
+            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
+
+mkPS :: RawBuffer Word8 -> Int -> Int -> IO ByteString
+mkPS buf start end =
+ create len $ \p ->
+   withRawBuffer buf $ \pbuf -> do
+   copyBytes p (pbuf `plusPtr` start) len
+ where
+   len = end - start
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-haxe.html b/docs/_style/prism-master/examples/prism-haxe.html new file mode 100644 index 0000000000..61fbf0e4b7 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-haxe.html @@ -0,0 +1,37 @@ +

Strings and string interpolation

+
"Foo
+bar $baz"
+'Foo
+bar'
+"${4 + 2}"
+ +

Regular expressions

+
~/haxe/i
+~/[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z][A-Z][A-Z]?/i
+~/(dog|fox)/g
+ +

Conditional compilation

+
#if !debug
+  trace("ok");
+#elseif (debug_level > 3)
+  trace(3);
+#else
+  trace("debug level too low");
+#end
+ +

Metadata

+
@author("Nicolas")
+@debug
+class MyClass {
+  @range(1, 8)
+  var value:Int;
+
+  @broken
+  @:noCompletion
+  static function method() { }
+}
+ +

Reification

+
macro static function add(e:Expr) {
+  return macro $e + $e;
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-hpkp.html b/docs/_style/prism-master/examples/prism-hpkp.html new file mode 100644 index 0000000000..ced16eb7cc --- /dev/null +++ b/docs/_style/prism-master/examples/prism-hpkp.html @@ -0,0 +1,11 @@ +

Pin for one year with report-uri

+
pin-sha256="EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4=";
+max-age=31536000;
+includeSubDomains;
+report-uri="https://my-reports.com/submit"
+
+ +

Pin for a short time (considered unsafe)

+
pin-sha256="EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4=";
+max-age=123
+
diff --git a/docs/_style/prism-master/examples/prism-hsts.html b/docs/_style/prism-master/examples/prism-hsts.html new file mode 100644 index 0000000000..f7d0e4512e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-hsts.html @@ -0,0 +1,8 @@ +

Policy with far-future max-age

+
max-age=31536000
+ +

Policy with near-future max-age, considered unsafe

+
max-age=123
+ +

Policy with extra directives

+
max-age=31536000; includeSubdomains; preload
diff --git a/docs/_style/prism-master/examples/prism-http.html b/docs/_style/prism-master/examples/prism-http.html new file mode 100644 index 0000000000..a2091768fe --- /dev/null +++ b/docs/_style/prism-master/examples/prism-http.html @@ -0,0 +1,33 @@ +

Request header

+
GET http://localhost:9999/foo.html HTTP/1.1
+Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
+Accept-Encoding: gzip, deflate
+ +

Response header

+
HTTP/1.1 200 OK
+Server: GitHub.com
+Date: Mon, 22 Dec 2014 18:25:30 GMT
+Content-Type: text/html; charset=utf-8
+ +

Response body highlighted based on Content-Type

+

This currently supports the following content types : + "application/json", + "application/xml", + "text/xml" and + "text/html".

+
HTTP/1.1 200 OK
+Server: GitHub.com
+Date: Mon, 22 Dec 2014 18:25:30 GMT
+Content-Type: text/html; charset=utf-8
+Last-Modified: Sun, 21 Dec 2014 20:29:48 GMT
+Transfer-Encoding: chunked
+Expires: Mon, 22 Dec 2014 18:35:30 GMT
+Cache-Control: max-age=600
+Vary: Accept-Encoding
+Content-Encoding: gzip
+
+<!DOCTYPE html>
+<html lang="en">
+<head></head>
+<body></body>
+</html>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-ichigojam.html b/docs/_style/prism-master/examples/prism-ichigojam.html new file mode 100644 index 0000000000..24bcbf22d4 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-ichigojam.html @@ -0,0 +1,29 @@ +

Note: this component focuses on IchigoJam, which uses a small subset of basic and introduces its own markers.

+ +

Comments

+
' This is a comment
+REM This is a remark
+'NoSpaceIsOK
+REMNOSPACE
+ +

Strings

+
"This a string."
+"This is a string with ""quotes"" in it."
+ +

Numbers

+
42
+3.14159
+-42
+-3.14159
+.5
+10.
+2E10
+4.2E-14
+-3E+2
+#496F726953756B69
+`11100010
+ +

IchigoJam Basic example

+
A=0
+FOR I=1 TO 100 : A=A+I : NEXT
+PRINT A
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-icon.html b/docs/_style/prism-master/examples/prism-icon.html new file mode 100644 index 0000000000..1dce690cb7 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-icon.html @@ -0,0 +1,172 @@ +

Comments

+
#
+# Foobar
+ +

Strings and csets

+
""
+"Foo\"bar"
+''
+'a\'bcdefg'
+ +

Numbers

+
42
+3.14159
+5.2E+8
+16rface
+2r1101
+ +

Full example

+
# Author: Robert J. Alexander
+global GameObject, Tree, Learn
+record Question(question, yes, no)
+procedure main()
+   GameObject := "animal"
+   Tree := Question("Does it live in water", "goldfish", "canary")
+   Get()                                  # Recall prior knowledge
+   Game()                                 # Play a game
+   return
+end
+#  Game() -- Conducts a game.
+#
+procedure Game()
+   while Confirm("Are you thinking of ", Article(GameObject), " ",
+      GameObject) do Ask(Tree)
+   write("Thanks for a great game.")
+   if \Learn &Confirm("Want to save knowledge learned this session")
+   then Save()
+   return
+end
+#  Confirm() -- Handles yes/no questions and answers.
+#
+procedure Confirm(q[])
+   local answer, s
+   static ok
+   initial {
+      ok := table()
+      every ok["y" | "yes" | "yeah" | "uh huh"] := "yes"
+      every ok["n" | "no"  | "nope" | "uh uh" ] := "no"
+      }
+   while /answer do {
+      every writes(!q)
+      write("?")
+      case s := read() | exit(1) of {
+         #  Commands recognized at a yes/no prompt.
+         #
+         "save":    Save()
+         "get":     Get()
+         "list":    List()
+         "dump":    Output(Tree)
+         default:   {
+            (answer := \ok[map(s, &ucase, &lcase)]) |
+               write("This is a \"yes\" or \"no\" question.")
+            }
+         }
+      }
+   return answer == "yes"
+end
+#  Ask() -- Navigates through the barrage of questions leading to a
+#  guess.
+#
+procedure Ask(node)
+   local guess, question
+   case type(node) of {
+      "string":        {
+         if not Confirm("It must be ", Article(node), " ", node, ", right") then {
+            Learn := "yes"
+            write("What were you thinking of?")
+            guess := read() | exit(1)
+            write("What question would distinguish ", Article(guess), " ",
+               guess, " from ", Article(node), " ", node, "?")
+            question := read() | exit(1)
+            if question[-1] == "?" then question[-1] := ""
+            question[1] := map(question[1], &lcase, &ucase)
+            if Confirm("For ", Article(guess), " ", guess, ", what would the answer be")
+            then return Question(question, guess, node)
+         else return Question(question, node, guess)
+         }
+      }
+      "Question":  {
+         if Confirm(node.question) then node.yes := Ask(node.yes)
+         else node.no := Ask(node.no)
+         }
+      }
+end
+#  Article() -- Come up with the appropriate indefinite article.
+#
+procedure Article(word)
+   return if any('aeiouAEIOU', word) then "an" else "a"
+end
+#  Save() -- Store our acquired knowledge in a disk file name
+#  based on the GameObject.
+#
+procedure Save()
+   local f
+   f := open(GameObject || "s", "w")
+   Output(Tree, f)
+   close(f)
+   return
+end
+#  Output() -- Recursive procedure used to output the knowledge tree.
+#
+procedure Output(node, f, sense)
+   static indent
+   initial indent := 0
+   /f := &output
+   /sense := " "
+   case type(node) of {
+      "string":        write(f, repl(" ", indent), sense, "A: ", node)
+      "Question":  {
+         write(f, repl(" ", indent), sense, "Q: ", node.question)
+         indent +:= 1
+         Output(node.yes, f, "y")
+         Output(node.no, f, "n")
+         indent -:= 1
+         }
+      }
+   return
+end
+#  Get() -- Read in a knowledge base from a file.
+#
+procedure Get()
+   local f
+   f := open(GameObject || "s", "r") | fail
+   Tree := Input(f)
+   close(f)
+   return
+end
+#  Input() -- Recursive procedure used to input the knowledge tree.
+#
+procedure Input(f)
+   local nodetype, s
+   read(f) ? (tab(upto(~' \t')) & =("y" | "n" | "") &
+      nodetype := move(1) & move(2) & s := tab(0))
+   return if nodetype == "Q" then Question(s, Input(f), Input(f)) else s
+end
+#  List() -- Lists the objects in the knowledge base.
+#
+$define Length           78
+procedure List()
+   local lst, line, item
+   lst := Show(Tree, [ ])
+   line := ""
+   every item := !sort(lst) do {
+      if *line + *item > Length then {
+         write(trim(line))
+         line := ""
+         }
+      line ||:= item || ", "
+      }
+   write(line[1:-2])
+   return
+end
+#
+#  Show() -- Recursive procedure used to navigate the knowledge tree.
+#
+procedure Show(node, lst)
+   if type(node) == "Question" then {
+      lst := Show(node.yes, lst)
+      lst := Show(node.no, lst)
+      }
+   else put(lst, node)
+   return lst
+end
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-inform7.html b/docs/_style/prism-master/examples/prism-inform7.html new file mode 100644 index 0000000000..9e2214f01d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-inform7.html @@ -0,0 +1,171 @@ +

Comments

+
[This is a comment]
+[This is a
+multi-line comment]
+ +

Texts

+
"This is a string"
+"This is a
+multi-line string"
+ +

Numbers

+
42
+3.14159
+50kg
+100m
+one
+three
+twelve
+ +

Titles

+
Section 2 - Flamsteed's Balloon
+
+Part SR1 - The Physical World Model
+
+Table of Floors
+ +

Standard kinds, verbs and keywords

+
In the Treehouse is a container called the cardboard box.
+The cardboard box is a closed container. The glass bottle is a transparent open container. The box is fixed in place and openable.
+
+Check photographing:
+    if the noun is the camera, say "Sadly impossible." instead.
+ +

Text substitution

+
"[if the player is in Center Ring]A magician's booth stands in the corner, painted dark blue with glittering gold stars.[otherwise if the magician's booth is closed]A crack of light indicates the way back out to the center ring.[otherwise]The door stands open to the outside.[end if]".
+ +

Full example

+
"Lakeside Living"
+
+A volume is a kind of value. 15.9 fl oz specifies a volume with parts ounces and tenths (optional, preamble optional).
+
+A fluid container is a kind of container. A fluid container has a volume called a fluid capacity. A fluid container has a volume called current volume.
+
+The fluid capacity of a fluid container is usually 12.0 fl oz. The current volume of a fluid container is usually 0.0 fl oz.
+
+Liquid is a kind of value. The liquids are water, absinthe, and iced tea. A fluid container has a liquid.
+
+Instead of examining a fluid container:
+    if the noun is empty,
+        say "You catch just a hint of [the liquid of the noun] at the bottom.";
+    otherwise
+        say "[The noun] contains [current volume of the noun in rough terms] of [liquid of the noun]."
+
+To say (amount - a volume) in rough terms:
+    if the amount is less than 0.5 fl oz:
+        say "a swallow or two";
+    otherwise if tenths part of amount is greater than 3 and tenths part of amount is less than 7:
+        let estimate be ounces part of amount;
+        say "[estimate in words] or [estimate plus 1 in words] fluid ounces";
+    otherwise:
+        if tenths part of amount is greater than 6, increase amount by 1.0 fl oz;
+        say "about [ounces part of amount in words] fluid ounce[s]".
+
+Before printing the name of a fluid container (called the target) while not drinking or pouring:
+    if the target is empty:
+        say "empty ";
+    otherwise:
+        do nothing.
+
+After printing the name of a fluid container (called the target) while not examining or pouring:
+    unless the target is empty:
+        say " of [liquid of the target]";
+        omit contents in listing.
+
+Instead of inserting something into a fluid container:
+    say "[The second noun] has too narrow a mouth to accept anything but liquids."
+
+Definition: a fluid container is empty if the current volume of it is 0.0 fl oz. Definition: a fluid container is full if the current volume of it is the fluid capacity of it.
+
+Understand "drink from [fluid container]" as drinking.
+
+Instead of drinking a fluid container:
+    if the noun is empty:
+        say "There is no more [liquid of the noun] within." instead;
+    otherwise:
+        decrease the current volume of the noun by 0.2 fl oz;
+        if the current volume of the noun is less than 0.0 fl oz, now the current volume of the noun is 0.0 fl oz;
+        say "You take a sip of [the liquid of the noun][if the noun is empty], leaving [the noun] empty[end if]."
+
+Part 2 - Filling
+
+Understand the command "fill" as something new.
+
+Understand "fill [fluid container] with/from [full liquid source]" as filling it with. Understand "fill [fluid container] with/from [fluid container]" as filling it with.
+
+Understand "fill [something] with/from [something]" as filling it with.
+
+Filling it with is an action applying to two things. Carry out filling it with: try pouring the second noun into the noun instead.
+
+Understand "pour [fluid container] in/into/on/onto [fluid container]" as pouring it into. Understand "empty [fluid container] into [fluid container]" as pouring it into.
+
+Understand "pour [something] in/into/on/onto [something]" as pouring it into. Understand "empty [something] into [something]" as pouring it into.
+
+Pouring it into is an action applying to two things.
+
+Check pouring it into:
+    if the noun is not a fluid container, say "You can't pour [the noun]." instead;
+    if the second noun is not a fluid container, say "You can't pour liquids into [the second noun]." instead;
+    if the noun is the second noun, say "You can hardly pour [the noun] into itself." instead;
+    if the liquid of the noun is not the liquid of the second noun:
+        if the second noun is empty, now the liquid of the second noun is the liquid of the noun;
+        otherwise say "Mixing [the liquid of the noun] with [the liquid of the second noun] would give unsavory results." instead;
+    if the noun is empty, say "No more [liquid of the noun] remains in [the noun]." instead;
+    if the second noun is full, say "[The second noun] cannot contain any more than it already holds." instead.
+
+Carry out pouring it into:
+    let available capacity be the fluid capacity of the second noun minus the current volume of the second noun;
+    if the available capacity is greater than the current volume of the noun, now the available capacity is the current volume of the noun;
+    increase the current volume of the second noun by available capacity;
+    decrease the current volume of the noun by available capacity.
+
+Report pouring it into:
+    say "[if the noun is empty][The noun] is now empty;[otherwise][The noun] now contains [current volume of the noun in rough terms] of [liquid of the noun]; [end if]";
+    say "[the second noun] contains [current volume of the second noun in rough terms] of [liquid of the second noun][if the second noun is full], and is now full[end if]."
+
+Understand the liquid property as describing a fluid container. Understand "of" as a fluid container.
+
+A liquid source is a kind of fluid container. A liquid source has a liquid. A liquid source is usually scenery. The fluid capacity of a liquid source is usually 3276.7 fl oz. The current volume of a liquid source is usually 3276.7 fl oz. Instead of examining a liquid source: say "[The noun] is full of [liquid of the noun]."
+
+Carry out pouring a liquid source into something: now the current volume of the noun is 3276.7 fl oz.
+
+After pouring a liquid source into a fluid container:
+    say "You fill [the second noun] up with [liquid of the noun] from [the noun]."
+
+Instead of pouring a fluid container into a liquid source:
+    if the noun is empty, say "[The noun] is already empty." instead;
+    now the current volume of the noun is 0.0 fl oz;
+    say "You dump out [the noun] into [the second noun]."
+
+Swimming is an action applying to nothing. Understand "swim" or "dive" as swimming.
+
+Instead of swimming in the presence of a liquid source:
+    say "You don't feel like a dip just now."
+
+Before inserting something into a liquid source: say "[The noun] would get lost and never be seen again." instead.
+
+Part 3 - Scenario
+
+The Lakeside is a room. The Lakeside swing is an enterable supporter in the Lakeside. "Here you are by the lake, enjoying a summery view."
+
+The glass is a fluid container carried by the player. The liquid of the glass is absinthe. The current volume of the glass is 0.8 fl oz.
+
+The pitcher is a fluid container in the Lakeside. The fluid capacity of the pitcher is 32.0 fl oz. The current volume of the pitcher is 20.0 fl oz. The liquid of the pitcher is absinthe.
+
+The lake is a liquid source. It is in the Lakeside.
+
+The player wears a bathing outfit. The description of the bathing outfit is "Stylishly striped in blue and white, and daringly cut to reveal almost all of your calves, and quite a bit of upper arm, as well. You had a moral struggle, purchasing it; but mercifully the lakeshore is sufficiently secluded that no one can see you in this immodest apparel."
+
+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". 
+ +

Known failures

+

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. +

+ +

Names starting with a number

+
The box 1A is a container
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-ini.html b/docs/_style/prism-master/examples/prism-ini.html new file mode 100644 index 0000000000..284fbe440c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-ini.html @@ -0,0 +1,10 @@ +

Comments

+
; This is a comment
+ +

Section title

+
[owner]
+[database]
+ +

Properties

+
name=prism
+file="somefile.txt"
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-io.html b/docs/_style/prism-master/examples/prism-io.html new file mode 100644 index 0000000000..ff5160a43d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-io.html @@ -0,0 +1,31 @@ +

Comments

+
//
+// Foobar
+#!/usr/bin/env io
+/* multiline
+comment
+*/
+ +

Strings

+
"this is a \"test\".\nThis is only a test."
+"""this is a "test".
+This is only a test."""
+ +

Numbers

+
123
+123.456
+0.456
+123e-4
+123e4
+123.456e-7
+123.456e2
+
+ +

Full example

+
"Hello, world!" println
+A := Object clone    // creates a new, empty object named "A"
+factorial := method(n,
+    if(n == 0, return 1)
+    res := 1
+    Range 1 to(n) foreach(i, res = res * i)
+)
diff --git a/docs/_style/prism-master/examples/prism-j.html b/docs/_style/prism-master/examples/prism-j.html new file mode 100644 index 0000000000..cf4c109afa --- /dev/null +++ b/docs/_style/prism-master/examples/prism-j.html @@ -0,0 +1,59 @@ +

Comments

+
NB. This is a comment
+ +

Strings

+
'This is a string.'
+'This is a string with ''quotes'' in it.'
+ +

Numbers

+
2.3e2 2.3e_2 2j3
+2p1 1p_1
+1x2 2x1 1x_1
+2e2j_2e2 2e2j2p1 2ad45 2ar0.785398
+16b1f 10b23 _10b23 1e2b23 2b111.111
+ +

Verbs

+
%4
+3%4
+,b
+'I';'was';'here'
+3 5$'wake read lamp '
+ +

Adverbs

+
1 2 3 */ 4 5 6 7
+'%*'(1 3;2 _1)} y
+ +

Conjunctions

+
10&^. 2 3 10 100 200
++`*
++:@*: +/ -:@%:
+ +

Examples

+
NB. The following functions E1, E2 and E3
+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. [
+E2=: f`g`[}
+E3=: F`g`[}
+f=: {:@] * {.@] { [
+F=: [: +/ (1:,{:@]) * (}:@] { [)
+g=: {.@]
+M=: i. 4 5
+M;(M E1 1 3);(M E2 1 10);(M E3 1 3 10)
+ +
NB. Implementation of quicksort
+
+sel=: adverb def 'u # ['
+
+quicksort=: verb define
+  if. 1 >: #y do. y
+  else.
+    (quicksort y <sel e),(y =sel e),quicksort y >sel e=.y{~?#y
+  end.
+)
+ +
NB. Implementation of quicksort (tacit programming)
+
+quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-java.html b/docs/_style/prism-master/examples/prism-java.html new file mode 100644 index 0000000000..691a6b10ec --- /dev/null +++ b/docs/_style/prism-master/examples/prism-java.html @@ -0,0 +1,65 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz";
+'foo \'bar\' baz';
+ +

Numbers

+
123
+123.456
+-123.456
+.3f
+1.3e9d
+0xaf
+0xAF
+0xFF.AEP-4
+
+ +

Full example

+
import java.util.Scanner;
+
+public class Life {
+
+    @Override @Bind("One")
+    public void show(boolean[][] grid){
+        String s = "";
+        for(boolean[] row : grid){
+            for(boolean val : row)
+                if(val)
+                    s += "*";
+                else
+                    s += ".";
+            s += "\n";
+        }
+        System.out.println(s);
+    }
+
+    public static boolean[][] gen(){
+        boolean[][] grid = new boolean[10][10];
+        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;
+    }
+
+    public static void main(String[] args){
+        boolean[][] world = gen();
+        show(world);
+        System.out.println();
+        world = nextGen(world);
+        show(world);
+        Scanner s = new Scanner(System.in);
+        while(s.nextLine().length() == 0){
+            System.out.println();
+            world = nextGen(world);
+            show(world);
+
+        }
+    }
+
+	// [...]
+}
diff --git a/docs/_style/prism-master/examples/prism-javascript.html b/docs/_style/prism-master/examples/prism-javascript.html new file mode 100644 index 0000000000..51fe4835bd --- /dev/null +++ b/docs/_style/prism-master/examples/prism-javascript.html @@ -0,0 +1,77 @@ +

Variable assignment

+
var foo = "bar", baz = 5;
+ +

Operators

+
(1 + 2 * 3)/4 >= 3 && 4 < 5 || 6 > 7
+ +

Indented code

+
if (true) {
+	while (true) {
+		doSomething();
+	}
+}
+ +

Regex with slashes

+
var foo = /([^/])\/(\\?.|\[.+?])+?\/[gim]{0,3}/g;
+ +

Regex that ends with double slash

+
var bar = /\/\*[\w\W]*?\*\//g;
+ +

Single line comments & regexes

+
// http://lea.verou.me
+var comment = /\/\*[\w\W]*?\*\//g;
+ +

Link in comment

+
// http://lea.verou.me
+/* http://lea.verou.me */
+ +

Nested strings

+
var foo = "foo", bar = "He \"said\" 'hi'!"
+ +

Strings inside comments

+
// "foo"
+/* "foo" */
+ +

Strings with slashes

+
env.content + '</' + env.tag + '>'
+var foo = "/" + "/";
+var foo = "http://prismjs.com"; // Strings are strings and comments are comments ;)
+ +

Regex inside single line comment

+
// hey, /this doesn’t fail!/ :D
+ +

Two or more division operators on the same line

+
var foo = 5 / 6 / 7;
+ +

A division operator on the same line as a regex

+
var foo = 1/2, bar = /a/g;
+var foo = /a/, bar = 3/4;
+ +

ES6 features

+
// Regex "y" and "u" flags
+var a = /[a-zA-Z]+/gimyu;
+
+// for..of loops
+for(let x of y) { }
+
+// Modules: import
+import { foo as bar } from "file.js"
+
+// Template strings
+`Only on ${y} one line`
+`This template string ${x} is on
+
+multiple lines.`
+`40 + 2 = ${ 40 + 2 }`
+`The squares of the first 3 natural integers are ${[for (x of [1,2,3]) x*x].join(', ')}`
+ +

Known failures

+

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. +

+ +

String interpolation containing a closing brace

+
`${ {foo:'bar'}.foo }`
+`${ '}' }`
diff --git a/docs/_style/prism-master/examples/prism-javastacktrace.html b/docs/_style/prism-master/examples/prism-javastacktrace.html new file mode 100644 index 0000000000..3511aa6ae5 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-javastacktrace.html @@ -0,0 +1,63 @@ +

Full example

+
javax.servlet.ServletException: Something bad happened
+    at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:60)
+    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
+    at com.example.myproject.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
+    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
+    at com.example.myproject.OutputBufferFilter.doFilter(OutputBufferFilter.java:33)
+    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
+    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
+    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
+    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
+    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
+    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
+    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
+    at org.mortbay.jetty.Server.handle(Server.java:326)
+    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
+    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
+    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
+    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
+    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
+    at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
+    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
+Caused by: com.example.myproject.MyProjectServletException
+    at com.example.myproject.MyServlet.doPost(MyServlet.java:169)
+    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
+    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
+    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
+    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
+    at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:30)
+    ... 27 more
+Suppressed: org.hibernate.exception.ConstraintViolationException: could not insert: [com.example.myproject.MyEntity]
+    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
+    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
+    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:64)
+    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2329)
+    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2822)
+    at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
+    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
+    at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
+    at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
+    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
+    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
+    at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
+    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
+    at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
+    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
+    at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:705)
+    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:693)
+    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:689)
+    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+    at java.lang.reflect.Method.invoke(Method.java:597)
+    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344)
+    at $Proxy19.save(Unknown Source)
+    at com.example.myproject.MyEntityService.save(MyEntityService.java:59) <-- relevant call (see notes below)
+    at com.example.myproject.MyServlet.doPost(MyServlet.java:164)
+    ... 32 more
+Caused by: java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...]
+    at org.hsqldb.jdbc.Util.throwError(Unknown Source)
+    at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
+    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
+    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:57)
+    ... 54 more
diff --git a/docs/_style/prism-master/examples/prism-jolie.html b/docs/_style/prism-master/examples/prism-jolie.html new file mode 100644 index 0000000000..8d23d995ab --- /dev/null +++ b/docs/_style/prism-master/examples/prism-jolie.html @@ -0,0 +1,162 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz";
+'foo \'bar\' baz'
+ +

Numbers

+
42
+42L
+1.2e3
+0.1E-4
+0.2e+1
+
+ +

Full example

+
include "console.iol"
+
+type HubType: void {
+  .sid: undefined
+  .nodes[1,*] : NodeType
+}
+
+type NodeType: void {
+  .sid: string
+  .node: string
+  .load?: int
+}
+
+type NetType: HubType | NodeType
+
+interface NetInterface {
+  OneWay: start( string ), addElement( NetType ), removeElement( NetType ), quit( void )
+  RequestResponse: showElements( void )( NetType ) throws SomeFault
+}
+
+type LogType: void {
+  .message: string
+}
+
+interface LoggerInterface {
+  RequestResponse: log( LogType )( void )
+}
+
+outputPort LoggerService {
+    Interfaces: LoggerInterface
+}
+
+embedded {
+  Jolie: "logger.ol" in LoggerService
+}
+
+type AuthenticationData: void {
+    .key:string
+}
+
+interface extender AuthInterfaceExtender {
+    OneWay: *(AuthenticationData)
+}
+
+service SubService 
+{
+  Interfaces: NetInterface
+
+  main
+  {
+     println@Console( "I do nothing" )()
+  }
+}
+
+inputPort ExtLogger {
+  Location: "socket://localhost:9000"
+  Protocol: sodep
+  Interfaces: LoggerInterface
+  Aggregates: LoggerService with AuthInterfaceExtender
+}
+
+courier ExtLogger {
+  [interface LoggerInterface( request )] {
+    if ( key == "secret" ){
+      forward ( request )
+    }
+  }
+}
+
+inputPort In {
+  Location: "socket://localhost:8000"
+  Protocol: http {
+    .debug = true;
+    .debug.showContent = true
+  }
+  Interfaces: NetInterface
+  Aggregates: SubService, 
+              LoggerService
+  Redirects: A => SubService, 
+             B => SubService
+}
+
+cset {
+  sid: HubType.sid NodeType.sid
+}
+
+execution{ concurrent }
+
+define netmodule {
+  if( request.load == 0 || request.load < 1 && 
+      request.load <= 2 || request.load >= 3 && 
+      request.load > 4  || request.load%4 == 2
+  ) {
+    scope( scopeName ) {   
+      // inline comment
+      install( MyFault => println@Console( "Something \"Went\" Wrong" + ' but it\'s ok' )() );
+      /*
+      * Multi-line
+      * Comment
+      */
+      install( this => cH; println@Console( "Something went wrong: " + ^load )() );
+      install( default => comp( scopeName ); println@Console( "Something went wrong" )() );
+      load -> request.( "load" );
+      { ++load | load++ | --load | load-- };
+      throw( MyFault )
+    }
+  } else {
+    foreach ( node -> request.nodes ) {
+      with( node ){
+        while( .load != 100 ) {
+          .load++
+        }   
+      }
+    } 
+  }
+}
+
+main
+{
+  start( sid );
+  synchronized( unneededSync ){
+    csets.sid = sid;
+    undef( sid )
+  };
+  provide
+    [ addElement( request ) ]{
+      if( request instanceof NodeType ) {
+        netmodule
+      }
+    }
+    [ removeElement() ]
+    [ showElements()( response ){
+       /*
+       * assemble response
+       */
+       nullProcess
+     }]{
+       // log the request
+       log@LoggerService( new )();
+       log @ LoggerService( new )()
+     }
+  until
+   [ quit() ]{ exit }
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-jsx.html b/docs/_style/prism-master/examples/prism-jsx.html new file mode 100644 index 0000000000..faff492034 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-jsx.html @@ -0,0 +1,18 @@ +

Full example

+
var ExampleApplication = React.createClass({
+    render: function() {
+      var elapsed = Math.round(this.props.elapsed  / 100);
+      var seconds = elapsed / 10 + (elapsed % 10 ? '' : '.0' );
+      var message =
+        'React has been successfully running for ' + seconds + ' seconds.';
+
+      return <p>{message}</p>;
+    }
+  });
+  var start = new Date().getTime();
+  setInterval(function() {
+    React.render(
+      <ExampleApplication elapsed={new Date().getTime() - start} />,
+      document.getElementById('container')
+    );
+  }, 50);
diff --git a/docs/_style/prism-master/examples/prism-julia.html b/docs/_style/prism-master/examples/prism-julia.html new file mode 100644 index 0000000000..b69d0454f8 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-julia.html @@ -0,0 +1,29 @@ +

Full example

+
function mandel(z)
+    c = z
+    maxiter = 80
+    for n = 1:maxiter
+        if abs(z) > 2
+            return n-1
+        end
+        z = z^2 + c
+    end
+    return maxiter
+end
+
+function randmatstat(t)
+    n = 5
+    v = zeros(t)
+    w = zeros(t)
+    for i = 1:t
+        a = randn(n,n)
+        b = randn(n,n)
+        c = randn(n,n)
+        d = randn(n,n)
+        P = [a b c d]
+        Q = [a b; c d]
+        v[i] = trace((P.'*P)^4)
+        w[i] = trace((Q.'*Q)^4)
+    end
+    std(v)/mean(v), std(w)/mean(w)
+end
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-keyman.html b/docs/_style/prism-master/examples/prism-keyman.html new file mode 100644 index 0000000000..770827d586 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-keyman.html @@ -0,0 +1,107 @@ +

Comments

+
c This is a comment
+ +

Strings, numbers and characters

+
"'this' is a string"
+'and so is "this"'
+U+0041 d65 x41   c these are all the letter A
+
+ +

Prefixes and Virtual Keys

+ +

+c Match RAlt+E on desktops, Ctrl+Alt+E on web because L/R Alt not consistently supported in browsers.
+$KeymanOnly: + [RALT K_E] > "€"
+$KeymanWeb: + [CTRL ALT K_E] > "€"
+
+ +

Example Code

+ +
c =====================Begin Identity Section===================================================
+c 
+c Mnemonic input method for Amharic script on US-QWERTY
+c keyboards for Keyman version 7.1, compliant with Unicode 4.1 and later.
+c 
+
+store(&VERSION) '9.0'
+store(&Name) "Amharic"
+c store(&MnemonicLayout) "1"
+store(&CapsAlwaysOff) "1"
+store(&Copyright) "Creative Commons Attribution 3.0"
+store(&Message) "This is an Amharic language mnemonic input method for Ethiopic script that requires Unicode 4.1 support."
+store(&WINDOWSLANGUAGES) 'x045E x045E'
+store(&LANGUAGE) 'x045E'
+store(&EthnologueCode) "amh"
+store(&VISUALKEYBOARD) 'gff-amh-7.kvk'
+store(&KMW_EMBEDCSS) 'gff-amh-7.css'
+HOTKEY "^%A"
+c 
+c =====================End Identity Section=====================================================
+
+c =====================Begin Data Section=======================================================
+
+c ---------------------Maps for Numbers---------------------------------------------------------
+store(ArabOnes) '23456789'
+store(ones)     '፪፫፬፭፮፯፰፱'
+store(tens)     '፳፴፵፶፷፸፹፺'
+store(arabNumbers) '123456789'
+store(ethNumbers) '፩፪፫፬፭፮፯፰፱፲፳፴፵፶፷፸፹፺፻፼'
+store(arabNumbersWithZero) '0123456789'
+store(ColonOrComma) ':,'
+store(ethWordspaceOrComma) '፡፣'
+c ---------------------End Numbers--------------------------------------------------------------
+
+c =====================End Data Section=========================================================
+
+c =====================Begin Functional Section=================================================
+c 
+store(&LAYOUTFILE) 'gff-amh-7_layout.js'
+store(&BITMAP) 'amharic.bmp'
+store(&TARGETS) 'any windows'
+begin Unicode > use(main)
+group(main) using keys    
+
+c ---------------------Input of Numbers---------------------------------------------------------
+
+c Special Rule for Arabic Numerals
+c 
+c The following attempts to auto-correct the use of Ethiopic wordspace and
+c Ethiopic comma within an Arabic numeral context.  Ethiopic wordspace gets
+c used erroneously in time formats and Ethiopic commas as an order of thousands
+c delimiter. The correction context is not known until numerals appear on _both_
+c sides of the punctuation.
+c 
+  any(arabNumbersWithZero) any(ethWordspaceOrComma) + any(arabNumbers) > index(arabNumbersWithZero,1) index(ColonOrComma,2) index(arabNumbers,3)
+
+c Ethiopic Numerals
+
+  "'" + '1' > '፩'
+  "'" + any(ArabOnes) > index(ones,2)
+
+c special cases for multiples of one
+  '፩'  + '0' > '፲'
+  '፲'  + '0' > '፻'
+  '፻'  + '0' > '፲፻'
+  '፲፻' + '0' > '፼'
+  '፼'  + '0' > '፲፼'    
+  '፲፼' + '0' > '፻፼' 
+  '፻፼'  + '0' > '፲፻፼'
+  '፲፻፼' + '0' > '፼፼'
+  '፼፼' + '0' > context beep  c do not go any higher, we could beep here
+
+c upto the order of 100 million
+  any(ones)     + '0' > index(tens,1)
+  any(tens)     + '0' > index(ones,1) '፻'  c Hundreds
+  any(ones)  '፻ '+ '0' > index(tens,1) '፻'  c Thousands
+  any(tens)  '፻' + '0' > index(ones,1) '፼'  c Ten Thousands
+  any(ones)  '፼' + '0' > index(tens,1) '፼'  c Hundred Thousands
+  any(tens)  '፼' + '0' > index(ones,1) '፻፼' c Millions
+  any(ones) '፻፼' + '0' > index(tens,1) '፻፼' c Ten Millions
+  any(tens) '፻፼' + '0' > index(ones,1) '፼፼' c Hundred Millions
+
+c enhance this later, look for something that can copy a match over
+  any(ethNumbers) + any(arabNumbers) > index(ethNumbers,1)  index(ethNumbers,2)
+c ---------------------End Input of Numbers-----------------------------------------------------
+                                            
+c =====================End Functional Section===================================================
+
diff --git a/docs/_style/prism-master/examples/prism-kotlin.html b/docs/_style/prism-master/examples/prism-kotlin.html new file mode 100644 index 0000000000..7c8f7b4ee4 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-kotlin.html @@ -0,0 +1,134 @@ +

Numbers

+
123
+123L
+0x0F
+0b00001011
+123.5
+123.5e10
+123.5f
+123.5F
+ +

Strings and interpolation

+
'2'
+'\uFF00'
+'\''
+
+"foo $bar \"baz"
+"""
+foo ${40 + 2}
+baz${bar()}
+"""
+ +

Labels

+
loop@ for (i in 1..100) {
+  for (j in 1..100) {
+    if (...)
+      break@loop
+  }
+}
+ +

Annotations

+
public class MyTest {
+    lateinit var subject: TestSubject
+
+    @SetUp fun setup() {
+        subject = TestSubject()
+    }
+
+    @Test fun test() {
+        subject.method()  // dereference directly
+    }
+}
+ +

Full example

+
package com.example.html
+
+interface Element {
+    fun render(builder: StringBuilder, indent: String)
+
+    override fun toString(): String {
+        val builder = StringBuilder()
+        render(builder, "")
+        return builder.toString()
+    }
+}
+
+class TextElement(val text: String): Element {
+    override fun render(builder: StringBuilder, indent: String) {
+        builder.append("$indent$text\n")
+    }
+}
+
+abstract class Tag(val name: String): Element {
+    val children = arrayListOf<Element>()
+    val attributes = hashMapOf<String, String>()
+
+    protected fun initTag<T: Element>(tag: T, init: T.() -> Unit): T {
+        tag.init()
+        children.add(tag)
+        return tag
+    }
+
+    override fun render(builder: StringBuilder, indent: String) {
+        builder.append("$indent<$name${renderAttributes()}>\n")
+        for (c in children) {
+            c.render(builder, indent + "  ")
+        }
+        builder.append("$indent</$name>\n")
+    }
+
+    private fun renderAttributes(): String? {
+        val builder = StringBuilder()
+        for (a in attributes.keySet()) {
+            builder.append(" $a=\"${attributes[a]}\"")
+        }
+        return builder.toString()
+    }
+}
+
+abstract class TagWithText(name: String): Tag(name) {
+    operator fun String.plus() {
+        children.add(TextElement(this))
+    }
+}
+
+class HTML(): TagWithText("html") {
+    fun head(init: Head.() -> Unit) = initTag(Head(), init)
+
+    fun body(init: Body.() -> Unit) = initTag(Body(), init)
+}
+
+class Head(): TagWithText("head") {
+    fun title(init: Title.() -> Unit) = initTag(Title(), init)
+}
+
+class Title(): TagWithText("title")
+
+abstract class BodyTag(name: String): TagWithText(name) {
+    fun b(init: B.() -> Unit) = initTag(B(), init)
+    fun p(init: P.() -> Unit) = initTag(P(), init)
+    fun h1(init: H1.() -> Unit) = initTag(H1(), init)
+    fun a(href: String, init: A.() -> Unit) {
+        val a = initTag(A(), init)
+        a.href = href
+    }
+}
+
+class Body(): BodyTag("body")
+
+class B(): BodyTag("b")
+class P(): BodyTag("p")
+class H1(): BodyTag("h1")
+class A(): BodyTag("a") {
+    public var href: String
+        get() = attributes["href"]!!
+        set(value) {
+            attributes["href"] = value
+        }
+}
+
+fun html(init: HTML.() -> Unit): HTML {
+    val html = HTML()
+    html.init()
+    return html
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-latex.html b/docs/_style/prism-master/examples/prism-latex.html new file mode 100644 index 0000000000..137df3605d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-latex.html @@ -0,0 +1,12 @@ +

Comments

+
% This is a comment
+ +

Commands

+
\begin{document}
+\documentstyle[twoside,epsfig]{article}
+\usepackage{epsfig,multicol}
+ +

Math mode

+
$\alpha$
+H$_{2}$O
+45$^{\circ}$C
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-less.html b/docs/_style/prism-master/examples/prism-less.html new file mode 100644 index 0000000000..db8a5e6411 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-less.html @@ -0,0 +1,70 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

Variables

+
@nice-blue: #5B83AD;
+@light-blue: @nice-blue + #111;
+ +

At-rules

+
@media screen and (min-width: 320px) {}
+ +

Mixins

+
.bordered {
+  border-top: dotted 1px black;
+  border-bottom: solid 2px black;
+}
+#menu a {
+  .bordered;
+}
+#header a {
+  color: orange;
+  #bundle > .button;
+}
+ +

Mixins with parameters

+
.foo (@bg: #f5f5f5, @color: #900) {
+  background: @bg;
+  color: @color;
+}
+.bar {
+  .foo();
+}
+.class1 {
+  .mixin(@margin: 20px; @color: #33acfe);
+}
+.class2 {
+  .mixin(#efca44; @padding: 40px);
+}
+ +

Interpolation

+
@mySelector: banner;
+.@{mySelector} {
+  font-weight: bold;
+}
+@property: color;
+.widget {
+  @{property}: #0ee;
+  background-@{property}: #999;
+}
+ +

Known failures

+

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. +

+ +

At-rules looking like variables

+
@import "some file.less";
+ +

At-rules containing interpolation

+
@import "@{themes}/tidal-wave.less";
+ +

extend is not highlighted consistently

+
nav ul {
+  &:extend(.inline);
+  background: blue;
+}
+.a:extend(.b) {}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-liquid.html b/docs/_style/prism-master/examples/prism-liquid.html new file mode 100644 index 0000000000..7497197558 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-liquid.html @@ -0,0 +1,75 @@ +

Comments

+
{% comment %}This is a comment{% endcomment %}
+ +

Control Flow

+ +Liquid provides multiple control flow statements. + +

if

+

+{% if customer.name == 'kevin' %}
+  Hey Kevin!
+{% elsif customer.name == 'anonymous' %}
+  Hey Anonymous!
+{% else %}
+  Hi Stranger!
+{% endif %}
+
+ +

unless

+ +The opposite of if – executes a block of code only if a certain condition is not met. + +

+{% unless product.title == 'Awesome Shoes' %}
+These shoes are not awesome.
+{% endunless %}
+
+ +

case

+ +Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values. + +

+{% assign handle = 'cake' %}
+{% case handle %}
+  {% when 'cake' %}
+    This is a cake
+  {% when 'cookie' %}
+    This is a cookie
+  {% else %}
+    This is not a cake nor a cookie
+{% endcase %}
+
+ +

for

+ +Repeatedly executes a block of code. + +break = Causes the loop to stop iterating when it encounters the break tag. +continue = Causes the loop to skip the current iteration when it encounters the continue tag. + +

+{% for i in (1..10) %}
+  {% if i == 4 %}
+    {% break %}
+  {% elsif i == 6 %}
+    {% continue %}
+  {% else %}
+    {{ i }}
+  {% endif %}
+{% endfor %}
+
+ +

range

+ +

+{% for i in (3..5) %}
+  {{ i }}
+{% endfor %}
+
+{% assign num = 4 %}
+{% for i in (1..num) %}
+  {{ i }}
+{% endfor %}
+
diff --git a/docs/_style/prism-master/examples/prism-lisp.html b/docs/_style/prism-master/examples/prism-lisp.html new file mode 100644 index 0000000000..436d5c9c8c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-lisp.html @@ -0,0 +1,46 @@ +

Comments

+
;; (foo bar)
+ +

Strings

+
(foo "bar")
+ +

With nested symbols

+
(foo "A string with a `symbol ")
+ +

With nested arguments

+
(foo "A string with an ARGUMENT ")
+ +

Quoted symbols

+
(foo #'bar)
+ +

Lisp properties

+
(foo :bar)
+ +

Splices

+
(foo ,bar ,@bar)
+ +

Keywords

+
(let foo (bar arg))
+ +

Declarations

+
(declare foo)
+ +

Booleans

+
(foo t)
+
(foo nil)
+ +

Numbers

+
(foo 1)
+
(foo -1.5)
+ +

Definitions

+
(defvar bar 23)
+
(defcustom bar 23)
+ +

Function definitions

+
(defun multiply-by-seven (number)
+       "Multiply NUMBER by seven."
+       (* 7 number))
+ +

Lambda expressions

+
(lambda (number) (* 7 number))
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-livescript.html b/docs/_style/prism-master/examples/prism-livescript.html new file mode 100644 index 0000000000..e9194d363c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-livescript.html @@ -0,0 +1,84 @@ +

Comments

+
# This is a single line comment
+/* This is a
+multi line comment */
+ +

Numbers

+
42
+42km
+3.754km_2
+16~BadFace
+36~azertyuiop0123456789
+ +

Strings and interpolation

+
''
+''''''
+""
+""""""
+'Foo \' bar
+	baz'
+'''Foo \''' bar
+	bar'''
+"Foo #bar \"
+	#{2 + 2}\""
+"""#foobar \""" #{ if /test/ == 'test' then 3 else 4}
+	baz"""
+ +

Regex

+
/foobar/ig
+//
+^foo # foo
+[bar]*bA?z # barbaz
+//m
+ +

Full example

+
# example from Str.ls
+
+split = (sep, str) -->
+  str.split sep
+
+join = (sep, xs) -->
+  xs.join sep
+
+lines = (str) ->
+  return [] unless str.length
+  str.split '\n'
+
+unlines = (.join '\n')
+
+words = (str) ->
+  return [] unless str.length
+  str.split /[ ]+/
+
+unwords = (.join ' ')
+
+chars = (.split '')
+
+unchars = (.join '')
+
+reverse = (str) ->
+  str.split '' .reverse!.join ''
+
+repeat = (n, str) -->
+  result = ''
+  for til n
+    result += str
+  result
+
+capitalize = (str) ->
+  (str.char-at 0).to-upper-case! + str.slice 1
+
+camelize = (.replace /[-_]+(.)?/g, (, c) -> (c ? '').to-upper-case!)
+
+# convert camelCase to camel-case, and setJSON to set-JSON
+dasherize = (str) ->
+    str
+      .replace /([^-A-Z])([A-Z]+)/g, (, lower, upper) ->
+         "#{lower}-#{if upper.length > 1 then upper else upper.to-lower-case!}"
+      .replace /^([A-Z]+)/, (, upper) ->
+         if upper.length > 1 then "#upper-" else upper.to-lower-case!
+
+module.exports = {
+  split, join, lines, unlines, words, unwords, chars, unchars, reverse,
+  repeat, capitalize, camelize, dasherize,
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-lolcode.html b/docs/_style/prism-master/examples/prism-lolcode.html new file mode 100644 index 0000000000..38308328aa --- /dev/null +++ b/docs/_style/prism-master/examples/prism-lolcode.html @@ -0,0 +1,62 @@ +

Comments

+
BTW Single line comment
+OBTW Multi-line
+comment TLDR
+ +

Strings and special characters

+
"foo :"bar:" baz"
+"foo:)bar:>baz"
+"Interpolation :{works} too!"
+ +

Numbers

+
42
+-42
+123.456
+ +

Variable declaration

+
I HAS A var
+var R "THREE"
+var R 3
+ +

Types

+
MAEK some_expr A YARN
+some_var IS NOW A NUMBR
+ +

Full example

+
OBTW Convert a number to hexadecimal. This
+     is returned as a string.
+TLDR
+HOW IZ I decimal_to_hex YR num
+    I HAS A i ITZ 0
+    I HAS A rem
+    I HAS A hex_num ITZ A BUKKIT
+    I HAS A decimal_num ITZ num
+    IM IN YR num_loop
+        rem R MOD OF decimal_num AN 16
+        I HAS A hex_digit
+        rem, WTF?
+            OMG 10, hex_digit R "A", GTFO
+            OMG 11, hex_digit R "B", GTFO
+            OMG 12, hex_digit R "C", GTFO
+            OMG 13, hex_digit R "D", GTFO
+            OMG 14, hex_digit R "E", GTFO
+            OMG 15, hex_digit R "F", GTFO
+            OMGWTF, hex_digit R rem
+        OIC
+        hex_num HAS A SRS i ITZ hex_digit
+        decimal_num R QUOSHUNT OF decimal_num AN 16
+        BOTH SAEM decimal_num AN 0, O RLY?
+            YA RLY, GTFO
+            NO WAI, i R SUM OF i AN 1
+        OIC
+    IM OUTTA YR num_loop
+    I HAS A hex_string ITZ A YARN
+    IM IN YR string_reverse
+        DIFFRINT i AN BIGGR OF i AN 0, O RLY?
+            YA RLY, GTFO
+        OIC
+        hex_string R SMOOSH hex_string AN hex_num'Z SRS i MKAY
+        i R DIFF OF i AN 1
+    IM OUTTA YR string_reverse
+    FOUND YR hex_string
+IF U SAY SO
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-lua.html b/docs/_style/prism-master/examples/prism-lua.html new file mode 100644 index 0000000000..288b7675a4 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-lua.html @@ -0,0 +1,89 @@ +

Comments

+
#!/usr/local/bin/lua
+--
+-- Single line comment
+--[[ Multi line
+comment ]]
+--[====[ Multi line
+comment ]====]
+ +

Strings

+
""
+"Foo\"bar"
+"Foo\
+bar \z
+baz"
+''
+'Foo\'bar'
+'Foo\
+bar \z
+baz'
+[[Multi "line"
+string]]
+[==[Multi [["line"]]
+string]==]
+ +

Numbers

+
3
+345
+0xff
+0xBEBADA
+3, 3., 3.1, .3,
+3e12, 3.e-41, 3.1E+1, .3e1
+0x0.1E
+0xA23p-4
+0X1.921FB54442D18P+1
+ +

Full example

+
function To_Functable(t, fn)
+  return setmetatable(t,
+    {
+     __index = function(t, k) return fn(k) end,
+     __call = function(t, k) return t[k] end
+    })
+end
+
+-- Functable bottles of beer implementation
+
+spell_out = {
+  "One", "Two", "Three", "Four", "Five",
+  "Six", "Seven", "Eight", "Nine", "Ten",
+  [0] = "No more",
+  [-1] = "Lots more"
+}
+
+spell_out = To_Functable(spell_out, function(i) return i end)
+
+bottles = To_Functable({"Just one bottle of beer"},
+                       function(i)
+                         return spell_out(i) .. " bottles of beer"
+                       end)
+
+function line1(i)
+  return bottles(i) .. " on the wall, " .. bottles(i) .. "\n"
+end
+
+line2 = To_Functable({[0] = "Go to the store, Buy some more,\n"},
+                     function(i)
+                       return "Take one down and pass it around,\n"
+                     end)
+
+function line3(i)
+  return bottles(i) .. " on the wall.\n"
+end
+
+function song(n)
+  for i = n, 0, -1 do
+    io.write(line1(i), line2(i), line3(i - 1), "\n")
+  end
+end
+ +

Known failures

+

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. +

+ +

Functions with a single string parameter not using parentheses are not highlighted

+
foobar"param";
diff --git a/docs/_style/prism-master/examples/prism-makefile.html b/docs/_style/prism-master/examples/prism-makefile.html new file mode 100644 index 0000000000..45f6f420ff --- /dev/null +++ b/docs/_style/prism-master/examples/prism-makefile.html @@ -0,0 +1,263 @@ +

Comments

+
# This is a comment
+include foo # This is another comment
+ +

Targets

+
kbd.o command.o files.o : command.h
+display.o insert.o search.o files.o : buffer.h
+
+.PHONY: clean
+clean:
+        rm *.o temp
+ +

Variables

+
objects = main.o kbd.o command.o display.o \
+          insert.o search.o files.o utils.o
+
+edit : $(objects)
+        cc -o edit $(objects)
+
+$(objects) : defs.h
+
+%oo: $$< $$^ $$+ $$*
+
+foo : bar/lose
+        cd $(@D) && gobble $(@F) > ../$@
+ +

Strings

+
STR = 'A string!'
+
+HELLO = 'hello \
+world'
+
+HELLO2 = "hello \
+world"
+ +

Directives

+
include foo *.mk $(bar)
+
+vpath %.c foo
+
+override define two-lines =
+foo
+$(bar)
+endef
+
+ifeq ($(CC),gcc)
+  libs=$(libs_for_gcc)
+else
+  libs=$(normal_libs)
+endif
+ +

Functions

+
whoami    := $(shell whoami)
+host-type := $(shell arch)
+
+y = $(subst 1,2,$(x))
+
+dirs := a b c d
+files := $(foreach dir,$(dirs),$(wildcard $(dir)/*))
+
+reverse = $(2) $(1)
+foo = $(call reverse,a,b)
+
+$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
+ +

Complete example

+
#!/usr/bin/make -f
+# Generated automatically from Makefile.in by configure.
+# Un*x Makefile for GNU tar program.
+# Copyright (C) 1991 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of the GNU
+# General Public License …
+…
+…
+
+SHELL = /bin/sh
+
+#### Start of system configuration section. ####
+
+srcdir = .
+
+# If you use gcc, you should either run the
+# fixincludes script that comes with it or else use
+# gcc with the -traditional option.  Otherwise ioctl
+# calls will be compiled incorrectly on some systems.
+CC = gcc -O
+YACC = bison -y
+INSTALL = /usr/local/bin/install -c
+INSTALLDATA = /usr/local/bin/install -c -m 644
+
+# Things you might add to DEFS:
+# -DSTDC_HEADERS        If you have ANSI C headers and
+#                       libraries.
+# -DPOSIX               If you have POSIX.1 headers and
+#                       libraries.
+# -DBSD42               If you have sys/dir.h (unless
+#                       you use -DPOSIX), sys/file.h,
+#                       and st_blocks in `struct stat'.
+# -DUSG                 If you have System V/ANSI C
+#                       string and memory functions
+#                       and headers, sys/sysmacros.h,
+#                       fcntl.h, getcwd, no valloc,
+#                       and ndir.h (unless
+#                       you use -DDIRENT).
+# -DNO_MEMORY_H         If USG or STDC_HEADERS but do not
+#                       include memory.h.
+# -DDIRENT              If USG and you have dirent.h
+#                       instead of ndir.h.
+# -DSIGTYPE=int         If your signal handlers
+#                       return int, not void.
+# -DNO_MTIO             If you lack sys/mtio.h
+#                       (magtape ioctls).
+# -DNO_REMOTE           If you do not have a remote shell
+#                       or rexec.
+# -DUSE_REXEC           To use rexec for remote tape
+#                       operations instead of
+#                       forking rsh or remsh.
+# -DVPRINTF_MISSING     If you lack vprintf function
+#                       (but have _doprnt).
+# -DDOPRNT_MISSING      If you lack _doprnt function.
+#                       Also need to define
+#                       -DVPRINTF_MISSING.
+# -DFTIME_MISSING       If you lack ftime system call.
+# -DSTRSTR_MISSING      If you lack strstr function.
+# -DVALLOC_MISSING      If you lack valloc function.
+# -DMKDIR_MISSING       If you lack mkdir and
+#                       rmdir system calls.
+# -DRENAME_MISSING      If you lack rename system call.
+# -DFTRUNCATE_MISSING   If you lack ftruncate
+#                       system call.
+# -DV7                  On Version 7 Unix (not
+#                       tested in a long time).
+# -DEMUL_OPEN3          If you lack a 3-argument version
+#                       of open, and want to emulate it
+#                       with system calls you do have.
+# -DNO_OPEN3            If you lack the 3-argument open
+#                       and want to disable the tar -k
+#                       option instead of emulating open.
+# -DXENIX               If you have sys/inode.h
+#                       and need it 94 to be included.
+
+DEFS =  -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
+        -DVPRINTF_MISSING -DBSD42
+# Set this to rtapelib.o unless you defined NO_REMOTE,
+# in which case make it empty.
+RTAPELIB = rtapelib.o
+LIBS =
+DEF_AR_FILE = /dev/rmt8
+DEFBLOCKING = 20
+
+CDEBUG = -g
+CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
+        -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" \
+        -DDEFBLOCKING=$(DEFBLOCKING)
+LDFLAGS = -g
+
+prefix = /usr/local
+# Prefix for each installed program,
+# normally empty or `g'.
+binprefix =
+
+# The directory to install tar in.
+bindir = $(prefix)/bin
+
+# The directory to install the info files in.
+infodir = $(prefix)/info
+
+#### End of system configuration section. ####
+
+SRCS_C  = tar.c create.c extract.c buffer.c   \
+          getoldopt.c update.c gnu.c mangle.c \
+          version.c list.c names.c diffarch.c \
+          port.c wildmat.c getopt.c getopt1.c \
+          regex.c
+SRCS_Y  = getdate.y
+SRCS    = $(SRCS_C) $(SRCS_Y)
+OBJS    = $(SRCS_C:.c=.o) $(SRCS_Y:.y=.o) $(RTAPELIB)
+
+AUX =   README COPYING ChangeLog Makefile.in  \
+        makefile.pc configure configure.in \
+        tar.texinfo tar.info* texinfo.tex \
+        tar.h port.h open3.h getopt.h regex.h \
+        rmt.h rmt.c rtapelib.c alloca.c \
+        msd_dir.h msd_dir.c tcexparg.c \
+        level-0 level-1 backup-specs testpad.c
+
+.PHONY: all
+all:    tar rmt tar.info
+
+tar:    $(OBJS)
+        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+rmt:    rmt.c
+        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
+
+tar.info: tar.texinfo
+        makeinfo tar.texinfo
+
+.PHONY: install
+install: all
+        $(INSTALL) tar $(bindir)/$(binprefix)tar
+        -test ! -f rmt || $(INSTALL) rmt /etc/rmt
+        $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
+
+$(OBJS): tar.h port.h testpad.h
+regex.o buffer.o tar.o: regex.h
+# getdate.y has 8 shift/reduce conflicts.
+
+testpad.h: testpad
+        ./testpad
+
+testpad: testpad.o
+        $(CC) -o $@ testpad.o
+
+TAGS:   $(SRCS)
+        etags $(SRCS)
+
+.PHONY: clean
+clean:
+        rm -f *.o tar rmt testpad testpad.h core
+
+.PHONY: distclean
+distclean: clean
+        rm -f TAGS Makefile config.status
+
+.PHONY: realclean
+realclean: distclean
+        rm -f tar.info*
+
+.PHONY: shar
+shar: $(SRCS) $(AUX)
+        shar $(SRCS) $(AUX) | compress \
+          > tar-`sed -e '/version_string/!d' \
+                     -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
+                     -e q
+                     version.c`.shar.Z
+
+.PHONY: dist
+dist: $(SRCS) $(AUX)
+        echo tar-`sed \
+             -e '/version_string/!d' \
+             -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
+             -e q
+             version.c` > .fname
+        -rm -rf `cat .fname`
+        mkdir `cat .fname`
+        ln $(SRCS) $(AUX) `cat .fname`
+        tar chZf `cat .fname`.tar.Z `cat .fname`
+        -rm -rf `cat .fname` .fname
+
+tar.zoo: $(SRCS) $(AUX)
+        -rm -rf tmp.dir
+        -mkdir tmp.dir
+        -rm tar.zoo
+        for X in $(SRCS) $(AUX) ; do \
+            echo $$X ; \
+            sed 's/$$/^M/' $$X \
+            > tmp.dir/$$X ; done
+        cd tmp.dir ; zoo aM ../tar.zoo *
+        -rm -rf tmp.dir
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-markdown.html b/docs/_style/prism-master/examples/prism-markdown.html new file mode 100644 index 0000000000..a57eaeafc3 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-markdown.html @@ -0,0 +1,86 @@ +

Titles

+
Title 1
+==
+
+Title 2
+-------
+
+# Title 1
+## Title 2
+### Title 3
+#### Title 4
+##### Title 5
+###### Title 6
+
+ +

Bold and italic

+
*Italic*
+**Bold on
+multiple lines**
+*Italic on
+multiple lines too*
+__It also works with underscores__
+_It also works with underscores_
+
+__An empty line
+
+is not allowed__
+
+ +

Links

+
[Prism](http://www.prismjs.com)
+[Prism](http://www.prismjs.com "Prism")
+
+[prism link]: http://www.prismjs.com (Prism)
+[Prism] [prism link]
+
+ +

Lists and quotes

+
* This is
+* an unordered list
+
+1. This is an
+2. ordered list
+
+* *List item in italic*
+* **List item in bold**
+* [List item as a link](http://example.com "This is an example")
+
+> This is a quotation
+>> With another quotation inside
+> _italic here_, __bold there__
+> And a [link](http://example.com)
+
+ +

Code

+
Inline code between backticks `<p>Paragraph</p>`
+
+    some_code(); /* Indented
+    with four spaces */
+
+	some_code(); /* Indented
+	with a tab */
+
+ +

Raw HTML

+
> This is a quotation
+> Containing <strong>raw HTML</strong>
+
+<p>*Italic text inside HTML tag*</p>
+ +

Known failures

+

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. +

+ +

Nesting of elements is not fully supported

+
_ **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) __
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-markup.html b/docs/_style/prism-master/examples/prism-markup.html new file mode 100644 index 0000000000..ac00e7f637 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-markup.html @@ -0,0 +1,77 @@ +

Empty tag

+
<p></p>
+ +

Tag that spans multiple lines

+
<p
+>hello!
+</p>
+ +

Name-attribute pair

+
<p></p>
+ +

Name-attribute pair without quotes

+
<p class=prism></p>
+ +

Attribute without value

+
<p data-foo></p>
+<p data-foo ></p>
+
+ +

Namespaces

+
<html:p foo:bar="baz" foo:weee></html:p>
+ +

XML prolog

+
<?xml version="1.0" encoding="utf-8"?>
+<svg></svg>
+ +

DOCTYPE

+
<!DOCTYPE html>
+<html></html>
+ +

CDATA section

+
<ns1:description><![CDATA[
+  CDATA is <not> magical.
+]]></ns1:description>
+ +

Comment

+
<!-- I'm a comment -->
+And i'm not
+ +

Entities

+
&amp; &#x2665; &#160; &#x152;
+ +

Embedded JS and CSS

+
<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="utf-8" />
+	<title>I can haz embedded CSS and JS</title>
+	<style>
+		@media print {
+			p { color: red !important; }
+		}
+	</style>
+</head>
+<body>
+	<h1>I can haz embedded CSS and JS</h1>
+	<script>
+	if (true) {
+		console.log('foo');
+	}
+	</script>
+
+</body>
+</html>
+ +

Invalid HTML

+
<l </ul>
+ +

Multi-line attribute values

+
<p title="foo
+bar
+baz">
+ +

XML tags with non-ASCII characters

+
<Läufer>foo</Läufer>
+<tag läufer="läufer">bar</tag>
+<läufer:tag>baz</läufer:tag>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-matlab.html b/docs/_style/prism-master/examples/prism-matlab.html new file mode 100644 index 0000000000..e78abe3612 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-matlab.html @@ -0,0 +1,52 @@ +

Strings

+
myString = 'Hello, world';
+otherString = 'You''re right';
+ +

Comments

+
% Single line comment
+%{ Multi-line
+comment }%
+ +

Numbers

+
x = 325.499
+realmax + .0001e+308
+e = 1 - 3*(4/3 - 1)
+b = 1e-16 + 1 - 1e-16;
+x = 2 + 3i;
+z =
+   4.7842 -1.0921i   0.8648 -1.5931i   1.2616 -2.2753i
+   2.6130 -0.0941i   4.8987 -2.3898i   4.3787 -3.7538i
+   4.4007 -7.1512i   1.3572 -5.2915i   3.6865 -0.5182i
+
+ +

Control flow

+
if rem(a, 2) == 0
+    disp('a is even')
+    b = a/2;
+end
+switch dayString
+   case 'Monday'
+      disp('Start of the work week')
+   case 'Tuesday'
+      disp('Day 2')
+   case 'Wednesday'
+      disp('Day 3')
+   case 'Thursday'
+      disp('Day 4')
+   case 'Friday'
+      disp('Last day of the work week')
+   otherwise
+      disp('Weekend!')
+end
+n = 1;
+nFactorial = 1;
+while nFactorial < 1e100
+    n = n + 1;
+    nFactorial = nFactorial * n;
+end
+ +

Functions

+
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);
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-mel.html b/docs/_style/prism-master/examples/prism-mel.html new file mode 100644 index 0000000000..e887975657 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-mel.html @@ -0,0 +1,137 @@ +

Comments

+
// This is a comment
+ +

Strings

+
"This is a string"
+"foo \"bar\" baz"
+ +

Numbers

+
42
+3.14159
+0xA2F
+ +

Variables

+
$x
+$floaty5000
+$longDescriptiveName
+$name_with_underscores
+$_line
+
+float $param;
+int $counter;
+string $name;
+vector $position;
+ +

Arrays, vectors and matrices

+
string $array[3] = {"first\n", "second\n", "third\n"};
+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>>;
+// 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>>
+
+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>>
+ +

Commands

+
pickWalk -d down;
+string $mySelection[] = `ls -selection`;
+
+setAttr ($mySelection[0]+".particleRenderType") 5;
+
+addAttr -is true -ln "spriteTwist" -at "float" -min -180 -max 180 -dv 0.0 blue_nParticleShape;
+ +

Full example

+
// From http://help.autodesk.com/view/MAYAUL/2015/ENU/?guid=Example_scripts_Dynamics_Time_Playback
+// Alias Script File
+// MODIFY THIS AT YOUR OWN RISK
+//
+// Creation Date: 8 May 1996
+// Author: rh
+//
+// Description:
+// Playback from frame 0 to frame <n> and return the
+// 		the playback rate in frames/sec. If a negative frame
+// count is given, this indicates silent mode. In silent
+// mode, no output is printed.
+//
+// This version is intended for use in batch tests of dynamics.
+// It requests particle and rigid body positions every frame.
+//
+// RETURN
+// Frame rate in frames/sec
+//
+global proc float dynTimePlayback( float $frames )
+{
+ int $silent;
+ // Get the list of particle shapes.
+ //
+ string $particleObjects[] = `ls -type particle`;
+ int $particleCount = size( $particleObjects );
+ // Get the list of transforms.
+ // This will include rigid bodies.
+ //
+ string $transforms[] = `ls -tr`;
+ int $trCount = size( $transforms );
+ 	// Check for negative $frames. This indicates
+ // $silent mode.
+ //
+ if ($frames < 0)
+ {
+ $silent = 1;
+ $frames = -$frames;
+ }
+ else
+ {
+ $silent = 0;
+ }
+ // Setup the playback options.
+ //
+ playbackOptions -min 1 -max $frames -loop "once";
+ currentTime -edit 0;
+ // Playback the animation using the timerX command
+ // to compute the $elapsed time.
+ //
+ float $startTime, $elapsed;
+ $startTime = `timerX`;
+// play -wait;
+ int $i;
+ for ($i = 1; $i < $frames; $i++ )
+ {
+ // Set time
+ //
+ currentTime -e $i;
+ int $obj;
+ // Request count for every particle object.
+ //
+ for ($obj = 0; $obj < $particleCount; $obj++)
+ {
+			string $cmd = "getAttr " + $particleObjects[$obj]+".count";
+ eval( $cmd );
+ }
+ // Request position for every transform
+		// (includes every rigid body).
+ //
+ for ($obj = 0; $obj < $trCount; $obj++)
+ {
+ string $cmd = "getAttr " + $transforms[$obj]+".translate";
+ eval ($cmd);
+ }
+ }
+ $elapsed = `timerX -st $startTime`;
+ // Compute the playback frame $rate. Print results.
+ //
+ float $rate = ($elapsed == 0 ? 0.0 : $frames / $elapsed) ;
+ if ( ! $silent)
+ {
+ print( "Playback time: " + $elapsed + " secs\n" );
+ print( "Playback $rate: " + $rate + " $frames/sec\n" );
+ }
+ return ( $rate );
+} // timePlayback //
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-mizar.html b/docs/_style/prism-master/examples/prism-mizar.html new file mode 100644 index 0000000000..98d626c02f --- /dev/null +++ b/docs/_style/prism-master/examples/prism-mizar.html @@ -0,0 +1,45 @@ +

Full example

+ +
:: Example from http://webdocs.cs.ualberta.ca/~piotr/Mizar/Dagstuhl97/
+environ
+vocabulary SCM;
+constructors ARYTHM, PRE_FF, NAT_1, REAL_1;
+notation ARYTHM, PRE_FF, NAT_1;
+requirements ARYTHM;
+theorems REAL_1, PRE_FF, NAT_1, AXIOMS, CQC_THE1;
+schemes NAT_1;
+begin
+
+P: for k being Nat
+	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;
+	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
+			1+1 ≤ k by NAT_1:38; then
+			consider m being Nat such that
+		A: k = 1+1+m by NAT_1:28;
+			thus Fib (k+1) ≥ k proof
+				per cases by NAT_1:19;
+				suppose S1: m = 0;
+					Fib (0+1+1+1) = Fib(0+1) + Fib(0+1+1) by PRE_FF:1
+					              = 1 + 1 by PRE_FF:1;
+					hence Fib (k+1) ≥ k by A, S1;
+				suppose m > 0; then
+					m+1 > 0+1 by REAL_1:59; then
+					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
+				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;
+		hence Fib(k+1) ≥ k by C, B, AXIOMS:22;
+	end;
+end;
+
+for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P);
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-monkey.html b/docs/_style/prism-master/examples/prism-monkey.html new file mode 100644 index 0000000000..6716a9a4ae --- /dev/null +++ b/docs/_style/prism-master/examples/prism-monkey.html @@ -0,0 +1,74 @@ +

Comments

+
' This is a comment
+
+#Rem            ' This is the start of a comment block
+Some comment    ' We are inside the comment block
+#End
+ +

Strings

+
"Hello World"
+"~qHello World~q"
+"~tIndented~n"
+ +

Numbers

+
0
+1234
+$3D0DEAD
+$CAFEBABE
+
+.0
+0.0
+.5
+0.5
+1.0
+1.5
+1.00001
+3.14159265
+ +

Variable types

+
Local myVariable:Bool = True
+Local myVariable? = True
+Local myVariable:Int = 1024
+Local myVariable% = 1024
+Local myVariable:Float = 3.141516
+Local myVariable# = 3.141516
+Local myVariable:String = "Hello world"
+Local myVariable$ = "Hello world"
+ +

Full example

+
Import mojo
+
+Class MyApp Extends App
+
+    Method OnCreate()
+
+        SetUpdateRate 60
+
+    End
+
+    Method OnRender()
+
+        Local date:=GetDate()
+
+        Local months:=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
+
+        Local day:=("0"+date[2])[-2..]
+        Local month:=months[date[1]-1]
+        Local year:=date[0]
+        Local hour:=("0"+date[3])[-2..]
+        Local min:=("0"+date[4])[-2..]
+        Local sec:=("0"+date[5])[-2..] + "." + ("00"+date[6])[-3..]
+
+        Local now:=hour+":"+min+":"+sec+"  "+day+" "+month+" "+year
+
+        Cls
+        DrawText now,DeviceWidth/2,DeviceHeight/2,.5,.5
+    End
+
+End
+
+Function Main()
+
+    New MyApp
+
+End
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-n4js.html b/docs/_style/prism-master/examples/prism-n4js.html new file mode 100644 index 0000000000..19e5a6d5de --- /dev/null +++ b/docs/_style/prism-master/examples/prism-n4js.html @@ -0,0 +1,114 @@ +

Keywords

+

+class C {..}
+interface I {..}
+
+foo(c: C, i: I) {
+    c instanceof C; // ok
+    c instanceof I; // ok
+}
+
+ +

Annotations

+

+// Final Methods
+@Final
+private tasks = new Map<string,Task>();
+
+// Redefinition of Members
+@Override
+public async size(): int {
+  …
+}
+
+// Dependency Injection
+@Binder
+@Bind(Storage,StorageInMemory)
+class InMemoryBinder {}
+
+@GenerateInjector @UseBinder(InMemoryBinder)
+export public class TaskManagerTest {
+  …
+}
+
+ +

Full example

+

+// A Web User Interface in HTML
+// NOTE: requires full example project bundled with N4JS IDE to run.
+
+import { TaskManager } from "TaskManager";
+import {Application, Response } from "express";
+import express from "express";
+import { Todo } from "model";
+
+
+export class WebUI {
+
+     private app: Application;
+
+     @Inject
+     private manager: TaskManager;
+
+     public start() {
+
+          this.app = express();
+
+          this.app.get('/', async (req, res) => {
+               let page = await this.renderHomePage();
+               res.send(page);
+          });
+
+          this.app.get("/clear", async (req, res) => {
+               await this.manager.clear();
+               redirect(res, '/');
+          });
+
+          this.app.get("/create", async (req, res) => {
+               let values = req.query as ~Object with {type: string, label: string};
+               if (values && values.type === 'Todo' && values.label && values.label.length > 0) {
+                    await this.manager.createTodo(values.label);
+               }
+               redirect(res, '/');
+          });
+
+          this.app.listen(4000, '0.0.0.0', 511, function() {
+               console.log("HTML server listening on http://localhost:4000/");
+          });
+     }
+
+     protected async renderHomePage(): string {
+          let tasks = await this.manager.getTasks();
+          let todos = tasks.filter((task) => task instanceof Todo);
+          return `
+
+<html>
+<body>
+     Your to-do's:
+     <ul>
+     ${
+          todos.length === 0 ? '<li><em>none</em></li>\n'
+          : todos.map((task) =>
+               '<li>' + task.label + ' <small>(id: ' + task.id + ')</small></li>'
+          ).join('\n')
+     }
+     </ul>
+     <hr/>
+     <form action="/create" method="get">
+     <input type="hidden" name="type" value="Todo">
+     Label: <input type="text" name="label"><br>
+     <input type="submit" value="Create Todo">
+     </form>
+     <hr/>
+     <a href="/clear">[Clear All]</a>
+</body>
+</html>
+`;
+     }
+}
+
+function redirect(res: Response, url: string) {
+     res.header('Cache-Control', 'no-cache');
+     res.redirect(301, url);
+}
+
diff --git a/docs/_style/prism-master/examples/prism-nasm.html b/docs/_style/prism-master/examples/prism-nasm.html new file mode 100644 index 0000000000..c1b7c926e3 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-nasm.html @@ -0,0 +1,74 @@ +

Comments

+
; This is a comment
+ +

Labels

+
label1:     ; a non-local label
+.local:     ; this is really label1.local
+..@foo:     ; this is a special symbol
+label2:     ; another non-local label
+.local:     ; this is really label2.local
+
+ +

Registers

+
st0
+st1
+ax
+rax
+zmm4
+ +

Strings

+

+mov eax,'abcd'
+
+db    'hello'               ; string constant
+db    'h','e','l','l','o'   ; equivalent character constants
+dd    'ninechars'           ; doubleword string constant
+dd    'nine','char','s'     ; becomes three doublewords
+db    'ninechars',0,0,0     ; and really looks like this
+
+db `\u263a`            ; UTF-8 smiley face
+db `\xe2\x98\xba`      ; UTF-8 smiley face
+db 0E2h, 098h, 0BAh    ; UTF-8 smiley face
+
+ +

Numbers

+
mov     ax,200          ; decimal
+mov     ax,0200         ; still decimal
+mov     ax,0200d        ; explicitly decimal
+mov     ax,0d200        ; also decimal
+mov     ax,0c8h         ; hex
+mov     ax,$0c8         ; hex again: the 0 is required
+mov     ax,0xc8         ; hex yet again
+mov     ax,0hc8         ; still hex
+mov     ax,310q         ; octal
+mov     ax,310o         ; octal again
+mov     ax,0o310        ; octal yet again
+mov     ax,0q310        ; octal yet again
+mov     ax,11001000b    ; binary
+
+db    -0.2                    ; "Quarter precision"
+dw    -0.5                    ; IEEE 754r/SSE5 half precision
+dd    1.2                     ; an easy one
+dd    0x1p+2                  ; 1.0x2^2 = 4.0
+dq    0x1p+32                 ; 1.0x2^32 = 4 294 967 296.0
+dq    1.e10                   ; 10 000 000 000.0
+dq    1.e+10                  ; synonymous with 1.e10
+dq    1.e-10                  ; 0.000 000 000 1
+dt    3.141592653589793238462 ; pi
+do    1.e+4000                ; IEEE 754r quad precision
+
+ +

Known failures

+

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. +

+ +

Numbers with underscores

+
mov     ax,1100_1000b
+mov     ax,1100_1000y
+mov     ax,0b1100_1000
+mov     ax,0y1100_1000
+
+dd    1.222_222_222
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-nginx.html b/docs/_style/prism-master/examples/prism-nginx.html new file mode 100644 index 0000000000..49d14664d3 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-nginx.html @@ -0,0 +1,25 @@ +

Comments

+
# This is a comment
+ +

Variables

+
fastcgi_param SERVER_NAME $server_name;
+ +

Server Block

+

+server { # simple reverse-proxy
+  listen       80;
+  server_name  domain2.com www.domain2.com;
+  access_log   logs/domain2.access.log  main;
+  
+  # serve static files
+  
+  location ~ ^/(images|javascript|js|css|flash|media|static)/  {
+    root    /var/www/virtual/big.server.com/htdocs;
+    expires 30d;
+  }
+
+  # pass requests for dynamic content to rails/turbogears/zope, et al
+  location / {
+    proxy_pass      http://127.0.0.1:8080;
+  }
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-nim.html b/docs/_style/prism-master/examples/prism-nim.html new file mode 100644 index 0000000000..c661125918 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-nim.html @@ -0,0 +1,222 @@ +

Comments

+
# This is a comment
+ +

Strings

+
"This is a string."
+"This is a string with \"quotes\" in it."
+"""This is
+a "multi-line"
+string."""
+""""A long string within quotes.""""
+R"This is a raw string."
+r"Some ""quotes"" inside a raw string."
+r"""Raw strings
+can also be multi-line."""
+foo"This is a generalized raw string literal."
+bar"""This is also
+a generalized raw string literal."""
+ +

Characters

+
'a'
+'\''
+'\t'
+'\15'
+'\xFC'
+ +

Numbers

+
42
+0xaf
+0xf_2_c
+0o07
+0b1111_0000
+0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64
+9_000'u
+32.
+32.1f32
+32.e-5
+32.2e+2
+2'i16
+2i16
+0xfe'f32
+ +

Full example

+
# Example from http://nim-by-example.github.io/oop_macro/
+import macros
+
+macro class*(head: expr, body: stmt): stmt {.immediate.} =
+  # The macro is immediate so that it doesn't
+  # resolve identifiers passed to it
+
+  var typeName, baseName: NimNode
+
+  if head.kind == nnkIdent:
+    # `head` is expression `typeName`
+    # echo head.treeRepr
+    # --------------------
+    # Ident !"Animal"
+    typeName = head
+
+  elif head.kind == nnkInfix and $head[0] == "of":
+    # `head` is expression `typeName of baseClass`
+    # echo head.treeRepr
+    # --------------------
+    # Infix
+    #   Ident !"of"
+    #   Ident !"Animal"
+    #   Ident !"RootObj"
+    typeName = head[1]
+    baseName = head[2]
+
+  else:
+    quit "Invalid node: " & head.lispRepr
+
+  # echo treeRepr(body)
+  # --------------------
+  # StmtList
+  #   VarSection
+  #     IdentDefs
+  #       Ident !"name"
+  #       Ident !"string"
+  #       Empty
+  #     IdentDefs
+  #       Ident !"age"
+  #       Ident !"int"
+  #       Empty
+  #   MethodDef
+  #     Ident !"vocalize"
+  #     Empty
+  #     Empty
+  #     FormalParams
+  #       Ident !"string"
+  #     Empty
+  #     Empty
+  #     StmtList
+  #       StrLit ...
+  #   MethodDef
+  #     Ident !"age_human_yrs"
+  #     Empty
+  #     Empty
+  #     FormalParams
+  #       Ident !"int"
+  #     Empty
+  #     Empty
+  #     StmtList
+  #       DotExpr
+  #         Ident !"this"
+  #         Ident !"age"
+
+  # create a new stmtList for the result
+  result = newStmtList()
+
+  # var declarations will be turned into object fields
+  var recList = newNimNode(nnkRecList)
+
+  # Iterate over the statements, adding `this: T`
+  # to the parameters of functions
+  for node in body.children:
+    case node.kind:
+
+      of nnkMethodDef, nnkProcDef:
+        # inject `this: T` into the arguments
+        let p = copyNimTree(node.params)
+        p.insert(1, newIdentDefs(ident"this", typeName))
+        node.params = p
+        result.add(node)
+
+      of nnkVarSection:
+        # variables get turned into fields of the type.
+        for n in node.children:
+          recList.add(n)
+
+      else:
+        result.add(node)
+
+  # The following prints out the AST structure:
+  #
+  # import macros
+  # dumptree:
+  #   type X = ref object of Y
+  #     z: int
+  # --------------------
+  # TypeSection
+  #   TypeDef
+  #     Ident !"X"
+  #     Empty
+  #     RefTy
+  #       ObjectTy
+  #         Empty
+  #         OfInherit
+  #           Ident !"Y"
+  #         RecList
+  #           IdentDefs
+  #             Ident !"z"
+  #             Ident !"int"
+  #             Empty
+
+  result.insert(0,
+    if baseName == nil:
+      quote do:
+        type `typeName` = ref object of RootObj
+    else:
+      quote do:
+        type `typeName` = ref object of `baseName`
+  )
+  # Inspect the tree structure:
+  #
+  # echo result.treeRepr
+  # --------------------
+  # StmtList
+  #   StmtList
+  #     TypeSection
+  #       TypeDef
+  #         Ident !"Animal"
+  #         Empty
+  #         RefTy
+  #           ObjectTy
+  #             Empty
+  #             OfInherit
+  #               Ident !"RootObj"
+  #             Empty   <= We want to replace this
+  #   MethodDef
+  #   ...
+
+  result[0][0][0][2][0][2] = recList
+
+  # Lets inspect the human-readable version of the output
+  # echo repr(result)
+  # Output:
+  #  type
+  #    Animal = ref object of RootObj
+  #      name: string
+  #      age: int
+  #
+  #  method vocalize(this: Animal): string =
+  #    "..."
+  #
+  #  method age_human_yrs(this: Animal): int =
+  #    this.age
+
+# ---
+
+class Animal of RootObj:
+  var name: string
+  var age: int
+  method vocalize: string = "..."
+  method age_human_yrs: int = this.age # `this` is injected
+
+class Dog of Animal:
+  method vocalize: string = "woof"
+  method age_human_yrs: int = this.age * 7
+
+class Cat of Animal:
+  method vocalize: string = "meow"
+
+# ---
+
+var animals: seq[Animal] = @[]
+animals.add(Dog(name: "Sparky", age: 10))
+animals.add(Cat(name: "Mitten", age: 10))
+
+for a in animals:
+  echo a.vocalize()
+  echo a.age_human_yrs()
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-nix.html b/docs/_style/prism-master/examples/prism-nix.html new file mode 100644 index 0000000000..9015776948 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-nix.html @@ -0,0 +1,46 @@ +

Comments

+
#
+# Single line comment
+/* Multi-line
+comment */
+ +

String

+
""
+"foo\"bar"
+"foo
+bar"
+
+''''
+''foo'''bar''
+''
+foo
+bar
+''
+ +

String interpolation

+
"foo${42}bar"
+"foo\${42}bar" # This is not interpolated
+''foo${42}bar''
+''foo''${42}bar'' # This is not interpolated
+ +

URLs and paths

+
ftp://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz
+http://example.org/foo.tar.bz2
+/bin/sh
+./builder.sh
+~/foo.bar
+ +

Integers, booleans and null

+
0
+42
+
+true
+false
+
+null
+ +

Builtin functions

+
name = baseNameOf (toString url);
+imap =
+	if builtins ? genList then
+		f: list: genList (n: f (n + 1) (elemAt list n)) (length list)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-nsis.html b/docs/_style/prism-master/examples/prism-nsis.html new file mode 100644 index 0000000000..193791bbf9 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-nsis.html @@ -0,0 +1,18 @@ +

Comments

+
; Single line comment
+# Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+ +

Variables

+
LicenseLangString myLicenseData ${LANG_ENGLISH} "bigtest.nsi"
+LicenseData $(myLicenseData)
+StrCmp $LANGUAGE ${LANG_ENGLISH} 0 +2
+ +

Compiler commands

+
!define VERSION "1.0.3"
+!insertmacro MyFunc ""
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-objectivec.html b/docs/_style/prism-master/examples/prism-objectivec.html new file mode 100644 index 0000000000..025a8d71e3 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-objectivec.html @@ -0,0 +1,44 @@ +

Full example

+
#import <UIKit/UIKit.h>
+#import "Dependency.h"
+
+@protocol WorldDataSource
+@optional
+- (NSString*)worldName;
+@required
+- (BOOL)allowsToLive;
+@end
+
+@interface Test : NSObject <HelloDelegate, WorldDataSource> {
+  NSString *_greeting;
+}
+
+@property (nonatomic, readonly) NSString *greeting;
+- (IBAction) show;
+@end
+
+@implementation Test
+
+@synthesize test=_test;
+
++ (id) test {
+  return [self testWithGreeting:@"Hello, world!\nFoo bar!"];
+}
+
++ (id) testWithGreeting:(NSString*)greeting {
+  return [[[self alloc] initWithGreeting:greeting] autorelease];
+}
+
+- (id) initWithGreeting:(NSString*)greeting {
+  if ( (self = [super init]) ) {
+    _greeting = [greeting retain];
+  }
+  return self;
+}
+
+- (void) dealloc {
+  [_greeting release];
+  [super dealloc];
+}
+
+@end
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-ocaml.html b/docs/_style/prism-master/examples/prism-ocaml.html new file mode 100644 index 0000000000..0534b1d165 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-ocaml.html @@ -0,0 +1,59 @@ +

Comments

+
(* Simple comment *)
+(* Multi-line
+comment *)
+ +

Numbers

+
42
+3.14159
+42.
+2.4E+2
+10_452_102
+0xf4 0xff_10_41
+0o427
+0b1100_1111_0000
+ +

Strings and characters

+
"Simple string."
+"String with \"quotes\" in it."
+'c' `c`
+'\'' `\``
+'\123' `\123`
+'\xf4'
+ +

Full example

+
module Make_interval(Endpoint : Comparable) = struct
+
+    type t = | Interval of Endpoint.t * Endpoint.t
+             | Empty
+
+    (** [create low high] creates a new interval from [low] to
+        [high].  If [low > high], then the interval is empty *)
+    let create low high =
+      if Endpoint.compare low high > 0 then Empty
+      else Interval (low,high)
+
+    (** Returns true iff the interval is empty *)
+    let is_empty = function
+      | Empty -> true
+      | Interval _ -> false
+
+    (** [contains t x] returns true iff [x] is contained in the
+        interval [t] *)
+    let contains t x =
+      match t with
+      | Empty -> false
+      | Interval (l,h) ->
+        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 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 ;;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-opencl.html b/docs/_style/prism-master/examples/prism-opencl.html new file mode 100644 index 0000000000..f901230bba --- /dev/null +++ b/docs/_style/prism-master/examples/prism-opencl.html @@ -0,0 +1,83 @@ +

+ To use this language, use the class "language-opencl" for OpenCL kernel code. + Host code is automatically highlighted in "language-c" + respectively "language-cpp" classes. +

+ +

OpenCL host code

+
// OpenCL functions, constants, etc. are also highlighted in OpenCL host code in the c or cpp language
+cl::Event KernelFilterImages::runSingle(const cl::Image2D& imgSrc, SPImage2D& imgDst)
+{
+	const size_t rows = imgSrc.getImageInfo();
+	const size_t cols = imgSrc.getImageInfo();
+
+	ASSERT(rows > 0 && cols > 0, "The image object seems to be invalid, no rows/cols set");
+	ASSERT(imgSrc.getImageInfo().image_channel_data_type == CL_FLOAT, "Only float type images are supported");
+	ASSERT(imgSrc.getInfo() == CL_MEM_READ_ONLY || imgSrc.getInfo() == CL_MEM_READ_WRITE, "Can't read the input image");
+
+	imgDst = std::make_shared(*context, CL_MEM_READ_WRITE, cl::ImageFormat(CL_R, CL_FLOAT), cols, rows);
+
+	cl::Kernel kernel(*program, "filter_single");
+	kernel.setArg(0, imgSrc);
+	kernel.setArg(1, *imgDst);
+	kernel.setArg(2, bufferKernel1);
+	kernel.setArg(3, kernel1.rows);
+	kernel.setArg(4, kernel1.rows / 2);
+	kernel.setArg(5, kernel1.cols);
+	kernel.setArg(6, kernel1.cols / 2);
+	kernel.setArg(7, border);
+
+	cl::Event eventFilter;
+	const cl::NDRange global(cols, rows);
+	queue->enqueueNDRangeKernel(kernel, cl::NullRange, global, cl::NullRange, &events, &eventFilter);
+}
+ +

OpenCL kernel code

+
// CLK_ADDRESS_CLAMP_TO_EDGE = aaa|abcd|ddd
+constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;
+typedef float type_single;
+
+type_single filter_sum_single_3x3(read_only image2d_t imgIn,
+                                  constant float* filterKernel,
+                                  const int2 coordBase,
+                                  const int border)
+{
+    type_single sum = (type_single)(0.0f);
+    const int rows = get_image_height(imgIn);
+    const int cols = get_image_width(imgIn);
+    int2 coordCurrent;
+    int2 coordBorder;
+    float color;
+
+    // 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
+    {
+        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
+        {
+            coordCurrent.x = coordBase.x + x;
+            coordBorder = borderCoordinate(coordCurrent, rows, cols, border);
+            color = read_imagef(imgIn, sampler, coordBorder).x;
+
+            const int idx = (y + ROWS_HALF_3x3) * COLS_3x3 + x + COLS_HALF_3x3;
+            sum += color * filterKernel[idx];
+        }
+    }
+
+    return sum;
+}
+
+kernel void filter_single_3x3(read_only image2d_t imgIn,
+                              write_only image2d_t imgOut,
+                              constant float* filterKernel,
+                              const int border)
+{
+    int2 coordBase = (int2)(get_global_id(0), get_global_id(1));
+
+    type_single sum = filter_sum_single_3x3(imgIn, filterKernel, coordBase, border);
+
+    write_imagef(imgOut, coordBase, sum);
+}
diff --git a/docs/_style/prism-master/examples/prism-oz.html b/docs/_style/prism-master/examples/prism-oz.html new file mode 100644 index 0000000000..d70ec2edaa --- /dev/null +++ b/docs/_style/prism-master/examples/prism-oz.html @@ -0,0 +1,89 @@ +

Comments

+
%
+% Foobar
+
+/* Foo
+bar */
+ +

Strings

+
""
+"Foo \"bar\" baz"
+ +

Numbers

+
0
+42
+0154
+0xBadFace
+0B0101
+3.14159
+2e8
+3.E~7
+4.8E12
+&0
+&a
+&\n
+&\124
+ +

Functions and procedures

+
proc {Max X Y Z}
+{Browse Z}
+f(M Y)
+ +

Full example

+
proc {DisMember X Ys}
+   dis Ys = X|_ [] Yr in Ys = _|Yr {DisMember X Yr} end
+end
+
+class DataBase from BaseObject
+   attr d
+   meth init
+      d := {NewDictionary}
+   end
+   meth dic($) @d end
+   meth tell(I)
+      case {IsFree I.1} then
+         raise database(nonground(I)) end
+      else
+         Is = {Dictionary.condGet @d I.1 nil} in
+         {Dictionary.put @d I.1 {Append Is [I]}}
+      end
+   end
+   meth ask(I)
+      case {IsFree I} orelse {IsFree I.1} then
+         {DisMember I {Flatten {Dictionary.items @d}}}
+      else
+         {DisMember I {Dictionary.condGet @d I.1 nil}}
+      end
+   end
+   meth entries($)
+      {Dictionary.entries @d}
+   end
+end
+
+declare
+proc {Dynamic ?Pred}
+   Pred = {New DataBase init}
+end
+proc {Assert P I}
+   {P tell(I)}
+end
+proc {Query P I}
+   {P ask(I)}
+end
+
+EdgeP = {Dynamic}
+{ForAll
+[edge(1 2)
+ edge(2 1)   % Cycle
+ edge(2 3)
+ edge(3 4)
+ edge(2 5)
+ edge(5 6)
+ edge(4 6)
+ edge(6 7)
+ edge(6 8)
+ edge(1 5)
+ edge(5 1)  % Cycle
+]
+proc {$ I} {Assert EdgeP I} end
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-parigp.html b/docs/_style/prism-master/examples/prism-parigp.html new file mode 100644 index 0000000000..029302bc31 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-parigp.html @@ -0,0 +1,20 @@ +

Comments

+
\\ Single line comment
+/* Multi line
+comment */
+ +

Strings

+
""
+"Foo \"bar\" baz"
+ +

Numbers

+
0.
+42
+3 . 14 15 9
+5.2 E +12
+.89
+ +

Ignored whitespaces

+
p r i n t ("hello")
+if err(1/i, E, print (E))
+a + = b \ / c
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-parser.html b/docs/_style/prism-master/examples/prism-parser.html new file mode 100644 index 0000000000..4b4e9c0d81 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-parser.html @@ -0,0 +1,88 @@ +

Comments

+
$foo[bar] # Some comment
+ +

Variables and functions

+
@navigation[]
+$sections[^table::load[sections.cfg]]
+$sections.uri
+ +

Literals

+
$foo(3+$bar)
+^switch[$sMode]{
+	^case[def]{$result(true)}
+}
+^if(in "/news/"){}
+ +

Escape sequences

+
^^
+^"
+^;
+ +

Embedded in markup

+
<nav>
+	<ul>
+	^sections.menu{
+		<li>
+			<a href="$sections.uri">$sections.name</a>
+		</li>
+	}
+	</ul>
+</nav>
+ +

Full example

+
@CLASS
+MyTable
+
+@create[uParam]
+^switch[$uParam.CLASS_NAME]{
+   ^case[string;void]{$t[^table::create{$uParam}]}
+   ^case[table;MyTable]{$t[^table::create[$uParam]]}
+   ^case[DEFAULT]{^throw[MyTable;Unsupported type $uParam.CLASS_NAME]}
+}
+
+# method will return value in different calling contexts
+@GET[sMode]
+^switch[$sMode]{
+   ^case[table]{$result[$t]}
+   ^case[bool]{$result($t!=0)}
+   ^case[def]{$result(true)}
+   ^case[expression;double]{$result($t)}
+   ^case[DEFAULT]{^throw[MyTable;Unsupported mode '$sMode']}
+}
+
+
+# method will handle access to the "columns"
+@GET_DEFAULT[sName]
+$result[$t.$sName]
+
+
+# wrappers for all existing methods are required
+@count[]
+^t.count[]
+
+@menu[jCode;sSeparator]
+^t.menu{$jCode}[$sSeparator]
+
+
+# new functionality
+@remove[iOffset;iLimit]
+$iLimit(^iLimit.int(0))
+$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)]
+ +

Known failures

+

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. +

+ +

Code block starting with a comment

+
# Doesn't work
+# Does work
+
 # Does work when prefixed with a space
+ +

Comments inside expressions break literals and operators

+
^if(
+    $age>=4  # not too young
+    && $age<=80  # and not too old
+)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-pascal.html b/docs/_style/prism-master/examples/prism-pascal.html new file mode 100644 index 0000000000..dfea11a61d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-pascal.html @@ -0,0 +1,65 @@ +

Comments

+
(* This is an
+old style comment *)
+{ This is a
+Turbo Pascal comment }
+// This is a Delphi comment.
+ +

Strings and characters

+
'This is a pascal string'
+''
+'a'
+^G
+#7
+#$f4
+'A tabulator character: '#9' is easy to embed'
+ +

Numbers

+
123
+123.456
+132.456e-789
+132.456e+789
+$7aff
+&17
+%11110101
+ +

Full example

+
Type
+    Str25    = String[25];
+    TBookRec = Record
+                Title, Author,
+                ISBN  : Str25;
+                Price : Real;
+               End;
+
+Procedure EnterNewBook(var newBook : TBookRec);
+Begin
+ Writeln('Please enter the book details: ');
+ Write('Book Name: ');
+ Readln(newBook.Title);
+ Write('Author: ');
+ Readln(newBook.Author);
+ Write('ISBN: ');
+ Readln(newBook.ISBN);
+ Write('Price: ');
+ Readln(newBook.Price);
+End;
+
+Var
+    bookRecArray : Array[1..10] of TBookRec;
+    i            : 1..10;
+
+Begin
+ For i := 1 to 10 do
+  EnterNewBook(bookRecArray[i]);
+ Writeln('Thanks for entering the book details');
+ Write('Now choose a record to display from 1 to 10: ');
+ Readln(i);
+ Writeln('Here are the book details of record #',i,':');
+ Writeln;
+ Writeln('Title:  ', bookRecArray[i].Title);
+ Writeln('Author: ', bookRecArray[i].Author);
+ Writeln('ISBN:   ', bookRecArray[i].ISBN);
+ Writeln('Price:  ', bookRecArray[i].Price);
+ Readln;
+End.
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-perl.html b/docs/_style/prism-master/examples/prism-perl.html new file mode 100644 index 0000000000..85c3681521 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-perl.html @@ -0,0 +1,71 @@ +

Comments

+
# Single line comment
+=head1 Here There
+	Be Pods!
+=cut
+ +

Strings

+
q/foo bar baz/;
+q awhy not ?a;
+qw(foo bar baz) q{foo bar baz}
+q[foo bar baz] qq<foo bar baz>
+"foo bar baz" 'foo bar baz' `foo bar baz`
+ +

Regex

+
m/foo/ s/foo/bar/
+m zfooz s zfoozbarz
+qr(foo) m{foo} s(foo)(bar) s{foo}{bar}
+m[foo] m<foo> tr[foo][bar] s<foo><bar>
+/foo/i
+
+ +

Variables

+
${^POSTMATCH}
+$^V
+$element_count = scalar(@whatever);
+keys(%users) = 1000;
+$1, $_, %!;
+ +

Numbers

+
12345
+12345.67
+.23E-10 # a very small number
+3.14_15_92 # a very important number
+4_294_967_296 # underscore for legibility
+0xff # hex
+0xdead_beef # more hex
+0377 # octal (only numbers, begins with 0)
+0b011011 # binary
+ +

Full example

+
sub read_config_file {
+  my ($class, $filename) = @_;
+
+  unless (defined $filename) {
+    my $home  = File::HomeDir->my_home || '.';
+    $filename = File::Spec->catfile($home, '.pause');
+
+    return {} unless -e $filename and -r _;
+  }
+
+  my %conf;
+  if ( eval { require Config::Identity } ) {
+    %conf = Config::Identity->load($filename);
+    $conf{user} = delete $conf{username} unless $conf{user};
+  }
+  else { # Process .pause manually
+    open my $pauserc, '<', $filename
+      or die "can't open $filename for reading: $!";
+
+    while (<$pauserc>) {
+      chomp;
+      next unless $_ and $_ !~ /^\s*#/;
+
+      my ($k, $v) = /^\s*(\w+)\s+(.+)$/;
+      Carp::croak "multiple enties for $k" if $conf{$k};
+      $conf{$k} = $v;
+    }
+  }
+
+  return \%conf;
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-php.html b/docs/_style/prism-master/examples/prism-php.html new file mode 100644 index 0000000000..1a25589c7c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-php.html @@ -0,0 +1,67 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+# Shell-like comment
+ +

Strings

+
'foo \'bar\' baz'
+"foo \"bar\" baz"
+"a string # containing an hash"
+$foo = <<<FOO
+    Heredoc strings are supported too!
+FOO;
+$bar = <<<'BAR'
+    And also Nowdoc strings
+BAR;
+ +

Variables

+
$some_var = 5;
+$otherVar = "Some text";
+$null = null;
+$false = false;
+ +

Functions

+
$json = json_encode($my_object);
+$array1 = array("a" => "green", "red", "blue", "red");
+$array2 = array("b" => "green", "yellow", "red");
+$result = array_diff($array1, $array2);
+ +

Constants

+
define('MAXSIZE', 42);
+echo MAXSIZE;
+json_decode($json, false, 512, JSON_BIGINT_AS_STRING)
+ +

PHP 5.3+ support

+
namespace my\name;
+$c = new \my\name\MyClass;
+$arr = [1,2,3];
+trait ezcReflectionReturnInfo {
+    function getReturnType() { /*1*/ }
+    function getReturnDescription() { /*2*/ }
+}
+function gen_one_to_three() {
+    for ($i = 1; $i <= 3; $i++) {
+        // Note that $i is preserved between yields.
+        yield $i;
+    }
+}
+ +

PHP embedded in HTML

+
<div class="<?php echo $a ? 'foo' : 'bar'; ?>">
+<?php if($var < 42) {
+    echo "Something";
+} else {
+    echo "Something else";
+} ?>
+</div>
+ +

String interpolation

+
$str = "This is $great!";
+$foobar = "Another example: {${$foo->bar()}}";
+$a = <<<FOO
+    Hello $world!
+FOO;
+$b = <<<"FOOBAR"
+    Interpolation inside Heredoc strings {$obj->values[3]->name}
+FOOBAR;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-plsql.html b/docs/_style/prism-master/examples/prism-plsql.html new file mode 100644 index 0000000000..2212b14eb6 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-plsql.html @@ -0,0 +1,40 @@ +

Comments

+
-- Single line comment
+/* Multi-line
+comment */
+ +

Operators

+
l_message  := 'Hello ' || place_in;
+ +

Keywords

+
CREATE OR REPLACE PROCEDURE
+hello_place (place_in IN VARCHAR2)
+IS
+  l_message  VARCHAR2 (100);
+BEGIN
+  l_message  := 'Hello ' || place_in;
+  DBMS_OUTPUT.put_line (l_message);
+END hello_place;
+
+DECLARE
+  l_dept_id
+  employees.department_id%TYPE := 10;
+BEGIN
+  DELETE FROM employees
+       WHERE department_id = l_dept_id;
+
+  DBMS_OUTPUT.put_line (SQL%ROWCOUNT);
+END;
+
+DECLARE
+  l_message   VARCHAR2 (100) := 'Hello';
+  l_message2  VARCHAR2 (100) := ' World!';
+BEGIN
+  IF SYSDATE >= TO_DATE ('01-JAN-2011')
+  THEN
+    l_message2 := l_message || l_message2;
+    DBMS_OUTPUT.put_line (l_message2);
+  ELSE
+    DBMS_OUTPUT.put_line (l_message);
+  END IF;
+END;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-powershell.html b/docs/_style/prism-master/examples/prism-powershell.html new file mode 100644 index 0000000000..e5dba2e025 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-powershell.html @@ -0,0 +1,19 @@ +

Comments

+
# This is a comment
+<# This is a
+multi-line comment #>
+ +

Variable Interpolation

+
$Name = "Alice"
+Write-Host "Hello, my name is $Name."
+ +

Full Example

+
Function SayHello([string]$name) {
+    Write-Host "Hello, $name."
+}
+$Names = @("Bob", "Alice")
+
+$Names | ForEach {
+    SayHello $_
+}
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-processing.html b/docs/_style/prism-master/examples/prism-processing.html new file mode 100644 index 0000000000..3c74ba3b98 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-processing.html @@ -0,0 +1,173 @@ +

Full example

+
// Processing implementation of Game of Life by Joan Soler-Adillon
+// from https://processing.org/examples/gameoflife.html
+
+// Size of cells
+int cellSize = 5;
+
+// How likely for a cell to be alive at start (in percentage)
+float probabilityOfAliveAtStart = 15;
+
+// Variables for timer
+int interval = 100;
+int lastRecordedTime = 0;
+
+// Colors for active/inactive cells
+color alive = color(0, 200, 0);
+color dead = color(0);
+
+// Array of cells
+int[][] cells; 
+// Buffer to record the state of the cells and use this while changing the others in the interations
+int[][] cellsBuffer; 
+
+// Pause
+boolean pause = false;
+
+void setup() {
+  size (640, 360);
+
+  // Instantiate arrays 
+  cells = new int[width/cellSize][height/cellSize];
+  cellsBuffer = new int[width/cellSize][height/cellSize];
+
+  // This stroke will draw the background grid
+  stroke(48);
+
+  noSmooth();
+
+  // Initialization of cells
+  for (int x=0; x<width/cellSize; x++) {
+    for (int y=0; y<height/cellSize; y++) {
+      float state = random (100);
+      if (state > probabilityOfAliveAtStart) { 
+        state = 0;
+      }
+      else {
+        state = 1;
+      }
+      cells[x][y] = int(state); // Save state of each cell
+    }
+  }
+  background(0); // Fill in black in case cells don't cover all the windows
+}
+
+
+void draw() {
+
+  //Draw grid
+  for (int x=0; x<width/cellSize; x++) {
+    for (int y=0; y<height/cellSize; y++) {
+      if (cells[x][y]==1) {
+        fill(alive); // If alive
+      }
+      else {
+        fill(dead); // If dead
+      }
+      rect (x*cellSize, y*cellSize, cellSize, cellSize);
+    }
+  }
+  // Iterate if timer ticks
+  if (millis()-lastRecordedTime>interval) {
+    if (!pause) {
+      iteration();
+      lastRecordedTime = millis();
+    }
+  }
+
+  // Create  new cells manually on pause
+  if (pause && mousePressed) {
+    // Map and avoid out of bound errors
+    int xCellOver = int(map(mouseX, 0, width, 0, width/cellSize));
+    xCellOver = constrain(xCellOver, 0, width/cellSize-1);
+    int yCellOver = int(map(mouseY, 0, height, 0, height/cellSize));
+    yCellOver = constrain(yCellOver, 0, height/cellSize-1);
+
+    // Check against cells in buffer
+    if (cellsBuffer[xCellOver][yCellOver]==1) { // Cell is alive
+      cells[xCellOver][yCellOver]=0; // Kill
+      fill(dead); // Fill with kill color
+    }
+    else { // Cell is dead
+      cells[xCellOver][yCellOver]=1; // Make alive
+      fill(alive); // Fill alive color
+    }
+  } 
+  else if (pause && !mousePressed) { // And then save to buffer once mouse goes up
+    // Save cells to buffer (so we opeate with one array keeping the other intact)
+    for (int x=0; x<width/cellSize; x++) {
+      for (int y=0; y<height/cellSize; y++) {
+        cellsBuffer[x][y] = cells[x][y];
+      }
+    }
+  }
+}
+
+
+
+void iteration() { // When the clock ticks
+  // Save cells to buffer (so we opeate with one array keeping the other intact)
+  for (int x=0; x<width/cellSize; x++) {
+    for (int y=0; y<height/cellSize; y++) {
+      cellsBuffer[x][y] = cells[x][y];
+    }
+  }
+
+  // Visit each cell:
+  for (int x=0; x<width/cellSize; x++) {
+    for (int y=0; y<height/cellSize; y++) {
+      // And visit all the neighbours of each cell
+      int neighbours = 0; // We'll count the neighbours
+      for (int xx=x-1; xx<=x+1;xx++) {
+        for (int yy=y-1; yy<=y+1;yy++) {  
+          if (((xx>=0)&&(xx<width/cellSize))&&((yy>=0)&&(yy<height/cellSize))) { // Make sure you are not out of bounds
+            if (!((xx==x)&&(yy==y))) { // Make sure to to check against self
+              if (cellsBuffer[xx][yy]==1){
+                neighbours ++; // Check alive neighbours and count them
+              }
+            } // End of if
+          } // End of if
+        } // End of yy loop
+      } //End of xx loop
+      // We've checked the neigbours: apply rules!
+      if (cellsBuffer[x][y]==1) { // The cell is alive: kill it if necessary
+        if (neighbours < 2 || neighbours > 3) {
+          cells[x][y] = 0; // Die unless it has 2 or 3 neighbours
+        }
+      } 
+      else { // The cell is dead: make it live if necessary      
+        if (neighbours == 3 ) {
+          cells[x][y] = 1; // Only if it has 3 neighbours
+        }
+      } // End of if
+    } // End of y loop
+  } // End of x loop
+} // End of function
+
+void keyPressed() {
+  if (key=='r' || key == 'R') {
+    // Restart: reinitialization of cells
+    for (int x=0; x<width/cellSize; x++) {
+      for (int y=0; y<height/cellSize; y++) {
+        float state = random (100);
+        if (state > probabilityOfAliveAtStart) {
+          state = 0;
+        }
+        else {
+          state = 1;
+        }
+        cells[x][y] = int(state); // Save state of each cell
+      }
+    }
+  }
+  if (key==' ') { // On/off of pause
+    pause = !pause;
+  }
+  if (key=='c' || key == 'C') { // Clear all
+    for (int x=0; x<width/cellSize; x++) {
+      for (int y=0; y<height/cellSize; y++) {
+        cells[x][y] = 0; // Save all to zero
+      }
+    }
+  }
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-prolog.html b/docs/_style/prism-master/examples/prism-prolog.html new file mode 100644 index 0000000000..b231bcae7c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-prolog.html @@ -0,0 +1,44 @@ +

Comments

+
% This is a comment
+/* This is a
+multi-line comment */
+ +

Numbers

+
42
+3.1415
+ +

Strings

+
"This is a string."
+"This is a string \
+on multiple lines."
+"A string with \"quotes\" in it."
+"Another string with ""quotes"" in it."
+ +

Example

+
:- dynamic fibo/2.
+fibo(0, 1). fibo(1, 1).
+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
+ +

Known failures

+

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. +

+ +

Null-ary predicates are not highlighted

+
halt.
+trace.
+
+:- if(test1).
+section_1.
+:- elif(test2).
+section_2.
+:- elif(test3).
+section_3.
+:- else.
+section_else.
+:- endif.
diff --git a/docs/_style/prism-master/examples/prism-properties.html b/docs/_style/prism-master/examples/prism-properties.html new file mode 100644 index 0000000000..bbc81f99af --- /dev/null +++ b/docs/_style/prism-master/examples/prism-properties.html @@ -0,0 +1,9 @@ +

Comments

+
# This is a comment
+! This is a comment too
+ +

Properties

+
some_key some_value
+some\ key\ with\ spaces : some value
+some_key = some \
+multiline value
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-pug.html b/docs/_style/prism-master/examples/prism-pug.html new file mode 100644 index 0000000000..d37de5caba --- /dev/null +++ b/docs/_style/prism-master/examples/prism-pug.html @@ -0,0 +1,85 @@ +

Comments

+
// Some
+  multiline
+  comment !
+
+// This is a comment
+But this is not
+ +

Doctype

+
doctype html
+doctype 1.1
+doctype html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
+ +

Tags

+
ul
+  li Item A
+  li Item B
+  li Item C
+foo(bar='baz')/
+input(type='checkbox', checked=true.toString())
+#content
+div#foo(data-bar="foo")&attributes({'data-foo': 'bar'})
+ +

Markup

+
<div class="foo bar"></div>
+ +

Control flow

+
#user
+  if user.description
+    p.description= user.description
+  else if authorised
+    p.description.
+      User has no description,
+      why not add one...
+  else
+    p.description User has no description
+ul
+  each val in [1, 2, 3, 4, 5]
+    li= val
+case friends
+  when 0
+    p you have no friends
+  when 1
+    p you have a friend
+  default
+    p you have #{friends} friends
+
+ +

Inline JavaScript

+
script alert('test');
+script(type="text/javascript").
+  alert('foo');
+  alert('bar');
+- var classes = ['foo', 'bar', 'baz']
+- for (var x = 0; x < 3; x++)
+  li item
+
+ +

Keywords

+
include ./includes/head.pug
+extends ./layout.pug
+block content
+append head
+ +

Mixins

+
mixin list
+  ul
+    li foo
+    li bar
+    li baz
++list
+mixin pet(name)
+  li.pet= name
+ul
+  +pet('cat')
+  +pet('dog')
+
+ +

Filters

+

Filters require the desired language to be loaded. +On this page, check CoffeeScript before checking Pug should make +the example below work properly.

+
script
+  :coffee
+    console.log 'This is coffee script'
diff --git a/docs/_style/prism-master/examples/prism-puppet.html b/docs/_style/prism-master/examples/prism-puppet.html new file mode 100644 index 0000000000..4892ab8972 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-puppet.html @@ -0,0 +1,152 @@ +

Comments

+
#
+# Foobar
+/* Foo
+bar */
+ +

Strings and interpolation

+
'foo \'bar\' baz'
+"$foo \"bar\" ${baz}"
+
+@(FOOBAR) # Unquoted heredoc string
+Foo bar baz
+FOOBAR
+
+@("BARBAZ"/$L) # Quoted heredoc string
+	$foo bar ${baz}
+	|-BARBAZ
+ +

Regular expressions

+
if $host =~ /^www(\d+)\./ {}
+$foo = /foo
+	bar # Extended regexes can include comments
+baz/x
+ +

Variables

+
$foo
+$::foobar
+$foo::bar::baz
+ +

Functions

+
require apache
+template('apache/vhost-default.conf.erb')
+[1,20,3].filter |$value| { $value < 10 }
+ +

All-in-one example

+
file {'ntp.conf':
+  path    => '/etc/ntp.conf',
+  ensure  => file,
+  content => template('ntp/ntp.conf'),
+  owner   => 'root',
+  mode    => '0644',
+}
+package {'ntp':
+  ensure => installed,
+  before => File['ntp.conf'],
+}
+service {'ntpd':
+  ensure    => running,
+  subscribe => File['ntp.conf'],
+}
+Package['ntp'] -> File['ntp.conf'] ~> Service['ntpd']
+
+$package_list = ['ntp', 'apache2', 'vim-nox', 'wget']
+$myhash = { key => { subkey => 'b' }}
+
+include ntp
+require ntp
+class {'ntp':}
+
+define apache::vhost ($port, $docroot, $servername = $title, $vhost_name = '*') {
+  include apache
+  include apache::params
+  $vhost_dir = $apache::params::vhost_dir
+  file { "${vhost_dir}/${servername}.conf":
+      content => template('apache/vhost-default.conf.erb'),
+      owner   => 'www',
+      group   => 'www',
+      mode    => '644',
+      require => Package['httpd'],
+      notify  => Service['httpd'],
+  }
+}
+
+apache::vhost {'homepages':
+  port    => 8081,
+  docroot => '/var/www-testhost',
+}
+Apache::Vhost['homepages']
+
+node 'www1.example.com' {
+  include common
+  include apache
+  include squid
+}
+node /^www\d+$/ {
+  include common
+}
+
+# comment
+/* comment */
+
+if $is_virtual {
+  warning( 'Tried to include class ntp on virtual machine; this node may be misclassified.' )
+}
+elsif $operatingsystem == 'Darwin' {
+  warning( 'This NTP module does not yet work on our Mac laptops.' )
+else {
+  include ntp
+}
+
+if $hostname =~ /^www(\d+)\./ {
+  notify { "Welcome web server $1": }
+}
+
+case $operatingsystem {
+  'Solaris':          { include role::solaris }
+  'RedHat', 'CentOS': { include role::redhat  }
+  /^(Debian|Ubuntu)$/:{ include role::debian  }
+  default:            { include role::generic }
+}
+$rootgroup = $osfamily ? {
+    'Solaris'          => 'wheel',
+    /(Darwin|FreeBSD)/ => 'wheel',
+    default            => 'root',
+}
+
+User <| groups == 'admin' |>
+Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>>
+
+Exec <| title == 'update_migrations' |> {
+  environment => 'RUBYLIB=/usr/lib/ruby/site_ruby/1.8/',
+}
+
+@user {'deploy':
+  uid     => 2004,
+  comment => 'Deployment User',
+  group   => www-data,
+  groups  => ["enterprise"],
+  tag     => [deploy, web],
+}
+
+@@nagios_service { "check_zfs${hostname}":
+  use                 => 'generic-service',
+  host_name           => "$fqdn",
+  check_command       => 'check_nrpe_1arg!check_zfs',
+  service_description => "check_zfs${hostname}",
+  target              => '/etc/nagios3/conf.d/nagios_service.cfg',
+  notify              => Service[$nagios::params::nagios_service],
+}
+ +

Known failures

+

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. +

+ +

More than one level of nested braces inside interpolation

+
"Foobar ${foo({
+    bar => {baz => 42}
+    baz => 42
+})} <- broken"
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-pure.html b/docs/_style/prism-master/examples/prism-pure.html new file mode 100644 index 0000000000..d7a0129b12 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-pure.html @@ -0,0 +1,115 @@ +

Comments

+
#! shebang
+// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"This is a string."
+"This is a string with \"quotes\" in it."
+ +

Numbers

+
4711
+4711L
+1.2e-3
+.14
+1000
+0x3e8
+01750
+0b1111101000
+inf
+nan
+ +

Inline code

+

Inline code requires the desired language to be loaded. +On this page, check C, C++ and Fortran before checking Pure should make +the examples below work properly.

+
%<
+int mygcd(int x, int y)
+{
+  if (y == 0)
+    return x;
+  else
+    return mygcd(y, x%y);
+}
+%>
+
+%< -*- Fortran90 -*-
+function fact(n) result(p)
+  integer n, p
+  p = 1
+  do i = 1, n
+     p = p*i
+  end do
+end function fact
+%>
+
+%< -*- C++ -*-
+
+#include <pure/runtime.h>
+#include <string>
+#include <map>
+
+// An STL map mapping strings to Pure expressions.
+
+using namespace std;
+typedef map<string,pure_expr*> exprmap;
+
+// Since we can't directly deal with C++ classes in Pure, provide some C
+// functions to create, destroy and manipulate these objects.
+
+extern "C" exprmap *map_create()
+{
+  return new exprmap;
+}
+
+extern "C" void map_add(exprmap *m, const char *key, pure_expr *x)
+{
+  exprmap::iterator it = m->find(string(key));
+  if (it != m->end()) pure_free(it->second);
+  (*m)[key] = pure_new(x);
+}
+
+extern "C" void map_del(exprmap *m, const char *key)
+{
+  exprmap::iterator it = m->find(key);
+  if (it != m->end()) {
+    pure_free(it->second);
+    m->erase(it);
+  }
+}
+
+extern "C" pure_expr *map_get(exprmap *m, const char *key)
+{
+  exprmap::iterator it = m->find(key);
+  return (it != m->end())?it->second:0;
+}
+
+extern "C" pure_expr *map_keys(exprmap *m)
+{
+  size_t i = 0, n = m->size();
+  pure_expr **xs = new pure_expr*[n];
+  for (exprmap::iterator it = m->begin(); it != m->end(); ++it)
+    xs[i++] = pure_string_dup(it->first.c_str());
+  pure_expr *x = pure_listv(n, xs);
+  delete[] xs;
+  return x;
+}
+
+extern "C" void map_destroy(exprmap *m)
+{
+  for (exprmap::iterator it = m->begin(); it != m->end(); ++it)
+    pure_free(it->second);
+  delete m;
+}
+
+%>
+ +

Example

+
queens n       = catch reverse (search n 1 []) with
+  search n i p = throw p if i>n;
+               = void [search n (i+1) ((i,j):p) | j = 1..n; safe (i,j) p];
+  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;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-python.html b/docs/_style/prism-master/examples/prism-python.html new file mode 100644 index 0000000000..ce6efc00fb --- /dev/null +++ b/docs/_style/prism-master/examples/prism-python.html @@ -0,0 +1,61 @@ +

Comments

+
# This is a comment
+# -*- coding: <encoding-name> -*-
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+""" "Multi-line" strings
+are supported."""
+''' 'Multi-line' strings
+are supported.'''
+ +

Numbers

+
7
+2147483647
+0o177
+0b100110111
+3
+79228162514264337593543950336
+0o377
+0x100000000
+0xdeadbeef
+3.14
+10.
+.001
+1e100
+3.14e-10
+0e0
+3.14j
+10.j
+10j
+.001j
+1e100j
+3.14e-10j
+
+ +

Full example

+
def median(pool):
+    '''Statistical median to demonstrate doctest.
+    >>> median([2, 9, 9, 7, 9, 2, 4, 5, 8])
+    7
+    '''
+    copy = sorted(pool)
+    size = len(copy)
+    if size % 2 == 1:
+        return copy[(size - 1) / 2]
+    else:
+        return (copy[size/2 - 1] + copy[size/2]) / 2
+if __name__ == '__main__':
+    import doctest
+    doctest.testmod()
+ +

Known failures

+

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. +

+ +

Interpolation expressions containing strings with { or }

+
f"{'}'}"
diff --git a/docs/_style/prism-master/examples/prism-q.html b/docs/_style/prism-master/examples/prism-q.html new file mode 100644 index 0000000000..58d674f478 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-q.html @@ -0,0 +1,112 @@ +

Comments

+
foo / This is a comment
+/ This is a comment too
+
+/
+Some multi-line
+comment here
+\
+
+\
+This comment will
+continue until the
+end of code
+ +

Character data and strings

+
"q"
+"\""
+"\\"
+"\142"
+"foo bar baz"
+ +

Symbols

+
`
+`q
+`zaphod
+`:198.162.0.2:5042
+`:www.yourco.com:5042
+`.new
+ +

Numbers

+
42
+b:-123h
+c:1234567890j
+pi:3.14159265
+float1:1f
+r:1.4142e
+2.0
+4.00e
+f:1.23456789e-10
+r:1.2345678e-10e
+bit:0b
+byte:0x2a
+a:42
+bit:1b
+
+0w 0n 0W 0Wh 0Wj
+ +

Dates

+
d:2006.07.04
+t:09:04:59.000
+dt:2006.07.04T09:04:59.000
+mon:2006.07m
+mm:09:04
+sec:09:04:59
+d:2006.07.04
+
+0Nm 0Nd 0Nz 0Nu 0Nv 0Wd 0Wt 0Wz
+ +

Verbs

+
99+L
+x<42|x>98
+(x<42)|x>98
+42~(4 2;(1 0))
+(4 2)~(4; 2*1)
+ +

Adverbs

+
" ," ,/: ("Now";"is";"the";"time")
+L1,/:\:L2
+0+/10 20 30
+(1#) each 1001 1002 1004 1003
+ +

Built-in functions and q-sql

+
string 42
+L1 cross L2
+type c
+select from t where price=(max;price) fby ([]sym;ex)
+ungroup `p xgroup sp
+`instrument insert (`g; `$"Google"; `$"Internet")
+ +

Example

+
/ Example from http://code.kx.com/wiki/Cookbook/CorporateActions
+getCAs:{[caTypes]
+    / handles multiplie corporate actions on one date
+    t:0!select factor:prd factor by date-1,sym from ca where caType in caTypes;
+    t,:update date:1901.01.01,factor:1.0 from ([]sym:distinct t`sym);
+    t:`date xasc t;
+    t:update factor:reverse prds reverse 1 rotate factor by sym from t;
+    :update `g#sym from 0!t;
+  };
+
+adjust:{[t;caTypes]
+    t:0!t;
+    factors:enlist 1.0^aj[`sym`date;([] date:t`date;sym:t`sym);getCAs caTypes]`factor;
+    mc:c where (lower c:cols t) like "*price"; / find columns to multiply
+    dc:c where lower[c] like "*size"; / find columns to divide
+    :![t;();0b;(mc,dc)!((*),/:mc,\:factors),((%),/:dc,\:factors)]; / multiply or divide out the columns
+  };
+
+/ get the adjustment factors considering all corporate actions
+getCAs exec distinct caType from ca
+
+adjust[t;`dividend] / adjust trades for dividends only
+ +

Known failures

+

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. +

+ +

The global context is highlighted as a verb

+
\d .
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-qore.html b/docs/_style/prism-master/examples/prism-qore.html new file mode 100644 index 0000000000..710e1614e7 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-qore.html @@ -0,0 +1,962 @@ +

Full example

+
#!/usr/bin/env qore
+
+# database test script
+# databases users must be able to create and destroy tables and procedures, etc
+# in order to execute all tests
+
+%require-our
+%enable-all-warnings
+
+our ($o, $errors, $test_count);
+
+const opts =
+	( "help"    : "h,help",
+	  "host"    : "H,host=s",
+	  "pass"    : "p,pass=s",
+	  "db"      : "d,db=s",
+	  "user"    : "u,user=s",
+	  "type"    : "t,type=s",
+	  "enc"     : "e,encoding=s",
+	  "verbose" : "v,verbose:i+",
+	  "leave"   : "l,leave"
+ );
+
+sub usage()
+{
+	printf("usage: %s [options]
+ -h,--help          this help text
+ -u,--user=ARG      set username
+ -p,--pass=ARG      set password
+ -d,--db=ARG        set database name
+ -e,--encoding=ARG  set database character set encoding (i.e. \"utf8\")
+ -H,--host=ARG      set hostname (for MySQL and PostgreSQL connections)
+ -t,--type          set database driver (default mysql)
+ -v,--verbose       more v's = more information
+ -l,--leave         leave test tables in schema at end\n",
+	   basename($ENV."_"));
+	exit();
+}
+
+const object_map =
+ ( "oracle" :
+   ( "tables" : ora_tables ),
+   "mysql"  :
+   ( "tables" : mysql_tables ),
+   "pgsql"  :
+   ( "tables" : pgsql_tables ),
+   "sybase" :
+   ( "tables" : syb_tables,
+	 "procs"  : sybase_procs ),
+   "freetds"  :
+   ( "tables" : freetds_sybase_tables,
+	 "procs"  : sybase_procs ) );
+
+const ora_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar2(80) not null
+)",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar2(250) not null,
+   dob date not null
+)",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar2(80) not null,
+   value varchar2(160) not null
+)" );
+
+const mysql_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar(80) not null
+) type = innodb",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar(250) not null,
+   dob date not null
+) type = innodb",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar(80) not null,
+   value varchar(160) not null
+) type = innodb" );
+
+const pgsql_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar(80) not null )",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar(250) not null,
+   dob date not null )",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar(80) not null,
+   value varchar(160) not null)",
+	"data_test" : "create table data_test (
+		int2_f smallint not null,
+		int4_f integer not null,
+		int8_f int8 not null,
+		bool_f boolean not null,
+
+		float4_f real not null,
+		float8_f double precision not null,
+
+		number_f numeric(16,3) not null,
+		money_f money not null,
+
+		text_f text not null,
+		varchar_f varchar(40) not null,
+		char_f char(40) not null,
+		name_f name not null,
+
+		date_f date not null,
+		abstime_f abstime not null,
+		reltime_f reltime not null,
+		interval_f interval not null,
+		time_f time not null,
+		timetz_f time with time zone not null,
+		timestamp_f timestamp not null,
+		timestamptz_f timestamp with time zone not null,
+		tinterval_f tinterval not null,
+
+		bytea_f bytea not null
+		--bit_f bit(11) not null,
+		--varbit_f bit varying(11) not null
+)" );
+
+const syb_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar(80) not null
+)",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar(250) not null,
+   dob date not null
+)",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar(80) not null,
+   value varchar(160) not null
+)",
+	"data_test" : "create table data_test (
+	null_f char(1) null,
+
+	varchar_f varchar(40) not null,
+	char_f char(40) not null,
+	unichar_f unichar(40) not null,
+	univarchar_f univarchar(40) not null,
+	text_f text not null,
+	unitext_f unitext not null, -- note that unitext is stored as 'image'
+
+		bit_f bit not null,
+	tinyint_f tinyint not null,
+	smallint_f smallint not null,
+	int_f int not null,
+		int_f2 int not null,
+
+	decimal_f decimal(10,4) not null,
+
+	float_f float not null,     -- 8-bytes
+	real_f real not null,       -- 4-bytes
+	money_f money not null,
+	smallmoney_f smallmoney not null,
+
+	date_f date not null,
+	time_f time not null,
+	datetime_f datetime not null,
+	smalldatetime_f smalldatetime not null,
+
+	binary_f binary(4) not null,
+	varbinary_f varbinary(4) not null,
+	image_f image not null
+)" );
+
+const sybase_procs = (
+	"find_family" :
+"create procedure find_family @name varchar(80)
+as
+select * from family where name = @name
+commit -- to maintain transaction count
+",
+	"get_values" :
+"create procedure get_values @string varchar(80) output, @int int output
+as
+select @string = 'hello there'
+select @int = 150
+commit -- to maintain transaction count
+",
+	"get_values_and_select" :
+"create procedure get_values_and_select @string varchar(80) output, @int int output
+as
+select @string = 'hello there'
+select @int = 150
+select * from family where family_id = 1
+commit -- to maintain transaction count
+",
+	"get_values_and_multiple_select" :
+"create procedure get_values_and_multiple_select @string varchar(80) output, @int int output
+as
+select @string = 'hello there'
+select @int = 150
+select * from family where family_id = 1
+select * from people where person_id = 1
+commit -- to maintain transaction count
+",
+	"just_select" :
+"create procedure just_select
+as
+select * from family where family_id = 1
+commit -- to maintain transaction count
+",
+	"multiple_select" :
+"create procedure multiple_select
+as
+select * from family where family_id = 1
+select * from people where person_id = 1
+commit -- to maintain transaction count
+"
+ );
+
+const freetds_sybase_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar(80) not null
+)",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar(250) not null,
+   dob date not null
+)",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar(80) not null,
+   value varchar(160) not null
+)",
+	"data_test" : "create table data_test (
+	null_f char(1) null,
+
+	varchar_f varchar(40) not null,
+	char_f char(40) not null,
+	text_f text not null,
+	unitext_f unitext not null, -- note that unitext is stored as 'image'
+
+		bit_f bit not null,
+	tinyint_f tinyint not null,
+	smallint_f smallint not null,
+	int_f int not null,
+		int_f2 int not null,
+
+	decimal_f decimal(10,4) not null,
+
+	float_f float not null,     -- 8-bytes
+	real_f real not null,       -- 4-bytes
+	money_f money not null,
+	smallmoney_f smallmoney not null,
+
+	date_f date not null,
+	time_f time not null,
+	datetime_f datetime not null,
+	smalldatetime_f smalldatetime not null,
+
+	binary_f binary(4) not null,
+	varbinary_f varbinary(4) not null,
+	image_f image not null
+)" );
+
+const freetds_mssql_tables = (
+	"family" : "create table family (
+   family_id int not null,
+   name varchar(80) not null
+)",
+	"people" : "create table people (
+   person_id int not null,
+   family_id int not null,
+   name varchar(250) not null,
+   dob datetime not null
+)",
+	"attributes" : "create table attributes (
+   person_id int not null,
+   attribute varchar(80) not null,
+   value varchar(160) not null
+)",
+	"data_test" : "create table data_test (
+	null_f char(1) null,
+
+	varchar_f varchar(40) not null,
+	char_f char(40) not null,
+	text_f text not null,
+
+		bit_f bit not null,
+	tinyint_f tinyint not null,
+	smallint_f smallint not null,
+	int_f int not null,
+		int_f2 int not null,
+
+	decimal_f decimal(10,4) not null,
+
+	float_f float not null,     -- 8-bytes
+	real_f real not null,       -- 4-bytes
+	money_f money not null,
+	smallmoney_f smallmoney not null,
+
+	datetime_f datetime not null,
+	smalldatetime_f smalldatetime not null,
+
+	binary_f binary(4) not null,
+	varbinary_f varbinary(4) not null,
+	image_f image not null
+)" );
+
+sub parse_command_line()
+{
+	my $g = new GetOpt(opts);
+	$o = $g.parse(\$ARGV);
+	if ($o.help)
+	usage();
+
+	if (!strlen($o.db))
+	{
+	stderr.printf("set the login parameters with -u,-p,-d, etc (-h for help)\n");
+	exit(1);
+	}
+	if (elements $ARGV)
+	{
+	stderr.printf("excess arguments on command-line (%n): -h for help\n", $ARGV);
+	exit(1);
+	}
+	if (!strlen($o.type))
+	$o.type = "mysql";
+}
+
+sub create_datamodel($db)
+{
+	drop_test_datamodel($db);
+
+	my $driver = $db.getDriverName();
+	# create tables
+	my $tables = object_map.$driver.tables;
+	if ($driver == "freetds")
+	if ($db.is_sybase)
+		$tables = freetds_sybase_tables;
+		else
+		$tables = freetds_mssql_tables;
+
+	foreach my $table in (keys $tables)
+	{
+	tprintf(2, "creating table %n\n", $table);
+	$db.exec($tables.$table);
+	}
+
+	# create procedures if any
+	foreach my $proc in (keys object_map.$driver.procs)
+	{
+	tprintf(2, "creating procedure %n\n", $proc);
+	$db.exec(object_map.$driver.procs.$proc);
+	}
+
+	# create functions if any
+	foreach my $func in (keys object_map.$driver.funcs)
+	{
+	tprintf(2, "creating function %n\n", $func);
+	$db.exec(object_map.$driver.funcs.$func);
+	}
+
+	$db.exec("insert into family values ( 1, 'Smith' )");
+	$db.exec("insert into family values ( 2, 'Jones' )");
+
+	# we insert the dates here using binding by value so we don't have
+	# to worry about each database's specific date format
+	$db.exec("insert into people values ( 1, 1, 'Arnie', %v)", 1983-05-13);
+	$db.exec("insert into people values ( 2, 1, 'Sylvia', %v)", 1994-11-10);
+	$db.exec("insert into people values ( 3, 1, 'Carol', %v)", 2003-07-23);
+	$db.exec("insert into people values ( 4, 1, 'Bernard', %v)", 1979-02-27);
+	$db.exec("insert into people values ( 5, 1, 'Isaac', %v)", 2000-04-04);
+	$db.exec("insert into people values ( 6, 2, 'Alan', %v)", 1992-06-04);
+	$db.exec("insert into people values ( 7, 2, 'John', %v)", 1995-03-23);
+
+	$db.exec("insert into attributes values ( 1, 'hair', 'blond' )");
+	$db.exec("insert into attributes values ( 1, 'eyes', 'hazel' )");
+	$db.exec("insert into attributes values ( 2, 'hair', 'blond' )");
+	$db.exec("insert into attributes values ( 2, 'eyes', 'blue' )");
+	$db.exec("insert into attributes values ( 3, 'hair', 'brown' )");
+	$db.exec("insert into attributes values ( 3, 'eyes', 'grey')");
+	$db.exec("insert into attributes values ( 4, 'hair', 'brown' )");
+	$db.exec("insert into attributes values ( 4, 'eyes', 'brown' )");
+	$db.exec("insert into attributes values ( 5, 'hair', 'red' )");
+	$db.exec("insert into attributes values ( 5, 'eyes', 'green' )");
+	$db.exec("insert into attributes values ( 6, 'hair', 'black' )");
+	$db.exec("insert into attributes values ( 6, 'eyes', 'blue' )");
+	$db.exec("insert into attributes values ( 7, 'hair', 'brown' )");
+	$db.exec("insert into attributes values ( 7, 'eyes', 'brown' )");
+	$db.commit();
+}
+
+sub drop_test_datamodel($db)
+{
+	my $driver = $db.getDriverName();
+	# drop the tables and ignore exceptions
+	# the commits are needed for databases like postgresql, where errors will prohibit and further
+	# actions from being taken on the Datasource
+	foreach my $table in (keys object_map.$driver.tables)
+	try {
+		$db.exec("drop table " + $table);
+		$db.commit();
+		tprintf(2, "dropped table %n\n", $table);
+	}
+		catch ()
+	{
+		$db.commit();
+	}
+
+	# drop procedures and ignore exceptions
+	foreach my $proc in (keys object_map.$driver.procs)
+	{
+	my $cmd = object_map.$driver.drop_proc_cmd;
+	if (!exists $cmd)
+		$cmd = "drop procedure";
+	try {
+		$db.exec($cmd + " " + $proc);
+		$db.commit();
+		tprintf(2, "dropped procedure %n\n", $proc);
+	}
+	catch ()
+	{
+		$db.commit();
+	}
+	}
+
+	# drop functions and ignore exceptions
+	foreach my $func in (keys object_map.$driver.funcs)
+	{
+	my $cmd = object_map.$driver.drop_func_cmd;
+	if (!exists $cmd)
+		$cmd = "drop function";
+	try {
+		$db.exec($cmd + " " + $func);
+		$db.commit();
+		tprintf(2, "dropped function %n\n", $func);
+	}
+	catch ()
+	{
+		$db.commit();
+	}
+	}
+}
+
+sub getDS()
+{
+	my $ds = new Datasource($o.type, $o.user, $o.pass, $o.db, $o.enc);
+	if (strlen($o.host))
+	$ds.setHostName($o.host);
+	return $ds;
+}
+
+sub tprintf($v, $msg)
+{
+	if ($v <= $o.verbose)
+	vprintf($msg, $argv);
+}
+
+sub test_value($v1, $v2, $msg)
+{
+	++$test_count;
+	if ($v1 == $v2)
+	tprintf(1, "OK: %s test\n", $msg);
+	else
+	{
+		tprintf(0, "ERROR: %s test failed! (%n != %n)\n", $msg, $v1, $v2);
+		$errors++;
+	}
+}
+
+const family_hash = (
+  "Jones" : (
+	  "people" : (
+	  "John" : (
+		  "dob" : 1995-03-23,
+		  "eyes" : "brown",
+		  "hair" : "brown" ),
+	  "Alan" : (
+		  "dob" : 1992-06-04,
+		  "eyes" : "blue",
+		  "hair" : "black" ) ) ),
+	"Smith" : (
+	"people" : (
+		"Arnie" : (
+		"dob" : 1983-05-13,
+		"eyes" : "hazel",
+		"hair" : "blond" ),
+		"Carol" : (
+		"dob" : 2003-07-23,
+		"eyes" : "grey",
+		"hair" : "brown" ),
+		"Isaac" : (
+		"dob" : 2000-04-04,
+		"eyes" : "green",
+		"hair" : "red" ),
+		"Bernard" : (
+		"dob" : 1979-02-27,
+		"eyes" : "brown",
+		"hair" : "brown" ),
+		"Sylvia" : (
+		"dob" : 1994-11-10,
+		"eyes" : "blue",
+		"hair" : "blond" ) ) ) );
+
+sub context_test($db)
+{
+	# first we select all the data from the tables and then use
+	# context statements to order the output hierarchically
+
+	# context statements are most useful when a set of queries can be executed once
+	# and the results processed many times by creating "views" with context statements
+
+	my $people = $db.select("select * from people");
+	my $attributes = $db.select("select * from attributes");
+
+	my $today = format_date("YYYYMMDD", now());
+
+	# in this test, we create a big hash structure out of the queries executed above
+	# and compare it at the end to the expected result
+
+	# display each family sorted by family name
+	my $fl;
+	context family ($db.select("select * from family")) sortBy (%name)
+	{
+	my $pl;
+	tprintf(2, "Family %d: %s\n", %family_id, %name);
+
+	# display people, sorted by eye color, descending
+	context people ($people)
+		sortDescendingBy (find %value in $attributes
+				  where (%attribute == "eyes"
+					 && %person_id == %people:person_id))
+		where (%family_id == %family:family_id)
+	{
+		my $al;
+		tprintf(2, "  %s, born %s\n", %name, format_date("Month DD, YYYY", %dob));
+		context ($attributes) sortBy (%attribute) where (%person_id == %people:person_id)
+		{
+		$al.%attribute = %value;
+		tprintf(2, "    has %s %s\n", %value, %attribute);
+		}
+		# leave out the ID fields and name from hash under name; subtracting a
+		# string from a hash removes that key from the result
+		# this is "doing it the hard way", there is only one key left,
+		# "dob", then attributes are added directly into the person hash
+		$pl.%name = %% - "family_id" - "person_id" - "name" + $al;
+	}
+	# leave out family_id and name fields (leaving an empty hash)
+	$fl.%name = %% - "family_id" - "name" + ( "people" : $pl );
+	}
+
+	# test context ordering
+	test_value(keys $fl, ("Jones", "Smith"), "first context");
+	test_value(keys $fl.Smith.people, ("Arnie", "Carol", "Isaac", "Bernard", "Sylvia"), "second context");
+	# test entire context value
+	test_value($fl, family_hash, "third context");
+}
+
+
+sub test_timeout($db, $c)
+{
+	$db.setTransactionLockTimeout(1ms);
+	try {
+	# this should cause a TRANSACTION-LOCK-TIMEOUT exception to be thrown
+	$db.exec("insert into family values (3, 'Test')\n");
+	test_value(True, False, "transaction timeout");
+	$db.exec("delete from family where name = 'Test'");
+	}
+	catch ($ex)
+	{
+	test_value(True, True, "transaction timeout");
+	}
+	# signal parent thread to continue
+	$c.dec();
+}
+
+sub transaction_test($db)
+{
+	my $ndb = getDS();
+	my $r;
+	tprintf(2, "db.autocommit=%N, ndb.autocommit=%N\n", $db.getAutoCommit(), $ndb.getAutoCommit());
+
+	# first, we insert a new row into "family" but do not commit it
+	my $rows = $db.exec("insert into family values (3, 'Test')\n");
+	if ($rows !== 1)
+	printf("FAILED INSERT, rows=%N\n", $rows);
+
+	# now we verify that the new row is not visible to the other datasource
+	# unless it's a sybase/ms sql server datasource, in which case this would deadlock :-(
+	if ($o.type != "sybase" && $o.type != "freetds")
+	{
+	$r = $ndb.selectRow("select name from family where family_id = 3").name;
+	test_value($r, NOTHING, "first transaction");
+	}
+
+	# now we verify that the new row is visible to the inserting datasource
+	$r = $db.selectRow("select name from family where family_id = 3").name;
+	test_value($r, "Test", "second transaction");
+
+	# test datasource timeout
+	# this Counter variable will allow the parent thread to sleep
+	# until the child thread times out
+	my $c = new Counter(1);
+	background test_timeout($db, $c);
+
+	# wait for child thread to time out
+	$c.waitForZero();
+
+	# now, we commit the transaction
+	$db.commit();
+
+	# now we verify that the new row is visible in the other datasource
+	$r = $ndb.selectRow("select name from family where family_id = 3").name;
+	test_value($r, "Test", "third transaction");
+
+	# now we delete the row we inserted (so we can repeat the test)
+	$r = $ndb.exec("delete from family where family_id = 3");
+	test_value($r, 1, "delete row count");
+	$ndb.commit();
+}
+
+sub oracle_test()
+{
+}
+
+# here we use a little workaround for modules that provide functions,
+# namespace additions (constants, classes, etc) needed by test functions
+# at parse time.  To avoid parse errors (as database modules are loaded
+# in this script at run-time when the Datasource class is instantiated)
+# we use a Program object that we parse and run on demand to return the
+# value required
+sub get_val($code)
+{
+	my $p = new Program();
+
+	my $str = sprintf("return %s;", $code);
+	$p.parse($str, "code");
+	return $p.run();
+}
+
+sub pgsql_test($db)
+{
+	my $args = ( "int2_f"          : 258,
+		 "int4_f"          : 233932,
+		 "int8_f"          : 239392939458,
+		 "bool_f"          : True,
+		 "float4_f"        : 21.3444,
+		 "float8_f"        : 49394.23423491,
+		 "number_f"        : get_val("pgsql_bind(PG_TYPE_NUMERIC, '7235634215.3250')"),
+		 "money_f"         : get_val("pgsql_bind(PG_TYPE_CASH, \"400.56\")"),
+		 "text_f"          : 'some text  ',
+		 "varchar_f"       : 'varchar ',
+		 "char_f"          : 'char text',
+		 "name_f"          : 'name',
+		 "date_f"          : 2004-01-05,
+		 "abstime_f"       : 2005-12-03T10:00:01,
+		 "reltime_f"       : 5M + 71D + 19h + 245m + 51s,
+		 "interval_f"      : 6M + 3D + 2h + 45m + 15s,
+		 "time_f"          : 11:35:00,
+		 "timetz_f"        : get_val("pgsql_bind(PG_TYPE_TIMETZ, \"11:38:21 CST\")"),
+		 "timestamp_f"     : 2005-04-01T11:35:26,
+		 "timestamptz_f"   : 2005-04-01T11:35:26.259,
+		 "tinterval_f"     : get_val("pgsql_bind(PG_TYPE_TINTERVAL, '[\"May 10, 1947 23:59:12\" \"Jan 14, 1973 03:14:21\"]')"),
+		 "bytea_f"         : <bead>
+		 #bit_f             :
+		 #varbit_f          :
+	);
+
+	$db.vexec("insert into data_test values (%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v)", hash_values($args));
+
+	my $q = $db.selectRow("select * from data_test");
+	if ($o.verbose > 1)
+	foreach my $k in (keys $q)
+		tprintf(2, " %-16s= %-10s %N\n", $k, type($q.$k), $q.$k);
+
+	# fix values where we know the return type is different
+	$args.money_f = 400.56;
+	$args.timetz_f = 11:38:21;
+	$args.tinterval_f = '["1947-05-10 21:59:12" "1973-01-14 02:14:21"]';
+	$args.number_f = "7235634215.3250";
+	$args.reltime_f = 19177551s;
+	$args.interval_f = 6M + 3D + 9915s;
+
+	# rounding errors can happen in float4
+	$q.float4_f = round($q.float4_f);
+	$args.float4_f = round($args.float4_f);
+
+	# remove values where we know they won't match
+	# abstime and timestamptz are converted to GMT by the server
+	delete $q.abstime_f;
+	delete $q.timestamptz_f;
+
+	# compare each value
+	foreach my $k in (keys $q)
+	test_value($q.$k, $args.$k, sprintf("%s bind and retrieve", $k));
+
+	$db.commit();
+}
+
+sub mysql_test()
+{
+}
+
+const family_q = ( "family_id" : 1,
+		   "name" : "Smith" );
+const person_q = ( "person_id" : 1,
+		   "family_id" : 1,
+		   "name" : "Arnie",
+		   "dob" : 1983-05-13 );
+const params = ( "string" : "hello there",
+		 "int" : 150 );
+
+sub sybase_test($db)
+{
+	# simple stored proc test, bind by name
+	my $x = $db.exec("exec find_family %v", "Smith");
+	test_value($x, ("name": list("Smith"), "family_id" : list(1)), "simple stored proc");
+
+	# stored proc execute with output params
+	$x = $db.exec("declare @string varchar(40), @int int
+exec get_values :string output, :int output");
+	test_value($x, params + ("rowcount":1), "get_values");
+
+	# we use Datasource::selectRows() in the following queries because we
+	# get hash results instead of a hash of lists as with exec in the queries
+	# normally we should not use selectRows to execute a stored procedure,
+	# as the Datasource::selectRows() method will not grab the transaction lock,
+	# but we already called Datasource::exec() above, so we have it already.
+	# the other alternative would be to call Datasource::beginTransaction() before
+	# Datasource::selectRows()
+
+	# simple stored proc test, bind by name, returns hash
+	$x = $db.selectRows("exec find_family %v", "Smith");
+	test_value($x, family_q, "simple stored proc");
+
+	# stored proc execute with output params and select results
+	$x = $db.selectRows("declare @string varchar(40), @int int
+exec get_values_and_select :string output, :int output");
+	test_value($x, ("query":family_q,"params":params), "get_values_and_select");
+
+	# stored proc execute with output params and multiple select results
+	$x = $db.selectRows("declare @string varchar(40), @int int
+exec get_values_and_multiple_select :string output, :int output");
+	test_value($x, ("query":("query0":family_q,"query1":person_q),"params":params), "get_values_and_multiple_select");
+
+	# stored proc execute with just select results
+	$x = $db.selectRows("exec just_select");
+	test_value($x, family_q, "just_select");
+
+	# stored proc execute with multiple select results
+	$x = $db.selectRows("exec multiple_select");
+	test_value($x, ("query0":family_q,"query1":person_q), "multiple_select");
+
+	my $args = ( "null_f"          : NULL,
+		 "varchar_f"       : "varchar",
+		 "char_f"          : "char",
+		 "unichar_f"       : "unichar",
+		 "univarchar_f"    : "univarchar",
+		 "text_f"          : "test",
+		 "unitext_f"       : "test",
+		 "bit_f"           : True,
+		 "tinyint_f"       : 55,
+		 "smallint_f"      : 4285,
+		 "int_f"           : 405402,
+		 "int_f2"          : 214123498,
+		 "decimal_f"       : 500.1231,
+		 "float_f"         : 23443.234324234,
+		 "real_f"          : 213.123,
+		 "money_f"         : 3434234250.2034,
+		 "smallmoney_f"    : 211100.1012,
+		 "date_f"          : 2007-05-01,
+			 "time_f"          : 10:30:01,
+		 "datetime_f"      : 3459-01-01T11:15:02.250,
+		 "smalldatetime_f" : 2007-12-01T12:01:00,
+		 "binary_f"        : <0badbeef>,
+		 "varbinary_f"     : <feedface>,
+		 "image_f"         : <cafebead> );
+
+	# insert data
+	my $rows = $db.vexec("insert into data_test values (%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %d, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v)", hash_values($args));
+
+	my $q = $db.selectRow("select * from data_test");
+	if ($o.verbose > 1)
+	foreach my $k in (keys $q)
+		tprintf(2, " %-16s= %-10s %N\n", $k, type($q.$k), $q.$k);
+
+	# remove values where we know they won't match
+	# unitext_f is returned as IMAGE by the server
+	delete $q.unitext_f;
+	delete $args.unitext_f;
+	# rounding errors can happen in real
+	$q.real_f = round($q.real_f);
+	$args.real_f = round($args.real_f);
+
+	# compare each value
+	foreach my $k in (keys $q)
+	test_value($q.$k, $args.$k, sprintf("%s bind and retrieve", $k));
+
+	$db.commit();
+}
+
+sub freetds_test($db)
+{
+	# simple stored proc test, bind by name
+	my $x = $db.exec("exec find_family %v", "Smith");
+	test_value($x, ("name": list("Smith"), "family_id" : list(1)), "simple stored proc");
+
+	# we cannot retrieve parameters from newer SQL Servers with the approach we use;
+	# Microsoft changed the handling of the protocol and require us to use RPC calls,
+	# this will be implemented in the next version of qore where the "freetds" driver will
+	# be able to add custom methods to the Datasource class.  For now, we skip these tests
+
+	if ($db.is_sybase)
+	{
+	$x = $db.exec("declare @string varchar(40), @int int
+exec get_values :string output, :int output");
+	test_value($x, params, "get_values");
+	}
+
+	# we use Datasource::selectRows() in the following queries because we
+	# get hash results instead of a hash of lists as with exec in the queries
+	# normally we should not use selectRows to execute a stored procedure,
+	# as the Datasource::selectRows() method will not grab the transaction lock,
+	# but we already called Datasource::exec() above, so we have it already.
+	# the other alternative would be to call Datasource::beginTransaction() before
+	# Datasource::selectRows()
+
+	# simple stored proc test, bind by name, returns hash
+	$x = $db.selectRows("exec find_family %v", "Smith");
+	test_value($x, family_q, "simple stored proc");
+
+	# stored proc execute with output params and select results
+	if ($db.is_sybase)
+	{
+	$x = $db.selectRows("declare @string varchar(40), @int int
+exec get_values_and_select :string output, :int output");
+	test_value($x, ("query":family_q,"params":params), "get_values_and_select");
+
+	# stored proc execute with output params and multiple select results
+	$x = $db.selectRows("declare @string varchar(40), @int int
+exec get_values_and_multiple_select :string output, :int output");
+	test_value($x, ("query":("query0":family_q,"query1":person_q),"params":params), "get_values_and_multiple_select");
+	}
+
+	# stored proc execute with just select results
+	$x = $db.selectRows("exec just_select");
+	test_value($x, family_q, "just_select");
+
+	# stored proc execute with multiple select results
+	$x = $db.selectRows("exec multiple_select");
+	test_value($x, ("query0":family_q,"query1":person_q), "multiple_select");
+
+	# the freetds driver does not work with the following sybase column types:
+	# unichar, univarchar
+
+	my $args = ( "null_f"          : NULL,
+		 "varchar_f"       : "test",
+		 "char_f"          : "test",
+		 "text_f"          : "test",
+		 "unitext_f"       : "test",
+		 "bit_f"           : True,
+		 "tinyint_f"       : 55,
+		 "smallint_f"      : 4285,
+		 "int_f"           : 405402,
+		 "int_f2"          : 214123498,
+		 "decimal_f"       : 500.1231,
+		 "float_f"         : 23443.234324234,
+		 "real_f"          : 213.123,
+		 "money_f"         : 3434234250.2034,
+		 "smallmoney_f"    : 211100.1012,
+		 "date_f"          : 2007-05-01,
+			 "time_f"          : 10:30:01,
+		 "datetime_f"      : 3459-01-01T11:15:02.250,
+		 "smalldatetime_f" : 2007-12-01T12:01:00,
+		 "binary_f"        : <0badbeef>,
+		 "varbinary_f"     : <feedface>,
+		 "image_f"         : <cafebead> );
+
+	# remove fields not supported by sql server
+	if (!$db.is_sybase)
+	{
+	delete $args.unitext_f;
+	delete $args.date_f;
+	delete $args.time_f;
+	}
+
+	my $sql = "insert into data_test values (";
+	for (my $i; $i < elements $args; ++$i)
+	$sql += "%v, ";
+	$sql = substr($sql, 0, -2) + ")";
+
+	# insert data, using the values from the hash above
+	my $rows = $db.vexec($sql, hash_values($args));
+
+	my $q = $db.selectRow("select * from data_test");
+	if ($o.verbose > 1)
+	foreach my $k in (keys $q)
+		tprintf(2, " %-16s= %-10s %N\n", $k, type($q.$k), $q.$k);
+
+	# remove values where we know they won't match
+	# unitext_f is returned as IMAGE by the server
+	delete $q.unitext_f;
+	delete $args.unitext_f;
+	# rounding errors can happen in real
+	$q.real_f = round($q.real_f);
+	$args.real_f = round($args.real_f);
+
+	# compare each value
+	foreach my $k in (keys $q)
+	test_value($q.$k, $args.$k, sprintf("%s bind and retrieve", $k));
+
+	$db.commit();
+}
+
+sub main()
+{
+	my $test_map =
+	( "sybase" : \sybase_test(),
+	  "freetds"  : \freetds_test(),
+	  "mysql"  : \mysql_test(),
+	  "pgsql"  : \pgsql_test(),
+	  "oracle" : \oracle_test());
+
+	parse_command_line();
+	my $db = getDS();
+
+	my $driver = $db.getDriverName();
+	printf("testing %s driver\n", $driver);
+	my $sv = $db.getServerVersion();
+	if ($o.verbose > 1)
+	tprintf(2, "client version=%n\nserver version=%n\n", $db.getClientVersion(), $sv);
+
+	# determine if the server is a sybase or sql server dataserver
+	if ($driver == "freetds")
+	if ($sv !~ /microsoft/i)
+		$db.is_sybase = True;
+
+	create_datamodel($db);
+
+	context_test($db);
+	transaction_test($db);
+	my $test = $test_map.($db.getDriverName());
+	if (exists $test)
+	$test($db);
+
+	if (!$o.leave)
+	drop_test_datamodel($db);
+	printf("%d/%d tests OK\n", $test_count - $errors, $test_count);
+}
+
+main();
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-r.html b/docs/_style/prism-master/examples/prism-r.html new file mode 100644 index 0000000000..3c694189d2 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-r.html @@ -0,0 +1,38 @@ +

Comments

+
# This is a comment
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+ +

Full example

+
# Goal: To make a latex table with results of an OLS regression.
+
+# Get an OLS --
+x1 = runif(100)
+x2 = runif(100, 0, 2)
+y = 2 + 3*x1 + 4*x2 + rnorm(100)
+m = lm(y ~ x1 + x2)
+
+# and print it out prettily --
+library(xtable)
+# Bare --
+xtable(m)
+xtable(anova(m))
+
+# Better --
+print.xtable(xtable(m, caption="My regression",
+                    label="t:mymodel",
+                    digits=c(0,3,2,2,3)),
+             type="latex",
+             file="xtable_demo_ols.tex",
+             table.placement = "tp",
+             latex.environments=c("center", "footnotesize"))
+
+print.xtable(xtable(anova(m),
+                    caption="ANOVA of my regression",
+                    label="t:anova_mymodel"),
+             type="latex",
+             file="xtable_demo_anova.tex",
+             table.placement = "tp",
+             latex.environments=c("center", "footnotesize"))
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-reason.html b/docs/_style/prism-master/examples/prism-reason.html new file mode 100644 index 0000000000..8842f24c6e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-reason.html @@ -0,0 +1,35 @@ +

Comments

+
/* This is a comment */
+ +

Strings and characters

+
"This is a \"string\""
+'a'
+'\\'
+'\o123'
+'\x4a'
+ +

Constructors

+
type response =
+  | Yes
+  | No
+  | PrettyMuch;
+ +

Example

+
type car = {maker: string, model: string};
+type carList =
+  | List car carList
+  | NoMore;
+
+let chevy = {maker: "Chevy", model: "Suburban"};
+let toyota = {maker: "Toyota", model: "Tacoma"};
+let myCarList = List chevy (List toyota NoMore);
+
+let hasExactlyTwoCars = fun lst =>
+  switch lst {
+    | NoMore => false                              /* 0 */
+    | List p NoMore => false                       /* 1 */
+    | List p (List p2 NoMore) => true              /* 2 */
+    | List p (List p2 (List p3 theRest)) => false  /* 3+ */
+  };
+
+let justTwo = hasExactlyTwoCars myCarList;  /* true! */
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-renpy.html b/docs/_style/prism-master/examples/prism-renpy.html new file mode 100644 index 0000000000..dffac07c4b --- /dev/null +++ b/docs/_style/prism-master/examples/prism-renpy.html @@ -0,0 +1,123 @@ +

Comments

+
+    # This is a comment
+
+ +

Strings

+
+    "foo \"bar\" baz"
+'foo \'bar\' baz'
+""" "Multi-line" strings
+are supported."""
+''' 'Multi-line' strings
+are supported.'''
+
+ +

Python

+
+    class Dog:
+
+    tricks = []             # mistaken use of a class variable
+
+    def __init__(self, name):
+        self.name = name
+
+    def add_trick(self, trick):
+        self.tricks.append(trick)
+
+ +

Properties

+
+    style my_text is text:
+    size 40
+    font "gentium.ttf"
+
+ +

Configuration

+
+    init -1:
+    python hide:
+
+        ## Should we enable the use of developer tools? This should be
+        ## set to False before the game is released, so the user can't
+        ## cheat using developer tools.
+
+        config.developer = True
+
+        ## These control the width and height of the screen.
+
+        config.screen_width = 800
+        config.screen_height = 600
+
+        ## This controls the title of the window, when Ren'Py is
+        ## running in a window.
+
+        config.window_title = u"The Question"
+
+ + +

Full example

+
# Declare images used by this game.
+image bg lecturehall = "lecturehall.jpg"
+image bg uni = "uni.jpg"
+image bg meadow = "meadow.jpg"
+image bg club = "club.jpg"
+
+image sylvie normal = "sylvie_normal.png"
+image sylvie giggle = "sylvie_giggle.png"
+image sylvie smile = "sylvie_smile.png"
+image sylvie surprised = "sylvie_surprised.png"
+
+image sylvie2 normal = "sylvie2_normal.png"
+image sylvie2 giggle = "sylvie2_giggle.png"
+image sylvie2 smile = "sylvie2_smile.png"
+image sylvie2 surprised = "sylvie2_surprised.png"
+
+# Define characters used by this game.
+define s = Character('Sylvie', color="#c8ffc8")
+define m = Character('Me', color="#c8c8ff")
+
+
+# The game starts here.
+label start:
+
+    $ bl_game = False
+
+    play music "illurock.ogg"
+
+    scene bg lecturehall
+    with fade
+
+    "Well, professor Eileen's lecture was interesting."
+    "But to be honest, I couldn't concentrate on it very much."
+    "I had a lot of other thoughts on my mind."
+    "And they all ended up with a question."
+    "A question, I've been meaning to ask someone."
+
+    scene bg uni
+    with fade
+
+    "When we came out of the university, I saw her."
+
+    show sylvie normal
+    with dissolve
+
+    "She was a wonderful person."
+    "I've known her ever since we were children."
+    "And she's always been a good friend."
+    "But..."
+    "Recently..."
+    "I think..."
+    "... that I wanted more."
+    "More just talking... more than just walking home together when our classes ended."
+    "And I decided..."
+
+    menu:
+
+        "... to ask her right away.":
+
+            jump rightaway
+
+        "... to ask her later.":
+
+            jump later
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-rest.html b/docs/_style/prism-master/examples/prism-rest.html new file mode 100644 index 0000000000..511e87c9e1 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-rest.html @@ -0,0 +1,329 @@ +

Titles

+
===============
+ Section Title
+===============
+
+---------------
+ Section Title
+---------------
+
+Section Title
+=============
+
+Section Title
+-------------
+
+Section Title
+`````````````
+
+Section Title
+'''''''''''''
+
+Section Title
+.............
+
+Section Title
+~~~~~~~~~~~~~
+
+Section Title
+*************
+
+Section Title
++++++++++++++
+
+Section Title
+^^^^^^^^^^^^^
+ +

Lists

+
- This is the first bullet list item.
+- This is the first paragraph in the second item in the list.
+
+  This is the second paragraph in the second item in the list.
+
+  - This is a sublist.  The bullet lines up with the left edge of
+    the text blocks above.
+
+- This is the third item of the main list.
+
+This paragraph is not part of the list.
+
+1. Item 1 initial text.
+
+   a) Item 1a.
+   b) Item 1b.
+
+2. a) Item 2a.
+   b) Item 2b.
+ +

Field lists

+
:Date: 2001-08-16
+:Version: 1
+:Authors: - Me
+          - Myself
+          - I
+:Indentation: Since the field marker may be quite long, the second
+   and subsequent lines of the field body do not have to line up
+   with the first line, but they must be indented relative to the
+   field name marker, and they must line up with each other.
+:Parameter i: integer
+ +

Option lists

+
-a         Output all.
+-b         Output both (this description is
+           quite long).
+-c arg     Output just arg.
+--long     Output all day long.
+
+-p         This option has two paragraphs in the description.
+           This is the first.
+
+           This is the second.  Blank lines may be omitted between
+           options (as above) or left in (as here and below).
+
+--very-long-option  A VMS-style option.  Note the adjustment for
+                    the required two spaces.
+
+--an-even-longer-option
+           The description can also start on the next line.
+
+-2, --two  This option has two variants.
+
+-f FILE, --file=FILE  These two options are synonyms; both have
+                      arguments.
+
+/V         A VMS/DOS-style option.
+ +

Literal blocks

+
::
+
+    for a in [5,4,3,2,1]:   # this is program code, shown as-is
+        print a
+    print "it's..."
+    # a literal block continues until the indentation ends
+
+John Doe wrote::
+
+>> *Great* idea!
+>
+> Why didn't I think of that?
+
+You just did!  ;-)
+ +

Line blocks

+
| Lend us a couple of bob till Thursday.
+| I'm absolutely skint.
+| But I'm expecting a postal order and I can pay you back
+  as soon as it comes.
+| Love, Ewan.
+
+Take it away, Eric the Orchestra Leader!
+
+    | A one, two, a one two three four
+    |
+    | Half a bee, philosophically,
+    |     must, *ipso facto*, half not be.
+    | But half the bee has got to be,
+    |     *vis a vis* its entity.  D'you see?
+    |
+    | But can a bee be said to be
+    |     or not to be an entire bee,
+    |         when half the bee is not a bee,
+    |             due to some ancient injury?
+    |
+    | Singing...
+ +

Grid tables and simple tables

+
+------------------------+------------+----------+----------+
+| Header row, column 1   | Header 2   | Header 3 | Header 4 |
+| (header rows optional) |            |          |          |
++========================+============+==========+==========+
+| body row 1, column 1   | column 2   | column 3 | column 4 |
++------------------------+------------+----------+----------+
+| body row 2             | Cells may span columns.          |
++------------------------+------------+---------------------+
+| body row 3             | Cells may  | - Table cells       |
++------------------------+ span rows. | - contain           |
+| body row 4             |            | - body elements.    |
++------------------------+------------+---------------------+
+
+	+--------------+----------+-----------+-----------+
+	| row 1, col 1 | column 2 | column 3  | column 4  |
+	+--------------+----------+-----------+-----------+
+	| row 2        |                                  |
+	+--------------+----------+-----------+-----------+
+	| row 3        |          |           |           |
+	+--------------+----------+-----------+-----------+
+
+=====  =====  =======
+  A      B    A and B
+=====  =====  =======
+False  False  False
+True   False  False
+False  True   False
+True   True   True
+=====  =====  =======
+
+	=====  =====  ======
+	   Inputs     Output
+	------------  ------
+	  A      B    A or B
+	=====  =====  ======
+	False  False  False
+	True   False  True
+	False  True   True
+	True   True   True
+	=====  =====  ======
+ +

Footnotes and links

+
.. [1] Body elements go here.
+
+If [#note]_ is the first footnote reference, it will show up as
+"[1]".  We can refer to it again as [#note]_ and again see
+"[1]".  We can also refer to it as note_ (an ordinary internal
+hyperlink reference).
+
+.. [#note] This is the footnote labeled "note".
+
+Here is a symbolic footnote reference: [*]_.
+
+.. [*] This is the footnote.
+
+[2]_ will be "2" (manually numbered),
+[#]_ will be "3" (anonymous auto-numbered), and
+[#label]_ will be "1" (labeled auto-numbered).
+
+.. [2] This footnote is labeled manually, so its number is fixed.
+
+.. [#label] This autonumber-labeled footnote will be labeled "1".
+   It is the first auto-numbered footnote and no other footnote
+   with label "1" exists.  The order of the footnotes is used to
+   determine numbering, not the order of the footnote references.
+
+.. [#] This footnote will be labeled "3".  It is the second
+   auto-numbered footnote, but footnote label "2" is already used.
+
+Here is a citation reference: [CIT2002]_.
+
+.. [CIT2002] This is the citation.  It's just like a footnote,
+   except the label is textual.
+
+.. _hyperlink-name: link-block
+
+.. __: anonymous-hyperlink-target-link-block
+
+__ anonymous-hyperlink-target-link-block
+
+Clicking on this internal hyperlink will take us to the target_
+below.
+
+.. _target:
+
+The hyperlink target above points to this paragraph.
+ +

Directives

+
.. image:: mylogo.jpeg
+
+.. figure:: larch.png
+
+   The larch.
+
+.. note:: This is a paragraph
+
+   - Here is a bullet list.
+
+.. figure:: picture.png
+   :scale: 50 %
+   :alt: map to buried treasure
+
+   This is the caption of the figure (a simple paragraph).
+
+   The legend consists of all elements after the caption.  In this
+   case, the legend consists of this paragraph and the following
+   table:
+
+   +-----------------------+-----------------------+
+   | Symbol                | Meaning               |
+   +=======================+=======================+
+   | .. image:: tent.png   | Campground            |
+   +-----------------------+-----------------------+
+   | .. image:: waves.png  | Lake                  |
+   +-----------------------+-----------------------+
+   | .. image:: peak.png   | Mountain              |
+   +-----------------------+-----------------------+
+ +

Substitutions

+
The |biohazard| symbol must be used on containers used to
+dispose of medical waste.
+
+.. |biohazard| image:: biohazard.png
+
+|Michael| and |Jon| are our widget-wranglers.
+
+.. |Michael| user:: mjones
+.. |Jon|     user:: jhl
+
+West led the |H| 3, covered by dummy's |H| Q, East's |H| K,
+and trumped in hand with the |S| 2.
+
+.. |H| image:: /images/heart.png
+   :height: 11
+   :width: 11
+.. |S| image:: /images/spade.png
+   :height: 11
+   :width: 11
+
+* |Red light| means stop.
+* |Green light| means go.
+* |Yellow light| means go really fast.
+
+.. |Red light|    image:: red_light.png
+.. |Green light|  image:: green_light.png
+.. |Yellow light| image:: yellow_light.png
+ +

Comments

+
.. This is a comment
+
+..
+   _so: is this!
+
+..
+   [and] this!
+
+..
+   this:: too!
+
+..
+   |even| this:: !
+ +

Inline markup

+
This is *emphasized text*.
+This is **strong text**.
+This is `interpreted text`.
+:role:`interpreted text`
+`interpreted text`:role:
+This text is an example of ``inline literals``.
+The regular expression ``[+-]?(\d+(\.\d*)?|\.\d+)`` matches
+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?
+ +

Known failures

+

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. +

+ +

Nothing is highlighted inside table cells

+
+---------------+----------+
+| column 1     | column 2  |
++--------------+-----------+
+| **bold**?    | *italic*? |
++--------------+-----------+
+ +

The inline markup recognition rules are not as strict as they are in the spec

+

No inline markup should be highlighted in the following code.

+
2 * x a ** b (* BOM32_* ` `` _ __ |
+"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-rip.html b/docs/_style/prism-master/examples/prism-rip.html new file mode 100644 index 0000000000..99769c3b3b --- /dev/null +++ b/docs/_style/prism-master/examples/prism-rip.html @@ -0,0 +1,12 @@ +

Comments

+
# This is a comment
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+ +

Regex

+
regular_expression = /abc/
+ +

Symbols

+
string_symbol = :rip 
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-roboconf.html b/docs/_style/prism-master/examples/prism-roboconf.html new file mode 100644 index 0000000000..ca57221e79 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-roboconf.html @@ -0,0 +1,49 @@ +

Full example

+
ApacheServer {
+    # Apache instances will be deployed by Roboconf's Puppet extension
+    installer: puppet;
+
+    # Web applications could be deployed over this Apache server
+    children: My-Dash-Board, Marketing-Suite;
+
+    # Properties exported by this component.
+    # 'port' should have a default value, or we will have to set it when we create an instance.
+    exports: port = 19099;
+
+    # 'ip' is a special variable. It will be updated at runtime by a Roboconf agent.
+    exports: ip;
+
+    # Other components properties that this server needs to have so that it can start.
+    imports: LB.port (optional), LB.ip (optional);
+
+    # Here, the Apache may also be notified about components instances of type LB.
+    # The imports are marked as optional. It means that if there is no LB instance, an
+    # Apache instance will be able to start anyway.
+    #
+    # If the import was not optional, e.g.
+    #
+    # imports: LB.port, LB.ip;
+    # or even
+    # imports: LB.port (optional), LB.ip;
+    #
+    # ... then an Apache instance would need at least one LB instance somewhere.
+
+    # Imports may also reference variables from other applications
+    imports: external Lamp.lb-ip;
+}
+
+facet LoadBalanced {
+    exports: ip, port;  # Define we export two variables.
+}
+
+instance of VM {
+
+    # This will create 5 VM instances, called VM 1, VM 2, VM3, VM 4 and VM 5.
+    name: VM ;  # Yes, there is a space at the end... :)
+    count: 5;
+
+    # On every VM instance, we will deploy...
+    instance of Tomcat {
+        name: Tomcat;
+    }
+}
diff --git a/docs/_style/prism-master/examples/prism-ruby.html b/docs/_style/prism-master/examples/prism-ruby.html new file mode 100644 index 0000000000..4f1e3906f7 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-ruby.html @@ -0,0 +1,30 @@ +

Comments

+
# This is a comment
+=begin
+Multi-line
+comment
+=end
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+ +

Regular expressions

+
/foo?[ ]*bar/
+ +

Variables

+
$foo = 5;
+class InstTest
+  def set_foo(n)
+    @foo = n
+  end
+  def set_bar(n)
+    @bar = n
+  end
+end
+ +

Symbols

+
mystring = :steveT;
+ +

String Interpolation

+
"foo #{'bar'+my_variable}"
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-rust.html b/docs/_style/prism-master/examples/prism-rust.html new file mode 100644 index 0000000000..d447968423 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-rust.html @@ -0,0 +1,68 @@ +

Comments

+
// Single line comment
+/// Doc comments
+/* Multiline
+comment */
+ +

Strings

+
'C'; '\''; '\n'; '\u7FFF'; // Characters
+"foo \"bar\" baz"; // String
+r##"foo #"bar"# baz"##; // Raw string with # pairs
+b'C'; b'\''; b'\n'; // Bytes
+b"foo \"bar\" baz"; // Byte string
+br##"foo #"bar"# baz"##; // Raw byte string with # pairs
+
+ +

Numbers

+
123i;                              // type int
+123u;                              // type uint
+123_u;                             // type uint
+0xff_u8;                           // type u8
+0o70_i16;                          // type i16
+0b1111_1111_1001_0000_i32;         // type i32
+
+123.0f64;        // type f64
+0.1f64;          // type f64
+0.1f32;          // type f32
+12E+99_f64;      // type f64
+
+ +

Booleans

+
true; false;
+ +

Functions and macros

+
println!("x is {}", x);
+fn next_two(x: int) -> (int, int) { (x + 1i, x + 2i) }
+next_two(5i);
+vec![1i, 2, 3];
+
+ +

Attributes

+
#![warn(unstable)]
+#[test]
+fn a_test() {
+	// ...
+}
+ +

Closure parameters and bitwise OR

+
let x = a | b;
+let y = c || d;
+let add_one = |x: int| -> int { 1i + x };
+let printer = || { println!("x is: {}", x); };
+
+ +

Known failures

+

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. +

+ +

Nested block comments

+
/* Nested block
+	/* comments
+	are */
+not supported */
+ +

Delimiters of parameters for closures that don't use braces

+
|x| x + 1i;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-sas.html b/docs/_style/prism-master/examples/prism-sas.html new file mode 100644 index 0000000000..8932ebb036 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-sas.html @@ -0,0 +1,158 @@ +

Comments

+
/* This is a
+multi-line comment */
+
+* This is a comment too;
+ +

Numbers, dates and times

+
42; 4.5; 4.5e-10; -3; -3.5e2; -4.2e-23;
+0afx; 0123x; abcdefx;
+'1jan2013'd; '01jan09'd;
+'9:25't; '9:25:19pm't;
+'01may12:9:30:00'dt; '18jan2003:9:27:05am'dt;
+'2013-05-17T09:15:30–05:00'dt; '2013-05-17T09:15:30–05'dt;
+'2013-07-20T12:00:00+00:00'dt; '2013-07-20T12:00:00Z'dt;
+ +

Strings

+
'Single quoted string';
+"Double quoted string";
+'String ''quoted'' string "containing" quote';
+"Double ""quoted"" string 'containing' quote";
+ +

Operators

+
A**B;
+'foo'||'bar'!!'baz'¦¦'test';
+A<>B><C;
+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;
+state in ('NY','NJ','PA');
+not a;
+ +

More examples

+
/* Some examples adapted from the documentation (http://support.sas.com/documentation/cdl/en/basess/64003/PDF/default/basess.pdf) */
+
+data city; * another inline comment;
+
+	input Year 4. @7 ServicesPolice comma6.
+		@15 ServicesFire comma6. @22 ServicesWater_Sewer comma6.
+		@30 AdminLabor comma6. @39 AdminSupplies comma6.
+		@45 AdminUtilities comma6.;
+	ServicesTotal=ServicesPolice+ServicesFire+ServicesWater_Sewer;
+	AdminTotal=AdminLabor+AdminSupplies+AdminUtilities;
+	Total=ServicesTotal+AdminTotal;
+
+	Test='A string '' whith a quote';
+	Test2 = "A string "" whith a quote";
+
+	label   Total='Total Outlays'
+			ServicesTotal='Services: Total'
+			ServicesPolice='Services: Police'
+			ServicesFire='Services: Fire'
+			ServicesWater_Sewer='Services: Water & Sewer'
+			AdminTotal='Administration: Total'
+			AdminLabor='Administration: Labor'
+			AdminSupplies='Administration: Supplies'
+			AdminUtilities='Administration: Utilities';
+	datalines;
+1993 2,819 1,120 422 391 63 98
+1994 2,477 1,160 500 172 47 70
+1995 2,028 1,061 510 269 29 79
+1996 2,754 893 540 227 21 67
+1997 2,195 963 541 214 21 59
+1998 1,877 926 535 198 16 80
+1999 1,727 1,111 535 213 27 70
+2000 1,532 1,220 519 195 11 69
+2001 1,448 1,156 577 225 12 58
+2002 1,500 1,076 606 235 19 62
+2003 1,934 969 646 266 11 63
+2004 2,195 1,002 643 256 24 55
+2005 2,204 964 692 256 28 70
+2006 2,175 1,144 735 241 19 83
+2007 2,556 1,341 813 238 25 97
+2008 2,026 1,380 868 226 24 97
+2009 2,526 1,454 946 317 13 89
+2010 2,027 1,486 1,043 226 . 82
+2011 2,037 1,667 1,152 244 20 88
+2012 2,852 1,834 1,318 270 23 74
+2013 2,787 1,701 1,317 307 26 66
+;
+proc datasets library=work nolist
+;
+contents data=city
+;
+run;
+
+
+data city3;
+	set city(firstobs=10 obs=15);
+run;
+
+data services (keep=ServicesTotal ServicesPolice ServicesFire
+				ServicesWater_Sewer)
+	admin (keep=AdminTotal AdminLabor AdminSupplies
+			AdminUtilities);
+	set city(drop=Total);
+run;
+proc print data=services;
+	title 'City Expenditures: Services';
+run;
+
+data newlength;
+	set mylib.internationaltours;
+	length Remarks $ 30;
+	if Vendor = 'Hispania' then Remarks = 'Bonus for 10+ people';
+	else if Vendor = 'Mundial' then Remarks = 'Bonus points';
+	else if Vendor = 'Major' then Remarks = 'Discount for 30+ people';
+run;
+proc print data=newlength;
+	var Country Vendor Remarks;
+	title 'Information About Vendors';
+run;
+
+libname mylib 'permanent-data-library';
+data mylib.departures;
+	input Country $ 1-9 CitiesInTour 11-12 USGate $ 14-26
+	ArrivalDepartureGates $ 28-48;
+	datalines;
+Japan 5 San Francisco Tokyo, Osaka
+Italy 8 New York Rome, Naples
+Australia 12 Honolulu Sydney, Brisbane
+Venezuela 4 Miami Caracas, Maracaibo
+Brazil 4 Rio de Janeiro, Belem
+;
+proc print data=mylib.departures;
+	title 'Data Set AIR.DEPARTURES';
+run;
+
+data missingval;
+	length Country $ 10 TourGuide $ 10;
+	input Country TourGuide;
+	* lines is an alias for datalines;
+	lines;
+Japan Yamada
+Italy Militello
+Australia Edney
+Venezuela .
+Brazil Cardoso
+;
+
+data inventory_tool;
+	input PartNumber $ Description $ InStock @17
+		ReceivedDate date9. @27 Price;
+	format ReceivedDate date9.;
+	* cards is an alias for datalines;
+	cards;
+K89R seal 34 27jul2010 245.00
+M4J7 sander 98 20jun2011 45.88
+LK43 filter 121 19may2011 10.99
+MN21 brace 43 10aug2012 27.87
+BC85 clamp 80 16aug2012 9.55
+NCF3 valve 198 20mar2012 24.50
+KJ66 cutter 6 18jun2010 19.77
+UYN7 rod 211 09sep2010 11.55
+JD03 switch 383 09jan2013 13.99
+BV1E timer 26 03aug2013 34.50
+;
+run;
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-sass.html b/docs/_style/prism-master/examples/prism-sass.html new file mode 100644 index 0000000000..7200e789cc --- /dev/null +++ b/docs/_style/prism-master/examples/prism-sass.html @@ -0,0 +1,47 @@ +

Comments

+
/* This comment will appear in the CSS output.
+  This is nested beneath the comment,
+  so it's part of it
+
+// This comment will not appear in the CSS output.
+  This is nested beneath the comment as well,
+  so it also won't appear
+ +

At-rules and shortcuts

+
@mixin large-text
+  color: #ff0000
+
+@media (min-width: 600px)
+  h1
+    @include large-text
+
+=large-text
+  color: #ff0000
+
+h1
+  +large-text
+ +

Variables

+
$width: 5em
+#main
+  width: $width
+
+ +

Known failures

+

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. +

+ +

Deprecated Sass syntax is not supported

+
.page
+  color = 5px + 9px
+
+!width = 13px
+.icon
+  width = !width
+ +

Selectors with pseudo classes are highlighted as property/value pairs

+
a:hover
+  text-decoration: underline
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-scala.html b/docs/_style/prism-master/examples/prism-scala.html new file mode 100644 index 0000000000..1dc56f8714 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-scala.html @@ -0,0 +1,100 @@ +

Comments

+
// Single line comment
+/* Mutli-line
+comment */
+ +

Strings and characters

+
'a'
+"foo bar baz"
+"""Multi-line
+string"""
+ +

Numbers

+
0
+21
+0xFFFFFFFF
+-42L
+0.0
+1e30f
+3.14159f
+1.0e-100
+.1
+
+ +

Symbols

+
'x
+'identifier
+ +

Full example

+
// Contributed by John Williams
+package examples
+
+object lazyLib {
+
+  /** Delay the evaluation of an expression until it is needed. */
+  def delay[A](value: => A): Susp[A] = new SuspImpl[A](value)
+
+  /** Get the value of a delayed expression. */
+  implicit def force[A](s: Susp[A]): A = s()
+
+  /**
+   * Data type of suspended computations. (The name froms from ML.)
+   */
+  abstract class Susp[+A] extends Function0[A]
+
+  /**
+   * Implementation of suspended computations, separated from the
+   * abstract class so that the type parameter can be invariant.
+   */
+  class SuspImpl[A](lazyValue: => A) extends Susp[A] {
+    private var maybeValue: Option[A] = None
+
+    override def apply() = maybeValue match {
+      case None =>
+        val value = lazyValue
+        maybeValue = Some(value)
+        value
+	  case Some(value) =>
+        value
+    }
+
+    override def toString() = maybeValue match {
+      case None => "Susp(?)"
+      case Some(value) => "Susp(" + value + ")"
+    }
+  }
+}
+
+object lazyEvaluation {
+  import lazyLib._
+
+  def main(args: Array[String]) = {
+    val s: Susp[Int] = delay { println("evaluating..."); 3 }
+
+    println("s     = " + s)       // show that s is unevaluated
+    println("s()   = " + s())     // evaluate s
+    println("s     = " + s)       // show that the value is saved
+    println("2 + s = " + (2 + s)) // implicit call to force()
+
+    val sl = delay { Some(3) }
+    val sl1: Susp[Some[Int]] = sl
+    val sl2: Susp[Option[Int]] = sl1   // the type is covariant
+
+    println("sl2   = " + sl2)
+    println("sl2() = " + sl2())
+    println("sl2   = " + sl2)
+  }
+}
+ +

Known failures

+

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. +

+ +

Nested block comments

+
/* Nested block
+	/* comments
+	are */
+not supported */
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-scheme.html b/docs/_style/prism-master/examples/prism-scheme.html new file mode 100644 index 0000000000..de50f2267c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-scheme.html @@ -0,0 +1,35 @@ +

Comments

+
; This is a comment
+ +

Booleans

+
#t
+#f
+ +

Strings

+
"two \"quotes\" within"
+ +

Functions

+
(lambda (x) (+ x 3))
+(apply vector 'a 'b '(c d e))
+
+ +

Full example

+
;; Calculation of Hofstadter's male and female sequences as a list of pairs
+
+(define (hofstadter-male-female n)
+  (letrec ((female (lambda (n)
+		     (if (= n 0)
+			 1
+			 (- n (male (female (- n 1)))))))
+	   (male (lambda (n)
+		   (if (= n 0)
+		       0
+		       (- n (female (male (- n 1))))))))
+    (let loop ((i 0))
+      (if (> i n)
+	  '()
+	  (cons (cons (female i)
+		      (male i))
+		(loop (+ i 1)))))))
+
+(hofstadter-male-female 8)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-scss.html b/docs/_style/prism-master/examples/prism-scss.html new file mode 100644 index 0000000000..f0daaf577d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-scss.html @@ -0,0 +1,31 @@ +

Comments

+
// Single line comment
+/* Multi-line
+comment */
+ +

At-rules

+
@import "foo.scss";
+@media (min-width: 600px) {}
+.seriousError {
+    @extend .error;
+}
+@for $i from 1 through 3 {}
+
+ +

Compass URLs

+
@font-face {
+	font-family: "opensans";
+	src: font-url("opensans.ttf");
+}
+ +

Variables

+
$width: 5em;
+#main {
+    width: $width;
+}
+ +

Interpolations are highlighted in property names

+
p.#{$name} {
+    #{$attr}-color: blue;
+}
+
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-smalltalk.html b/docs/_style/prism-master/examples/prism-smalltalk.html new file mode 100644 index 0000000000..7fb70f8f7c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-smalltalk.html @@ -0,0 +1,92 @@ +

Numbers

+
3
+30.45
+-3
+0.005
+-14.0
+13772
+8r377
+8r153
+8r34.1
+8r-37
+16r106
+16rFF
+16rAC.DC
+16r-1.C
+1.586e5
+1.586e-3
+8r3e2
+2r11e6
+ +

Strings and characters

+
$a
+$M
+$-
+$$
+$1
+'hi'
+'food'
+'the Smalltalk-80 system'
+'can''t'
+ +

Symbols

+
#bill
+#M63
+#+
+#*
+ +

Arrays

+
#(1 2 3)
+#('food' 'utilities' 'rent' 'household' 'transportation' 'taxes' 'recreation')
+#(('one' 1) ('not' 'negative') 0 -1)
+#(9 'nine' $9 (0 'zero' $0 ( ) 'e' $f 'g' $h 'i'))
+ +

Blocks

+
sum := 0.
+#(2 3 5 7 11) do: [ :primel | sum := sum + (prime * prime)]
+
+sizeAdder := [ :array | total := total + array size].
+
+[ :x :y | (x * x) + (y * y)]
+[ :frame :clippingBox | frame intersect: clippingBox]
+ +

Full example

+
Object>>method: num
+    "comment 123"
+    | var1 var2 |
+    (1 to: num) do: [:i | |var| ^i].
+    Klass with: var1.
+    Klass new.
+    arr := #('123' 123.345 #hello Transcript var $@).
+    arr := #().
+    var2 = arr at: 3.
+    ^ self abc
+
+heapExample
+    "HeapTest new heapExample"
+    "Multiline
+    decription"
+    | n rnd array time sorted |
+    n := 5000.
+    "# of elements to sort"
+    rnd := Random new.
+    array := (1 to: n)
+                collect: [:i | rnd next].
+    "First, the heap version"
+    time := Time
+                millisecondsToRun: [sorted := Heap withAll: array.
+    1
+        to: n
+        do: [:i |
+            sorted removeFirst.
+            sorted add: rnd next]].
+    Transcript cr; show: 'Time for Heap: ' , time printString , ' msecs'.
+    "The quicksort version"
+    time := Time
+                millisecondsToRun: [sorted := SortedCollection withAll: array.
+    1
+        to: n
+        do: [:i |
+            sorted removeFirst.
+            sorted add: rnd next]].
+    Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-smarty.html b/docs/_style/prism-master/examples/prism-smarty.html new file mode 100644 index 0000000000..5e57922fa4 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-smarty.html @@ -0,0 +1,81 @@ +

Comments

+
{* This is a comment with <p>some markup</p> in it *}
+{* Multi-line
+comment *}
+ +

Variables

+
{$foo}
+{$foo.bar}
+{$foo.$bar}
+{$foo[$bar]}
+{$foo->bar}
+{$foo->bar()}
+{#foo#}
+{$smarty.config.foo}
+{$foo[bar]}
+
+ +

Strings and numbers

+
{$foo[4]}
+{$foo['bar']}
+ +

Tags and filters

+
{assign var=foo value='baa'}
+{include file='header.tpl'}
+{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
+{$title|truncate:40:'...'}
+{$myArray|@count}
+
+{math equation="height * width / division"
+   height=$row_height
+   width=$row_width
+   division=#col_div#}
+ +

Control flow

+ +
{if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#}
+   ...
+{/if}
+{if count($var) gt 0}{/if}
+{if $var is even by 3}
+   ...
+{/if}
+
+{foreach from=$myArray item=i name=foo}
+	{$smarty.foreach.foo.index}|{$smarty.foreach.foo.iteration},
+{/foreach}
+
+<ul>
+{foreach from=$items key=myId item=i}
+  <li><a href="item.php?id={$myId}">{$i.no}: {$i.label}</li>
+{/foreach}
+</ul>
+
+ +

Literal section

+
{literal}
+	<script>
+		(function() { /* This is JS, not Smarty */ } ());
+	</script>
+{/literal}
+
+<style type="text/css">
+{literal}
+/* this is an intersting idea for this section */
+.madIdea{
+    border: 3px outset #ffffff;
+    margin: 2 3 4 5px;
+    background-color: #001122;
+}
+{/literal}
+</style>
+ +

Known failures

+

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. +

+ +

Smarty tag in the middle of an HTML tag

+
<div{if $test} class="test"{/if}></div>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-soy.html b/docs/_style/prism-master/examples/prism-soy.html new file mode 100644 index 0000000000..648b8e5f91 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-soy.html @@ -0,0 +1,36 @@ +

Comments

+
/* Multi-line
+comment */
+// This is a comment with <p>some markup</p> in it
+ +

Variable

+
{$name}
+{$folders[0]['name']}
+{$aaa?.bbb.ccc?[0]}
+ +

Commands

+
{template .helloNames}
+  // Greet the person.
+  {call .helloName data="all" /}
+ // Greet the additional people. + {foreach $additionalName in $additionalNames} + {call .helloName} + {param name: $additionalName /} + {/call} + {if not isLast($additionalName)} + <br> // break after every line except the last + {/if} + {ifempty} + No additional people to greet. + {/foreach} +{/template}
+ +

Functions and print directives

+
{if length($items) > 5}
+{$foo|changeNewlineToBr}
+{$bar|truncate: 4, false}
+ +

Literal section

+
{literal}
+This is not a {$variable}
+{/literal}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-sql.html b/docs/_style/prism-master/examples/prism-sql.html new file mode 100644 index 0000000000..6fe9977523 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-sql.html @@ -0,0 +1,34 @@ +

Comments

+
# Single line comment
+-- Single line comment
+// Single line comment
+/* Multi-line
+comment */
+ +

Strings

+
"foo \"bar\" baz"
+'foo \'bar\' baz'
+"Multi-line strings
+are supported"
+'Multi-line strings
+are supported'
+ +

Variables

+
SET @variable = 1;
+SET @$_ = 2;
+SET @"quoted-variable" = 3;
+SET @'quoted-variable' = 3;
+SET @`quoted-variable` = 3;
+ +

Operators

+
SELECT 1 && 1;
+SELECT 1 OR NULL;
+SELECT 5 & 2*3;
+SELECT 2 BETWEEN 1 AND 3;
+ +

Functions and keywords

+
SELECT COUNT(*) AS cpt, MAX(t.pos) AS max_pos
+FROM `my_table`
+LEFT JOIN `other_table` AS t
+WHERE `somecol` IS NOT NULL
+ORDER BY t.other_col DESC
diff --git a/docs/_style/prism-master/examples/prism-stylus.html b/docs/_style/prism-master/examples/prism-stylus.html new file mode 100644 index 0000000000..2b8ffdca91 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-stylus.html @@ -0,0 +1,72 @@ +

Full Example

+
/*!
+ * Adds the given numbers together.
+ */
+/*
+ * Adds the given numbers together.
+ */
+// I'm a comment!
+body {
+	font: 12px Helvetica, Arial, sans-serif;
+}
+a.button {
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;
+}
+
+body
+	font: 12px Helvetica, Arial, sans-serif;
+
+a.button:after
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;
+
+body
+	font: 12px Helvetica, Arial, sans-serif
+
+a.link > button#test, input[type=button], a:after
+	-webkit-border-radius: 5px
+	-moz-border-radius: 5px
+	border-radius: 5px
+
+font-size = 14px
+font = font-size "Lucida Grande", Arial
+
+body {
+	padding: 50px;
+	font: 14px/1.4 fonts;
+}
+
+border-radius()
+	-webkit-border-radius arguments
+	-moz-border-radius arguments
+	border-radius arguments
+
+body
+	font 12px Helvetica, Arial, sans-serif
+
+a.button
+	border-radius(5px)
+
+@media (max-width: 30em) {
+	body {
+		color: #fff;
+	}
+}
+
+@media (max-width: 500px)
+	.foo
+		color: #000
+
+	@media (min-width: 100px), (min-height: 200px)
+		.foo
+			color: #100
+
+sum(nums...)
+	sum = 0
+	sum += n for n in nums
+
+sum(1 2 3 4)
+// => 10
diff --git a/docs/_style/prism-master/examples/prism-swift.html b/docs/_style/prism-master/examples/prism-swift.html new file mode 100644 index 0000000000..98d6eb55e2 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-swift.html @@ -0,0 +1,80 @@ +

Comments

+
// this is a comment
+/* this is also a comment,
+but written over multiple lines */
+
+ +

Numbers

+
42
+-23
+3.14159
+0.1
+-273.15
+1.25e-2
+0xC.3p0
+1_000_000
+1_000_000.000_000_1
+ +

Strings

+
let someString = "Some string literal value"
+var emptyString = ""
+// String interpolation
+let multiplier = 3
+"\(multiplier) times 2.5 is \(Double(multiplier) * 2.5)"
+ +

Control flow

+
for index in 1...5 {
+	println("\(index) times 5 is \(index * 5)")
+}
+for _ in 1...power {
+	answer *= base
+}
+while square < finalSquare {
+	// roll the dice
+	if ++diceRoll == 7 { diceRoll = 1 }
+	// move by the rolled amount
+	square += diceRoll
+	if square < board.count {
+		// if we're still on the board, move up or down for a snake or a ladder
+		square += board[square]
+	}
+}
+switch someCharacter {
+	case "a", "e", "i", "o", "u":
+		println("\(someCharacter) is a vowel")
+	case "b", "c", "d", "f", "g", "h", "j", "k", "l", "m",
+		"n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z":
+		println("\(someCharacter) is a consonant")
+	default:
+		println("\(someCharacter) is not a vowel or a consonant")
+}
+
+ +

Classes and attributes

+
class MyViewController: UIViewController {
+    @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
+    /* ... */
+}
+ +

Known failures

+

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. +

+ +

Nested block comments

+
/* Nested block
+	/* comments
+	are */
+not supported */
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-tcl.html b/docs/_style/prism-master/examples/prism-tcl.html new file mode 100644 index 0000000000..080d817c7c --- /dev/null +++ b/docs/_style/prism-master/examples/prism-tcl.html @@ -0,0 +1,26 @@ +

Comments

+
# This is a comment
+ +

Strings

+
"foo \"bar\" baz"
+"foo\
+bar\
+baz"
+ +

Variables

+
$foo
+$foo::bar_42
+$::baz
+${foobar}
+set foo::bar "baz"
+ +

Functions

+
proc foobar {baz} {
+	puts $baz
+}
+
+proc RESTORE/post/:post_id/comment/:comment_id {post_id comment_id} {
+    #| Restore a comment handler
+    comment_restore $comment_id
+    qc::actions redirect [url "/post/$post_id" show_deleted_comment_ids $comment_id]
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-textile.html b/docs/_style/prism-master/examples/prism-textile.html new file mode 100644 index 0000000000..4ff4d12798 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-textile.html @@ -0,0 +1,178 @@ +

HTML

+
I am <b>very</b> serious.
+
+<div style="background:#fff">Foo bar</div>
+ +

Blocks

+
h1. Header 1
+
+h2. Header 2
+
+h3. Header 3 written on
+multiple lines
+
+bq. A block quotation
+on multiple lines.
+ +

Footnotes

+
This is covered elsewhere[1].
+
+fn1. Down here, in fact.
+ +

Structural emphasis

+
I _believe_ every word.
+And then? She *fell*!
+
+I __know__.
+I **really** __know__.
+
+??Cat's Cradle?? by Vonnegut
+
+Convert with @r.to_html@
+
+I'm -sure- not sure.
+
+You are a +pleasant+ child.
+
+a ^2^ + b ^2^ = c ^2^
+log ~2~ x
+ +

Block attributes

+
p(example1). An example
+
+p(#big-red). Red here
+
+p(example1#big-red2). Red here
+
+p{color:blue;margin:30px}. Spacey blue
+
+p[fr]. rouge
+ +

Phrase attributes

+
I seriously *{color:red}blushed*
+when I _(big)sprouted_ that
+corn stalk from my
+%[es]cabeza%.
+ +

Phrase alignments and indentation

+
p<. align left
+
+p>. align right
+
+p=. centered
+
+p<>. justified
+
+p(. left ident 1em
+
+p((. left ident 2em
+
+p))). right ident 3em
+ +

Attributes and alignments combined

+
h2()>. Bingo.
+
+h3()>[no]{color:red}. Bingo
+ +

Lists

+
# First item
+# Second item
+# Third
+
+# Fuel could be:
+## Coal
+## Gasoline
+## Electricity
+# Humans need only:
+## Water
+## Protein
+
+* First item
+* Second item
+* Third
+
+* Fuel could be:
+** Coal
+** Gasoline
+** Electricity
+* Humans need only:
+** Water
+** Protein
+
+#(foo) List can have attributes too
+#{background: red} Red item
+ +

Links and images

+
I searched "Google":http://google.com.
+
+I am crazy about "Hobix":hobix
+and "it's":hobix "all":hobix I ever
+"link to":hobix!
+
+[hobix]http://hobix.com
+
+And "(some-link)[en]links":# can have attributes too!
+
+!http://redcloth.org/hobix.com/textile/sample.jpg!
+!openwindow1.gif(Bunny.)!
+!openwindow1.gif!:http://hobix.com/
+
+!>obake.gif!
+
+And others sat all round the small
+machine and paid it to sing to them.
+ +

Tables

+
| name | age | sex |
+| joan | 24 | f |
+| archie | 29 | m |
+| bella | 45 | f |
+
+|_. name |_. age |_. sex |
+| joan | 24 | f |
+| archie | 29 | m |
+| bella | 45 | f |
+
+|_. attribute list |
+|<. align left |
+|>. align right|
+|=. center |
+|<>. justify |
+|^. valign top |
+|~. bottom |
+
+|\2. spans two cols |
+| col 1 | col 2 |
+
+|/3. spans 3 rows | a |
+| b |
+| c |
+
+|{background:#ddd}. Grey cell|
+
+table{border:1px solid black}.
+|This|is|a|row|
+|This|is|a|row|
+
+|This|is|a|row|
+{background:#ddd}. |This|is|grey|row|
+ +

Known failures

+

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. +

+ +

Nested styles are only partially supported

+ +

Only one level of nesting is supported.

+ +
*A bold paragraph %containing a span with broken _italic_ inside%!*
+ +

HTML inside Textile is not supported

+ +

But Textile inside HTML should be just fine.

+ +
<strong>This _should_ work properly.</strong>
+*But this is <em>definitely</em> broken.*
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-tsx.html b/docs/_style/prism-master/examples/prism-tsx.html new file mode 100644 index 0000000000..d83d1dd839 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-tsx.html @@ -0,0 +1,31 @@ +

Full example

+
import * as React from 'react';
+
+interface IState {
+	clicks: number;
+}
+
+export class Clicker extends React.Component<any, IState> {
+	constructor(props) {
+		super(props);
+
+		this.state = {
+			clicks: 0,
+		};
+	}
+
+	public clickHandler = () => {
+		this.setState({ clicks: this.state.clicks + 1 });
+	}
+
+	public render() {
+		return (
+			<div>
+				<p>You have clicked the button {this.state.clicks} time(s).</p>
+				<p>
+					<button onClick={this.clickHandler}>click me</button>
+				</p>
+			</div>
+		);
+	}
+}
diff --git a/docs/_style/prism-master/examples/prism-tt2.html b/docs/_style/prism-master/examples/prism-tt2.html new file mode 100644 index 0000000000..1a6711f970 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-tt2.html @@ -0,0 +1,61 @@ +

Comments

+
[%# this entire directive is ignored no
+    matter how many lines it wraps onto
+%]
+[% # this is a comment
+   theta = 20      # so is this
+   rho   = 30      # <aol>me too!</aol>
+%]
+
+ +

Variables

+
[% text %]
+[% article.title %]
+[%= eat.whitespace.left %]
+[% eat.whitespace.right =%]
+[%= eat.whitespace.both =%]
+[% object.method() %]
+ + +

Conditionals and Loops

+
[% IF foo = bar %]
+this
+[% ELSE %]
+that
+[% END %]
+[% FOREACH post IN q.listPosts(lingua = "de") %]
+  <a href="[% post.permalink %]">[% post.title | html %]</a>
+[% END %]
+ +

Multiple Directives

+
[% IF title;
+      INCLUDE header;
+   ELSE;
+      INCLUDE other/header  title="Some Other Title";
+   END
+%]
+ +

Operators

+
[% FOREACH post IN q.listPosts(lingua => 'de') %]
+  [% post.title | myfilter(foo = "bar") %]
+[% END %]
+ +

Known Limitations

+
    +
  • + Outline tags are not supported.
  • +
  • The arguments to + TAGS + are usually misinterpreted
  • +
  • In TT2, you can use keywords as identifiers where this is + unambiguous. But these keywords will be highlighted as keywords, not + as variables here.
  • +
  • The + ANYCASE + option is not supported.
  • +
  • + Any number of backslashes in front of dollar signs inside of double quoted + strings are ignored since the behavior of Template Toolkit 2.26 seems to be + inconsistent. +
  • +
diff --git a/docs/_style/prism-master/examples/prism-twig.html b/docs/_style/prism-master/examples/prism-twig.html new file mode 100644 index 0000000000..0a7078151d --- /dev/null +++ b/docs/_style/prism-master/examples/prism-twig.html @@ -0,0 +1,35 @@ +

Comments

+
{# Some comment
+on multiple lines
+with <html></html>
+inside #}
+ +

Keywords

+
{% if foo %} bar {% endif %}
+{% for key, value in arr if value %} {{ do_something() }} {% endfor %}
+{% include 'header.html' %}
+{% include 'template.html' with {'foo': 'bar'} %}
+ +

Operators

+
{{ not a }}
+{{ 20 // 7 }}
+{{ b b-and c }}
+{% if phone matches '/^[\\d\\.]+$/' %} ... {% endif %}
+ +

Twig embedded in HTML

+
<div>
+{% if foo %}
+	<p>Foo!</p>
+{% else %}
+	<p>Not foo...</p>
+{% endif %}
+ +

Known failures

+

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. +

+ +

Tag containing Twig is not highlighted

+
<div{% if foo %} class="bar"{% endif %}></div>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-typescript.html b/docs/_style/prism-master/examples/prism-typescript.html new file mode 100644 index 0000000000..561c4dc4d0 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-typescript.html @@ -0,0 +1,28 @@ +

Full example

+
interface SearchFunc {
+  (source: string, subString: string): boolean;
+}
+
+var mySearch: SearchFunc;
+mySearch = function(source: string, subString: string) {
+  var result = source.search(subString);
+  if (result == -1) {
+    return false;
+  }
+  else {
+    return true;
+  }
+}
+
+class Greeter {
+    greeting: string;
+    constructor(message: string) {
+        this.greeting = message;
+    }
+    greet() {
+        return "Hello, " + this.greeting;
+    }
+}
+
+var greeter = new Greeter("world");
+
diff --git a/docs/_style/prism-master/examples/prism-vala.html b/docs/_style/prism-master/examples/prism-vala.html new file mode 100644 index 0000000000..ef5e98a921 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-vala.html @@ -0,0 +1,33 @@ +

Comments

+
// Single line comment
+/** Multi-line
+doc comment */
+ +

Strings

+
"foo \"bar\" baz"
+"Multi-line strings ending with a \
+are supported too."
+"""Verbatim strings
+You can create
+multi-line strings like this too."""
+@"Template string with variables $var1 $(var2 * 2)"
+ +

Regex

+
/foo?[ ]*bar/
+ +

Full example

+
using Gtk;
+
+int main (string[] args) {
+	Gtk.init(ref args);
+
+	var window = new Window();
+
+	var button = new Button.with_label("Click me!");
+
+	window.add(button);
+	window.show_all();
+
+	Gtk.main();
+	return 0;
+}
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-vbnet.html b/docs/_style/prism-master/examples/prism-vbnet.html new file mode 100644 index 0000000000..bc2a376b2e --- /dev/null +++ b/docs/_style/prism-master/examples/prism-vbnet.html @@ -0,0 +1,16 @@ +

Comments

+
!foobar
+REM foobar
+'foobar
+ +

Example

+
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
+        ' 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
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-velocity.html b/docs/_style/prism-master/examples/prism-velocity.html new file mode 100644 index 0000000000..a97fa05e1b --- /dev/null +++ b/docs/_style/prism-master/examples/prism-velocity.html @@ -0,0 +1,47 @@ +

Comments

+
## Single line comment
+#* Multi-line
+comment *#
+ +

Unparsed sections

+
## Section below is not parsed
+#[[
+	## This is not a comment
+]]#
+ +

Variables

+
$mud
+$customer.Name
+$flogger.getPromo( $mud )
+$!{mudSlinger_9}
+$foo[0]
+$foo[$i]
+$foo["bar"]
+$foo.bar[1].junk
+$foo.callMethod()[1]
+ +

Directives

+
#set($foo.bar[1] = 3)
+#if($a==1)true enough#{else}no way!#end
+#macro( d )
+<tr><td>$!bodyContent</td></tr>
+#end
+#@d()Hello!#end
+ +

Integration with HTML

+
<html>
+  <body>
+    Hello $customer.Name!
+    <table>
+    #foreach( $mud in $mudsOnSpecial )
+      #if ( $customer.hasPurchased($mud) )
+        <tr>
+          <td>
+            $flogger.getPromo( $mud )
+          </td>
+        </tr>
+      #end
+    #end
+    </table>
+  </body>
+</html>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-verilog.html b/docs/_style/prism-master/examples/prism-verilog.html new file mode 100644 index 0000000000..d7c9a0bfc9 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-verilog.html @@ -0,0 +1,103 @@ +

Note that this package supports syntax highlighting for both Verilog and System Verilog.

+ +

Comments

+
/* Multiline comments in Verilog
+   look like C comments and // is OK in here. */
+// Single-line comment in Verilog.
+ +

Literals

+
// example code from: http://iroi.seu.edu.cn/books/asics/Book2/CH11/CH11.02.htm
+module declarations;
+  parameter H12_UNSIZED = 'h 12;
+  parameter H12_SIZED = 6'h 12;
+  parameter D42 = 8'B0010_1010;
+  parameter D123 = 123;
+  parameter D63 = 8'o 77;
+  parameter A = 'h x, B = 'o x, C = 8'b x, D = 'h z, E = 16'h ????;
+  reg [3:0] B0011,Bxxx1,Bzzz1;
+  real R1,R2,R3;
+  integer I1,I3,I_3;
+  parameter BXZ = 8'b1x0x1z0z;
+
+  initial begin
+    B0011 = 4'b11; Bxxx1 = 4'bx1; Bzzz1 = 4'bz1;
+    R1 = 0.1e1; R2 = 2.0; R3 = 30E-01;
+    I1 = 1.1; I3 = 2.5; I_3 = -2.5;
+  end
+
+  initial begin #1;
+    $display("H12_UNSIZED, H12_SIZED (hex) = %h, %h",H12_UNSIZED, H12_SIZED);
+    $display("D42 (bin) = %b",D42," (dec) = %d",D42);
+    $display("D123 (hex) = %h",D123," (dec) = %d",D123);
+    $display("D63 (oct) = %o",D63);
+    $display("A (hex) = %h",A," B (hex) = %h",B);
+    $display("C (hex) = %h",C," D (hex) = %h",D," E (hex) = %h",E);
+    $display("BXZ (bin) = %b",BXZ," (hex) = %h",BXZ);
+    $display("B0011, Bxxx1, Bzzz1 (bin) = %b, %b, %b",B0011,Bxxx1,Bzzz1);
+    $display("R1, R2, R3 (e, f, g) = %e, %f, %g", R1, R2, R3);
+    $display("I1, I3, I_3 (d) = %d, %d, %d", I1, I3, I_3);
+  end
+endmodule
+ +

Full example

+
`include "internal_defines.vh"
+
+//*****************************************************************************
+// memory_decoder: a custom module used to handle memory transactions
+//*****************************************************************************
+//
+// out_mem (output) - The output to memory
+// out_reg (output) - The output to the register file
+// mem_we  (output) - Which byte in the word to write too
+// mem_in  (input)  - The input from memory
+// addr_in (input)  - The lowest 2 bits of byte offset to store in memory
+// data_in (input)  - The input from the register file to be stored
+// l_bit   (input)  - The load bit signal (control)
+// b_bit   (input)  - The byte bit signal (control)
+//
+module memory_decoder(out_mem, out_reg, mem_in, data_in, l_bit, b_bit, addr_in,
+                      mem_we);
+
+  output reg  [31:0]  out_mem, out_reg;
+  output reg  [3:0]   mem_we;
+  input       [31:0]  mem_in, data_in;
+  input       [1:0]   addr_in;
+  input               l_bit, b_bit;
+
+  always_comb begin
+    mem_we = 4'b0000;     // dont write memory by default
+    if (l_bit == 1) begin // ldr and ldrb
+      out_mem = mem_in;   // dont change memory!
+      if (b_bit == 1) begin
+        /* figure out which byte to load from memory */
+        case (addr_in)
+          2'b00: out_reg = {24'b00, mem_in[7:0]};
+          2'b01: out_reg = {24'b00, mem_in[15:8]};
+          2'b10: out_reg = {24'b00, mem_in[23:16]};
+          2'b11: out_reg = {24'b00, mem_in[31:24]};
+        endcase
+      end
+      else begin
+        out_reg = mem_in;
+      end
+    end
+    else begin            // str and strb
+      out_reg = `UNKNOWN; // We are not reading from mem
+      if (b_bit == 1) begin
+        /* figure out which byte to write to in memory */
+        out_mem = {4{data_in[7:0]}};
+        case (addr_in)
+          2'b00: mem_we = 4'b1000;
+          2'b01: mem_we = 4'b0100;
+          2'b10: mem_we = 4'b0010;
+          2'b11: mem_we = 4'b0001;
+        endcase
+      end
+      else begin
+        mem_we = 4'b1111; // write to all channels
+        out_mem = data_in;
+      end
+    end
+  end
+
+endmodule
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-vhdl.html b/docs/_style/prism-master/examples/prism-vhdl.html new file mode 100644 index 0000000000..b495085155 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-vhdl.html @@ -0,0 +1,92 @@ +

Comments

+
-- I am a comment
+I am not
+ +

Literals

+
constant FREEZE : integer := 32;
+constant TEMP : real := 32.0;
+A_INT <= 16#FF#;
+B_INT <= 2#1010_1010#;
+MONEY := 1_000_000.0;
+FACTOR := 2.2E-6;
+constant DEL1 :time := 10 ns;
+constant DEL2 :time := 2.27 us;
+type MY_LOGIC is ('X','0','1','Z');
+type T_STATE is (IDLE, READ, END_CYC);
+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";
+constant TWO_LINE_MSG : string := "Hello" & CR & "World";
+ +

Full example

+
-- example code from: http://www.csee.umbc.edu/portal/help/VHDL/samples/samples.html
+library IEEE;
+use IEEE.std_logic_1164.all;
+
+entity fadd is               -- full adder stage, interface
+  port(a    : in  std_logic;
+       b    : in  std_logic;
+       cin  : in  std_logic;
+       s    : out std_logic;
+       cout : out std_logic);
+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;
+end architecture circuits; -- of fadd
+
+library IEEE;
+use IEEE.std_logic_1164.all;
+entity add32 is             -- simple 32 bit ripple carry adder
+  port(a    : in  std_logic_vector(31 downto 0);
+       b    : in  std_logic_vector(31 downto 0);
+       cin  : in  std_logic;
+       sum  : out std_logic_vector(31 downto 0);
+       cout : out std_logic);
+end entity add32;
+
+architecture circuits of add32 is
+  signal c : std_logic_vector(0 to 30); -- internal carry signals
+begin  -- circuits of add32
+  a0: entity WORK.fadd port map(a(0), b(0), cin, sum(0), c(0));
+  stage: for I in 1 to 30 generate
+             as: entity WORK.fadd port map(a(I), b(I), c(I-1) , sum(I), c(I));
+         end generate stage;
+  a31: entity WORK.fadd port map(a(31), b(31), c(30) , sum(31), cout);
+end architecture circuits;  -- of add32
+
+use STD.textio.all;
+library IEEE;
+use IEEE.std_logic_1164.all;
+use IEEE.std_logic_textio.all;
+
+entity signal_trace is
+end signal_trace;
+
+architecture circuits of signal_trace is
+  signal a:    std_logic_vector(31 downto 0) := x"00000000";
+  signal b:    std_logic_vector(31 downto 0) := x"FFFFFFFF";
+  signal cin:  std_logic := '1';
+  signal cout: std_logic;
+  signal sum:  std_logic_vector(31 downto 0);
+begin  -- circuits of signal_trace
+  adder: entity WORK.add32 port map(a, b, cin, sum, cout); -- parallel circuit
+
+  prtsum: process (sum)
+            variable my_line : LINE;
+            alias swrite is write [line, string, side, width] ;
+          begin
+            swrite(my_line, "sum=");
+            write(my_line, sum);
+            swrite(my_line, ",  at=");
+            write(my_line, now);
+            writeline(output, my_line);
+          end process prtsum;
+
+end architecture circuits; -- of signal_trace
diff --git a/docs/_style/prism-master/examples/prism-vim.html b/docs/_style/prism-master/examples/prism-vim.html new file mode 100644 index 0000000000..567b8206e8 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-vim.html @@ -0,0 +1,25 @@ +

Comments

+
" This is a comment
+ +

Variables

+

+set softab = 2
+map <leader>tn :tabnew
+
+ +

Map

+
mystring = :steveT;
+ +

Functions

+

+func! DeleteTrailingWS()
+  exe "normal mz"
+  %s/\s\+$//ge
+  exe "normal `z"
+endfunc
+ +

Logic

+

+if has("mac")
+  nmap <D-j> <M-j>
+endif
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-visual-basic.html b/docs/_style/prism-master/examples/prism-visual-basic.html new file mode 100644 index 0000000000..733faa8225 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-visual-basic.html @@ -0,0 +1,36 @@ +

Comments

+
' Comment
+REM This is a comment too
+ +

Strings and characters

+
"Foo""bar"
+“”
+"a"c
+ +

Dates and times

+
# 8/23/1970 3:45:39AM #
+#8/23/1970 #
+# 3:45:39AM #
+# 3:45:39#
+# 13:45:39 #
+# 1AM #
+# 13:45:39PM #
+ +

Numbers

+
42S
+.369E+14
+3.1415R
+ +

Preprocessing directives

+
#ExternalChecksum("c:\wwwroot\inetpub\test.aspx", _
+    "{12345678-1234-1234-1234-123456789abc}", _
+    "1a2b3c4e5f617239a49b9a9c0391849d34950f923fab9484")
+ +

Keywords

+
Function AddNumbers(ByVal X As Integer, ByVal Y As Integer)
+    AddNumbers = X + Y
+End Function
+Module Test
+    Sub Main()
+    End Sub
+End Module
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-wasm.html b/docs/_style/prism-master/examples/prism-wasm.html new file mode 100644 index 0000000000..5cc1b65c62 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-wasm.html @@ -0,0 +1,43 @@ +

Comments

+
;; Single line comment
+(; Multi-line
+comment ;)
+ +

Strings

+
""
+"Foobar"
+"Foo\"ba\\r"
+ +

Numbers

+
42
+3.1415
+0.4E-4
+-3.1_41_5
+0xBADFACE
+0xB_adF_a_c_e
++0x4E.F7
+0xFFp+4
+inf
+nan
+nan:0xf4
+ +

Keywords

+
(func (param i32) (param f32) (local f64)
+  get_local 0
+  get_local 1
+  get_local 2)
+ +

Identifiers

+
$p
+$getAnswer
+$return_i32
+ +

Full example

+
(module
+  (import "js" "memory" (memory 1))
+  (import "js" "table" (table 1 anyfunc))
+  (elem (i32.const 0) $shared0func)
+  (func $shared0func (result i32)
+   i32.const 0
+   i32.load)
+)
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-wiki.html b/docs/_style/prism-master/examples/prism-wiki.html new file mode 100644 index 0000000000..295eb3f812 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-wiki.html @@ -0,0 +1,165 @@ +

Embedded markup

+
Paragraphs can be forced in lists by using HTML tags.
+Two line break symbols, <code><nowiki><br /><br /></nowiki></code>, will create the desired effect. So will enclosing all but the first paragraph with <code><nowiki><p>...</p></nowiki></code>
+ +

Headings

+
= Header 1 =
+== Header 2 ==
+=== Header 3 ===
+==== Header 4 ====
+===== Header 5 =====
+====== Header 6 ======
+ +

Bold and italic

+
'''''Both bold and italic'''''
+'''Only bold'''
+''Only italic''
+ +

Links and Magic links

+
[[w:en:Formal_grammar|Formal grammar]]
+[http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html EBNF help]
+
+ISBN 1234567890
+ISBN 123456789x
+ISBN      1 2 3-4-5 6789 X
+ISBN 978-9999999999
+
+RFC 822
+PMID 822
+ +

Magic words and special symbols

+
#REDIRECT [[somewhere]]
+
+{{SITENAME}}
+{{PAGESINCATEGORY:category}}
+{{#dateformat:2009-12-25|mdy}}
+
+__NOTOC__
+
+{{!}}
+
+~~~ ~~~~ ~~~~~
+ +

Lists

+
* Lists are easy to do:
+** start every line
+* with a star
+** more stars mean
+*** deeper levels
+
+# Numbered lists are good
+## very organized
+## easy to follow
+
+; Definition lists
+; item : definition
+; semicolon plus term
+: colon plus definition
+
+* Or create mixed lists
+*# and nest them
+*#* like this
+*#*; definitions
+*#*: work:
+*#*; apple
+*#*; banana
+*#*: fruits
+ +

Tables

+
{|
+|Orange
+|Apple
+|-
+|Bread
+|Pie
+|-
+|Butter
+|Ice cream
+|}
+
+{|
+|Lorem ipsum dolor sit amet,
+consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt
+ut labore et dolore magna aliquyam erat,
+sed diam voluptua.
+
+At vero eos et accusam et justo duo dolores
+et ea rebum. Stet clita kasd gubergren,
+no sea takimata sanctus est Lorem ipsum
+dolor sit amet.
+|
+* Lorem ipsum dolor sit amet
+* consetetur sadipscing elitr
+* sed diam nonumy eirmod tempor invidunt
+|}
+
+{|
+|  Orange    ||   Apple   ||   more
+|-
+|   Bread    ||   Pie     ||   more
+|-
+|   Butter   || Ice cream ||  and more
+|}
+
+{|
+! style="text-align:left;"| Item
+! Amount
+! Cost
+|-
+|Orange
+|10
+|7.00
+|-
+|Bread
+|4
+|3.00
+|-
+|Butter
+|1
+|5.00
+|-
+!Total
+|
+|15.00
+|}
+
+{|
+! style="text-align:left;"| Item !! style="color:red;"| Amount !! Cost
+|-
+|Orange
+|10
+|7.00
+|-
+| style="text-align:right;"| Bread
+|4
+|3.00
+|-
+|Butter
+|1
+|5.00
+|-
+!Total
+|
+|15.00
+|}
+ +

Known failures

+

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. +

+ +

Nested magic words are not supported

+ +
{{#switch:{{PAGENAME}}
+| L'Aquila = No translation
+| L = Not OK
+| L'Aquila = Entity escaping
+| L'Aquila = Numeric char encoding
+}}
+ +

Nesting of bold and italic is not supported

+
''Italic with '''bold''' inside''
+ diff --git a/docs/_style/prism-master/examples/prism-xeora.html b/docs/_style/prism-master/examples/prism-xeora.html new file mode 100644 index 0000000000..541a916518 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-xeora.html @@ -0,0 +1,111 @@ +

Special Constants

+
$DomainContents$
+$PageRenderDuration$
+ +

Operators & Variables

+
$SearchKey$
+$^SearchKey$
+$~SearchKey$
+$-SearchKey$
+$+SearchKey$
+$=SearchKey$
+$#SearchKey$
+$##SearchKey$
+
+$*SearchKey$
+
+$@SearchObject.SearchProperty$
+$@#SearchObject.SearchProperty$
+$@-SearchObject.SearchProperty$
+ +

Controls

+
$C:ControlID$
+$C:ControlID:{ <!-- Something --> }:ControlID$
+$C:ControlID:{ <!-- Something --> }:ControlID:{ <!-- Something (Alternative) --> }:ControlID$
+
+Control with Parent
+$C[Control1]:Control2$
+$C[Control2]:Control3:{ <!-- Something --> }:Control3$
+$C[Control2]:Control3:{ <!-- Something --> }:Control3:{ <!-- Something (Alternative) --> }:Control3$
+
+Control with Parent & Leveling
+$C#1[ParentControlID]:ControlID:{ <!-- Something --> }:ControlID$
+
+All Control Tags has leveling specification;
+$C:LoopControl1:{
+	$#FirstLoopSQLField1$
+
+	$C:ControlID:{ <!-- Something --> }:ControlID$
+
+	$C:LoopControl2:{
+		$##FirstLoopSQLField1$
+		$#SecondLoopSQLField1$
+
+		$C#1:ControlID:{ <!-- Something --> }:ControlID$
+	}:LoopControl2$
+}:LoopControl1$
+
+XML setup on a Control in Controls.xml
+<Control id="[ControlID]">
+	<Type>[ControlType]</Type>
+
+	<Bind>[ThemeID|AddonID]?[ControlClass].[FunctionName],SomeOperatorTags(seperated with |)</Bind>
+
+	<BlockIDsToUpdate localupdate="True|False">
+		<BlockID>[BlockID]</BlockID>
+		<BlockID>[BlockID]</BlockID>
+		<BlockID>[BlockID]</BlockID>
+	</BlockIDsToUpdate>
+
+	<DefaultButtonID>[ControlID]</DefaultButtonID>
+
+	<Text>[TextBox, Password value or Button Text]</Text>
+
+	<Content>[Textarea Content]</Content>
+
+	<Source>[Image URL]</Source>
+
+	<Url>[Link URL]</Url>
+
+	<Attributes>
+		<Attribute key="[HTMLAttributeKey]">[AttributeValue]</Attributes>
+	</Attributes>
+</Control>
+ +

Directives

+
$T:TemplateID$
+$L:TranslationID$
+$P:TemplateID$
+ +

Executable Functions

+
$F:AddonLib1?GlobalControls.PrintOutSums$
+$F:AddonLib1?GlobalControls.PrintOut,~FormField$
+$F:AddonLib1?GlobalControls.SumNumbers,~FormField|=5$
+ +

Client Side Function Binding

+
$XF:{AddonLib1?GlobalControls.SumNumbers,~FormField|=5}:XF$
+ +

Inline Statements

+
$S:StatementID:{ <!-- C# Code --> }:StatementID$
+$S:StatementID:{!NOCACHE <!-- C# Code --> }:StatementID$
+
+$S:Statement1:{
+	int intvalue1 = 5;
+	int intvalue2 = Integer.Parse("0" + $~FormValue$);
+
+	return intvalue1 * intvalue2;
+}:Statement1$
+ +

Request Blocks

+
$H:RequestBlockID:{ <!-- Something --> }:RequestBlockID$
+$H:RequestBlockID:{!RENDERONREQUEST <!-- Something --> }:RequestBlockID$
+ +

Cache Block

+
$PC:{ <!-- Page Content Part --> }:PC$
+ +

Message Handling Block

+
$MB:{ <!-- Message Output Content --> }:MB$
+$MB:{
+	$#Message$
+	$#MessageType$
+}:MB$
diff --git a/docs/_style/prism-master/examples/prism-xojo.html b/docs/_style/prism-master/examples/prism-xojo.html new file mode 100644 index 0000000000..35480744dd --- /dev/null +++ b/docs/_style/prism-master/examples/prism-xojo.html @@ -0,0 +1,63 @@ +

Comments

+
' This is a comment
+// This is a comment too
+Rem This is a remark
+ +

Strings

+
""
+"foo ""bar"" baz"
+ +

Numbers and colors

+
42
+3.14159
+3E4
+&b0110
+&cAABBCCDD
+&hBadFace
+&o777
+&u9
+ +

Example

+
Dim g As Graphics
+Dim yOffSet As Integer
+g = OpenPrinterDialog()
+If g <> Nil Then
+  If MainDishMenu.ListIndex <> -1 Then
+    g.Bold = True
+    g.DrawString("Main Dish:",20,20)
+    g.Bold = False
+    g.DrawString(MainDishMenu.Text,100,20)
+    g.Bold = True
+    g.DrawString("Side Order:",20,40)
+    g.Bold = False
+    If FriesRadio.Value Then
+      g.DrawString(FriesRadio.Caption,100,40)
+    End If
+    If PotatoRadio.Value Then
+      g.DrawString(PotatoRadio.Caption,100,40)
+    End If
+    If OnionRingRadio.Value Then
+      g.DrawString(OnionRingRadio.Caption,100,40)
+    End If
+    yOffSet = 60
+    If CheeseCheckBox.Value Then
+      g.Bold = True
+      g.DrawString("Extra:",20,yOffSet)
+      g.Bold = False
+      g.DrawString(CheeseCheckBox.Caption,100,yOffSet)
+      yOffSet = yOffSet + 20
+    End If
+    If BaconCheckBox.Value Then
+      g.Bold = True
+      g.DrawString("Extra:",20,yOffSet)
+      g.Bold = False
+      g.DrawString(BaconCheckBox.Caption,100,yOffSet)
+      yOffSet = yOffSet + 20
+    End If
+    g.Bold = True
+    g.DrawString("Notes:",20,yOffSet)
+    g.Bold = False
+    g.DrawString(NotesField.Text,100,yOffSet,(g.Width-40))
+  End If
+End If
+
diff --git a/docs/_style/prism-master/examples/prism-xquery.html b/docs/_style/prism-master/examples/prism-xquery.html new file mode 100644 index 0000000000..8166d771c2 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-xquery.html @@ -0,0 +1,47 @@ +

Comments

+
(::)
+(: Comment :)
+(: Multi-line
+comment :)
+(:~
+: The <b>functx:substring-after-last</b> function returns the part
+: of <b>$string</b> that appears after the last occurrence of
+: <b>$delim</b>. If <b>$string</b> does not contain
+: <b>$delim</b>, the entire string is returned.
+:
+: @param $string the string to substring
+: @param $delim the delimiter
+: @return the substring
+:)
+ +

Variables

+
$myProduct
+$foo-bar
+$strings:LetterA
+ +

Functions

+
document-node(schema-element(catalog))
+strings:trim($arg as xs:string?)
+false()
+ +

Keywords

+
xquery version "1.0";
+declare default element namespace "http://datypic.com/cat";
+declare boundary-space preserve;
+declare default collation "http://datypic.com/collation/custom";
+ +

Types

+
xs:anyAtomicType
+element
+xs:double
+ +

Full example

+
<report xmlns="http://datypic.com/report"
+xmlns:cat="http://datypic.com/cat"
+xmlns:prod="http://datypic.com/prod"> {
+for $product in doc("prod_ns.xml")/prod:product
+return <lineItem>
+{$product/prod:number}
+{$product/prod:name}
+</lineItem>
+} </report>
\ No newline at end of file diff --git a/docs/_style/prism-master/examples/prism-yaml.html b/docs/_style/prism-master/examples/prism-yaml.html new file mode 100644 index 0000000000..bea52f8651 --- /dev/null +++ b/docs/_style/prism-master/examples/prism-yaml.html @@ -0,0 +1,107 @@ +

Null and Boolean

+
---
+A null: null
+A null: ~
+Also a null: # Empty
+Not a null: ""
+Booleans: [ true, True, false, FALSE ]
+
+ +

Numbers and timestamps

+
---
+Integers: [ 0, -0, 3, 0o7, 0x3A, -19 ]
+Floats: [ 0., -0.0, .5, 12e03, +12e03, -2E+05 ]
+Also floats: [ .inf, -.Inf, +.INF, .NAN ]
+Timestamps:
+  canonical: 2001-12-15T02:59:43.1Z
+  iso8601: 2001-12-14t21:59:43.10-05:00
+  spaced: 2001-12-14 21:59:43.10 -5
+  date: 2002-12-14
+  times:
+    - 10:53
+    - 10:53:20.53
+
+ +

Strings

+
---
+product: High Heeled "Ruby" Slippers
+description: "Putting on these \"slippers\" is easy."
+address:
+  city:   East Centerville
+  street: !!str |
+    123 Tornado Alley
+    Suite 16
+
+  specialDelivery:  >
+    Follow the Yellow Brick
+    Road to the Emerald City.
+    #Pay no attention to the
+    man behind the curtain.
+
+ +

Sequences and maps

+
---
+- Casablanca
+- North by Northwest
+- {
+    name: John Smith, age: 33}
+- name: Mary Smith
+  age: 27
+---
+"name": John Smith
+age: 33
+men: [ John Smith,
+    "Bill Jones" ]
+women:
+ - Mary Smith
+ - "Susan Williams"
+
+ +

Tags

+
---
+!!map {
+  ? !!str friends: !!seq [
+    !!map {
+      ? !!str "age"
+      : !!int 33,
+      ? !!str "name"
+      : !!str "John Smith",
+    }
+  ],
+  men:
+    [ !!str "John Smith", !!str "Bill Jones"]
+}
+
+ +

Full example

+
%YAML 1.2
+--- !<tag:clarkevans.com,2002:invoice>
+invoice: 34843
+date   : 2001-01-23
+bill-to: &id001
+  given  : Chris
+  family : Dumars
+  address:
+    lines: |
+      458 Walkman Dr.
+      Suite #292
+    city    : Royal Oak
+    state   : MI
+    postal  : 48046
+ship-to:
+  <<: *id001
+  product:
+    - sku         : BL394D
+      quantity    : 4
+      description : Basketball
+      price       : 450.00
+    - sku         : BL4438H
+      quantity    : 1
+      description : Super Hoop
+      price       : 2392.00
+tax  : 251.42
+total: 4443.52
+comments:
+    Late afternoon is best.
+    Backup contact is Nancy
+
diff --git a/docs/_style/prism-master/extending.html b/docs/_style/prism-master/extending.html new file mode 100644 index 0000000000..59101b6ff9 --- /dev/null +++ b/docs/_style/prism-master/extending.html @@ -0,0 +1,247 @@ + + + + + + +Extending Prism ▲ Prism + + + + + + + + + +
+
+ +

Extending Prism

+

Prism is awesome out of the box, but it’s even awesomer when it’s customized to your own needs. This section will help you write new language definitions, plugins and all-around Prism hacking.

+
+ +
+

Language definitions

+ +

Every language is defined as a set of tokens, which are expressed as regular expressions. For example, this is the language definition for CSS:

+

+
+	

A regular expression literal is the simplest way to express a token. An alternative way, with more options, is by using an object literal. With that notation, the regular expression describing the token would be the pattern attribute:

+
...
+'tokenname': {
+	pattern: /regex/
+}
+...
+

So far the functionality is exactly the same between the short and extended notations. However, the extended notation allows for additional options:

+ +
+
inside
+
This property accepts another object literal, with tokens that are allowed to be nested in this token. + This makes it easier to define certain languages. However, keep in mind that they’re slower and if coded poorly, can even result in infinite recursion. + For an example of nested tokens, check out the Markup language definition: +
+ +
lookbehind
+
This option mitigates JavaScript’s lack of lookbehind. When set to true, + the first capturing group in the regex pattern is discarded when matching this token, so it effectively behaves + as if it was lookbehind. For an example of this, check out the C-like language definition, in particular the comment and class-name tokens: +
+ +
rest
+
Accepts an object literal with tokens and appends them to the end of the current object literal. Useful for referring to tokens defined elsewhere. For an example where rest is useful, check the Markup definitions above.
+ +
alias
+
This option can be used to define one or more aliases for the matched token. The result will be, that + the styles of the token and its aliases are combined. This can be useful, to combine the styling of a well known + token, which is already supported by most of the themes, with a semantically correct token name. The option + can be set to a string literal or an array of string literals. In the following example the token + name latex-equation is not supported by any theme, but it will be highlighted the same as a string. +
{
+	'latex-equation': {
+		pattern: /\$(\\?.)*?\$/g,
+		alias: 'string'
+	}
+}
+ +
greedy
+
This is a boolean attribute. It is intended to solve a common problem with + patterns that match long strings like comments, regex or string literals. For example, + comments are parsed first, but if the string /* foo */ + appears inside a string, you would not want it to be highlighted as a comment. + The greedy-property allows a pattern to ignore previous matches of other patterns, and + overwrite them when necessary. Use this flag with restraint, as it incurs a small performance overhead. + The following example demonstrates its usage: +
'string': {
+	pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+	greedy: true
+}
+
+ +

Unless explicitly allowed through the inside property, each token cannot contain other tokens, so their order is significant. Although per the ECMAScript specification, objects are not required to have a specific ordering of their properties, in practice they do in every modern browser.

+ +

In most languages there are multiple different ways of declaring the same constructs (e.g. comments, strings, ...) and sometimes it is difficult or unpractical to match all of them with one single regular expression. To add multiple regular expressions for one token name an array can be used:

+ +
...
+'tokenname': [ /regex0/, /regex1/, { pattern: /regex2/ } ]
+...
+ +
+

Prism.languages.insertBefore(inside, before, insert, root)

+ +

This is a helper method to ease modifying existing languages. For example, the CSS language definition not only defines CSS highlighting for CSS documents, + but also needs to define highlighting for CSS embedded in HTML through <style> elements. To do this, it needs to modify + Prism.languages.markup and add the appropriate tokens. However, Prism.languages.markup + is a regular JavaScript object literal, so if you do this:

+ +
Prism.languages.markup.style = {
+	/* tokens */
+};
+ +

then the style token will be added (and processed) at the end. Prism.languages.insertBefore allows you to insert + tokens before existing tokens. For the CSS example above, you would use it like this:

+ +
Prism.languages.insertBefore('markup', 'cdata', {
+	'style': {
+		/* tokens */
+	}
+});
+ +

Parameters

+
+
inside
+
The property of root that contains the object to be modified.
+ +
before
+
Key to insert before (String)
+ +
insert
+
An object containing the key-value pairs to be inserted
+ +
root
+
The root object, i.e. the object that contains the object that will be modified. Optional, default value is Prism.languages.
+
+
+
+ +
+

Writing plugins

+ +

Prism’s plugin architecture is fairly simple. To add a callback, you use Prism.hooks.add(hookname, callback). + hookname is a string with the hook id, that uniquely identifies the hook your code should run at. + callback is a function that accepts one parameter: an object with various variables that can be modified, since objects in JavaScript are passed by reference. + For example, here’s a plugin from the Markup language definition that adds a tooltip to entity tokens which shows the actual character encoded: +

Prism.hooks.add('wrap', function(env) {
+	if (env.token === 'entity') {
+		env.attributes['title'] = env.content.replace(/&amp;/, '&');
+	}
+});
+

Of course, to understand which hooks to use you would have to read Prism’s source. Imagine where you would add your code and then find the appropriate hook. + If there is no hook you can use, you may request one to be added, detailing why you need it there. +

+ +
+

API documentation

+ +
+

Prism.highlightAll(async, callback)

+

This is the most high-level function in Prism’s API. It fetches all the elements that have a .language-xxxx class + and then calls Prism.highlightElement() on each one of them.

+ +

Parameters

+
+
async
+
+ Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large + chunks of code. False by default + (why?).
+ Note: All language definitions required to highlight the code must be included in the main prism.js + file for the async highlighting to work. You can build your own bundle on the Download page. +
+ +
callback
+
+ An optional callback to be invoked after the highlighting is done. Mostly useful when async + is true, since in that case, the highlighting is done asynchronously. +
+
+
+ +
+

Prism.highlightAllUnder(element, async, callback)

+

Fetches all the descendants of element that have a .language-xxxx class + and then calls Prism.highlightElement() on each one of them.

+ +

Parameters

+
+
element
+
The root element, whose descendants that have a .language-xxxx class will be highlighted.
+ +
async
+
Same as in Prism.highlightAll()
+ +
callback
+
Same as in Prism.highlightAll()
+
+
+ +
+

Prism.highlightElement(element, async, callback)

+

Highlights the code inside a single element.

+ +

Parameters

+
+
element
+
The element containing the code. It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier.
+ +
async
+
Same as in Prism.highlightAll()
+
callback
+
Same as in Prism.highlightAll()
+
+
+ +
+

Prism.highlight(text, grammar)

+

Low-level function, only use if you know what you’re doing. + It accepts a string of text as input and the language definitions to use, and returns a string with the HTML produced.

+ +

Parameters

+
+
text
+
A string with the code to be highlighted.
+
grammar
+
An object containing the tokens to use. Usually a language definition like Prism.languages.markup
+
+ +

Returns

+

The highlighted HTML

+
+ +
+

Prism.tokenize(text, grammar)

+

This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the language definitions to use, and returns an array with the tokenized code. + When the language definition includes nested tokens, the function is called recursively on each of these tokens. This method could be useful in other contexts as well, as a very crude parser.

+ +

Parameters

+
+
text
+
A string with the code to be highlighted.
+
grammar
+
An object containing the tokens to use. Usually a language definition like Prism.languages.markup
+
+ +

Returns

+

An array of strings, tokens (class Prism.Token) and other arrays.

+
+
+ + + + + + + + + + diff --git a/docs/_style/prism-master/faq.html b/docs/_style/prism-master/faq.html new file mode 100644 index 0000000000..ae32cb68e1 --- /dev/null +++ b/docs/_style/prism-master/faq.html @@ -0,0 +1,182 @@ + + + + + + +FAQ ▲ Prism + + + + + + + + + + +
+
+ +

FAQ

+

Frequently Asked Questions, with a few Questions I want people to Frequently Ask.

+
+ +
+

This page doesn’t work in Opera!

+ +

Prism works fine in Opera. However, this page might sometimes appear to not be working in Opera, due to the theme switcher triggering an Opera bug. + This will be fixed soon.

+
+ +
+

Isn’t it bad to do syntax highlighting with regular expressions?

+ +

It is true that to correctly handle every possible case of syntax found in the wild, one would need to write a full-blown parser. + However, in most web applications and websites a small error margin is usually acceptable and a rare highlighting failure is not the end of the world. + A syntax highlighter based on regular expressions might only be accurate 99% of the time (the actual percentage is just a guess), + but in exchange for the small error margin, it offers some very important benefits: + +

+ +

For this reason, most syntax highlighters on the web and on desktop, are powered by regular expressions. This includes the internal syntax + highlighters used by popular native applications like Espresso and Sublime Text, at the time of writing. + Of course, not every regex-powered syntax highlighter is created equal. The number and type of failures can be vastly different, depending on + the exact algorithm used. Prism’s known failures are documented in the Examples section.

+
+ +
+

Why is asynchronous highlighting disabled by default?

+ +

Web Workers are good for preventing syntax highlighting of really large code blocks from blocking the main UI thread. + In most cases, you will want to highlight reasonably sized chunks of code, and this will not be needed. + Furthermore, using Web Workers is actually slower than synchronously highlighting, due to the overhead of creating and terminating + the Worker. It just appears faster in these cases because it doesn’t block the main thread. + In addition, since Web Workers operate on files instead of objects, plugins that hook on core parts of Prism (e.g. modify language definitions) + will not work unless included in the same file (using the builder in the Download page will protect you from this pitfall). + Lastly, Web Workers cannot interact with the DOM and most other APIs (e.g. the console), so they are notoriously hard to debug. +

+
+ +
+

Why is pre-existing HTML stripped off?

+ +

Because it would complicate the code a lot, although it’s not a crucial feature for most people. + If it’s very important to you, you can use the Keep Markup plugin.

+
+ +
+

If pre-existing HTML is stripped off, how can I highlight certain parts of the code?

+ +

There is a number of ways around it. You can always break the block of code into multiple parts, and wrap the HTML around it (or just use a .highlight class). + You can see an example of this in action at the “Basic usage” section of the homepage.

+

Another way around the limitation is to use the Line Highlght plugin, to highlight and link to specific lines and/or line ranges. +

+ +
+

How do I know which tokens I can style for every language?

+ +

Every token that is highlighted gets two classes: token and a class with the token type (e.g. comment). + You can find the different types of tokens either by looking at the keys of the object defining the language or by running this snippet in the console: +

function printTokens(o, prefix) { for (var i in o) { console.log((prefix? prefix + ' > ' : '') + i); if (o[i].inside) printTokens(o[i].inside, (prefix? prefix + ' > ' : '') + i); } };
+

Then you can use the function for every language you want to examine. For example, markup:

+
printTokens(Prism.languages.markup);
+

which outputs:

+
comment
+prolog
+doctype
+script
+script > tag
+script > tag > tag
+script > tag > tag > punctuation
+script > tag > tag > namespace
+script > tag > attr-value
+script > tag > attr-value > punctuation
+script > tag > punctuation
+script > tag > attr-name
+script > tag > attr-name > namespace
+script > rest
+style
+style > tag
+style > tag > tag
+style > tag > tag > punctuation
+style > tag > tag > namespace
+style > tag > attr-value
+style > tag > attr-value > punctuation
+style > tag > punctuation
+style > tag > attr-name
+style > tag > attr-name > namespace
+style > rest
+cdata
+tag
+tag > tag
+tag > tag > punctuation
+tag > tag > namespace
+tag > attr-value
+tag > attr-value > punctuation
+tag > punctuation
+tag > attr-name
+tag > attr-name > namespace
+entity
+
+ +
+

How can I use different highlighting for tokens with the same name in different languages?

+

Just use a descendant selector, that includes the language class. The default prism.css does this, to have different colors for + JavaScript strings (which are very common) and CSS strings (which are relatively rare). Here’s that code, simplified to illustrate the technique: +


+.token.string {
+	color: #690;
+}
+
+.language-css .token.string,
+.style .token.string {
+	color: #a67f59;
+}
+ +

Abbreviated language classes (e.g. lang-css) will be converted to their extended forms, so you don’t need to account for them.

+

The same technique can be used to differentiate XML tag namespaces from attribute namespaces:

+
.tag > .token.namespace {
+	color: #b37298;
+}
+.attr-name > .token.namespace {
+	color: #ab6;
+}
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/favicon.png b/docs/_style/prism-master/favicon.png new file mode 100644 index 0000000000..11838d3554 Binary files /dev/null and b/docs/_style/prism-master/favicon.png differ diff --git a/docs/_style/prism-master/gulpfile.js b/docs/_style/prism-master/gulpfile.js new file mode 100644 index 0000000000..7ae0264253 --- /dev/null +++ b/docs/_style/prism-master/gulpfile.js @@ -0,0 +1,143 @@ +var gulp = require('gulp'), + rename = require('gulp-rename'), + uglify = require('gulp-uglify'), + header = require('gulp-header'), + concat = require('gulp-concat'), + replace = require('gulp-replace'), + fs = require('fs'), + + 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' + }, + + componentsPromise = new Promise(function (resolve, reject) { + fs.readFile(paths.componentsFile, { + encoding: 'utf-8' + }, function (err, data) { + if (!err) { + resolve(JSON.parse(data)); + } else { + reject(err); + } + }); + }); + +gulp.task('components', function() { + return gulp.src(paths.components) + .pipe(uglify()) + .pipe(rename({ suffix: '.min' })) + .pipe(gulp.dest('components')); +}); + +gulp.task('build', function() { + return gulp.src(paths.main) + .pipe(header('\n/* **********************************************\n' + + ' Begin <%= file.relative %>\n' + + '********************************************** */\n\n')) + .pipe(concat('prism.js')) + .pipe(gulp.dest('./')); +}); + +gulp.task('plugins', ['languages-plugins'], function() { + return gulp.src(paths.plugins) + .pipe(uglify()) + .pipe(rename({ suffix: '.min' })) + .pipe(gulp.dest('plugins')); +}); + +gulp.task('components-json', function (cb) { + componentsPromise.then(function (data) { + data = 'var components = ' + JSON.stringify(data) + ';\n' + + 'if (typeof module !== \'undefined\' && module.exports) { module.exports = components; }'; + fs.writeFile(paths.componentsFileJS, data, cb); + }); +}); + +gulp.task('watch', function() { + gulp.watch(paths.components, ['components', 'build']); + gulp.watch(paths.plugins, ['plugins', 'build']); +}); + +gulp.task('languages-plugins', function (cb) { + componentsPromise.then(function (data) { + var languagesMap = {}; + var dependenciesMap = {}; + for (var p in data.languages) { + if (p !== 'meta') { + var title = data.languages[p].displayTitle || data.languages[p].title; + var ucfirst = p.substring(0, 1).toUpperCase() + p.substring(1); + if (title !== ucfirst) { + languagesMap[p] = title; + } + + for (var name in data.languages[p].aliasTitles) { + languagesMap[name] = data.languages[p].aliasTitles[name]; + } + + if(data.languages[p].require) { + dependenciesMap[p] = data.languages[p].require; + } + } + } + + var jsonLanguagesMap = JSON.stringify(languagesMap); + var jsonDependenciesMap = JSON.stringify(dependenciesMap); + + var tasks = [ + {plugin: paths.showLanguagePlugin, map: jsonLanguagesMap}, + {plugin: paths.autoloaderPlugin, map: jsonDependenciesMap} + ]; + + var cpt = 0; + var l = tasks.length; + var done = function() { + cpt++; + if(cpt === l) { + cb && cb(); + } + }; + + tasks.forEach(function(task) { + var stream = gulp.src(task.plugin) + .pipe(replace( + /\/\*languages_placeholder\[\*\/[\s\S]*?\/\*\]\*\//, + '/*languages_placeholder[*/' + task.map + '/*]*/' + )) + .pipe(gulp.dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); + + stream.on('error', done); + stream.on('end', done); + }); + }); +}); + +gulp.task('changelog', function (cb) { + return gulp.src(paths.changelog) + .pipe(replace( + /#(\d+)(?![\d\]])/g, + '[#$1](https://github.com/PrismJS/prism/issues/$1)' + )) + .pipe(replace( + /\[[\da-f]+(?:, *[\da-f]+)*\]/g, + function (match) { + return match.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)'); + } + )) + .pipe(gulp.dest('.')); +}); + +gulp.task('default', ['components', 'components-json', 'plugins', 'build']); diff --git a/docs/_style/prism-master/img/logo-ala.png b/docs/_style/prism-master/img/logo-ala.png new file mode 100644 index 0000000000..ebd3f129a9 Binary files /dev/null and b/docs/_style/prism-master/img/logo-ala.png differ diff --git a/docs/_style/prism-master/img/logo-css-tricks.png b/docs/_style/prism-master/img/logo-css-tricks.png new file mode 100644 index 0000000000..fe554ef718 Binary files /dev/null and b/docs/_style/prism-master/img/logo-css-tricks.png differ diff --git a/docs/_style/prism-master/img/logo-drupal.png b/docs/_style/prism-master/img/logo-drupal.png new file mode 100644 index 0000000000..6f2b026b7c Binary files /dev/null and b/docs/_style/prism-master/img/logo-drupal.png differ diff --git a/docs/_style/prism-master/img/logo-mdn.png b/docs/_style/prism-master/img/logo-mdn.png new file mode 100644 index 0000000000..fce7706e64 Binary files /dev/null and b/docs/_style/prism-master/img/logo-mdn.png differ diff --git a/docs/_style/prism-master/img/logo-react.png b/docs/_style/prism-master/img/logo-react.png new file mode 100644 index 0000000000..6ed805d652 Binary files /dev/null and b/docs/_style/prism-master/img/logo-react.png differ diff --git a/docs/_style/prism-master/img/logo-sitepoint.png b/docs/_style/prism-master/img/logo-sitepoint.png new file mode 100644 index 0000000000..cf275f6eca Binary files /dev/null and b/docs/_style/prism-master/img/logo-sitepoint.png differ diff --git a/docs/_style/prism-master/img/logo-smashing.png b/docs/_style/prism-master/img/logo-smashing.png new file mode 100644 index 0000000000..8d34f6f38d Binary files /dev/null and b/docs/_style/prism-master/img/logo-smashing.png differ diff --git a/docs/_style/prism-master/img/logo-stripe.png b/docs/_style/prism-master/img/logo-stripe.png new file mode 100644 index 0000000000..457ec988c4 Binary files /dev/null and b/docs/_style/prism-master/img/logo-stripe.png differ diff --git a/docs/_style/prism-master/img/spectrum.png b/docs/_style/prism-master/img/spectrum.png new file mode 100644 index 0000000000..5954bd46ff Binary files /dev/null and b/docs/_style/prism-master/img/spectrum.png differ diff --git a/docs/_style/prism-master/index.html b/docs/_style/prism-master/index.html new file mode 100644 index 0000000000..50be230c2e --- /dev/null +++ b/docs/_style/prism-master/index.html @@ -0,0 +1,321 @@ + + + + + + + +Prism + + + + + + + + + +
+
+ + + +
+ +
+

Used By

+ +

Prism is used on several websites, small and large. Some of them are:

+ +
+ Smashing Magazine + A List Apart + Mozilla Developer Network (MDN) + CSS-Tricks + SitePoint + Drupal + React + Stripe +
+
+ +
+

Examples

+ +

The Prism source, highlighted with Prism (don’t you just love how meta this is?):

+

+
+	

This page’s CSS code, highlighted with Prism:

+

+
+	

This page’s HTML, highlighted with Prism:

+

+
+	

This page’s logo (SVG), highlighted with Prism:

+

+
+	

If you’re still not sold, you can view more examples or try it out for yourself.

+
+ +
+

Full list of features

+ +
+ +
+

Limitations

+ +
+ +
+

Basic usage

+ +

You will need to include the prism.css and prism.js files you downloaded in your page. Example: +

<!DOCTYPE html>
+<html>
+<head>
+	...
+	<link href="themes/prism.css" rel="stylesheet" />
+</head>
+<body>
+	...
+	<script src="prism.js"></script>
+</body>
+</html>
+ +

Prism does its best to encourage good authoring practices. Therefore, it only works with <code> elements, since marking up code without a <code> element is semantically invalid. + According to the HTML5 spec, the recommended way to define a code language is a language-xxxx class, which is what Prism uses. + Alternatively, Prism also supports a shorter version: lang-xxxx.

+

To make things easier however, Prism assumes that this language definition is inherited. Therefore, if multiple <code> elements have the same language, you can add the language-xxxx class on one of their common ancestors. + This way, you can also define a document-wide default language, by adding a language-xxxx class on the <body> or <html> element.

+ +

If you want to opt-out of highlighting for a <code> element that is a descendant of an element with a declared code language, you can add the class language-none to it (or any non-existing language, really).

+ +

The recommended way to mark up a code block + (both for semantics and for Prism) is a <pre> element with a <code> element inside, like so:

+
<pre><code class="language-css">p { color: red }</code></pre>
+

If you use that pattern, the <pre> will automatically get the language-xxxx class (if it doesn’t already have it) and will be styled as a code block.

+ +

If you want to prevent any elements from being automatically highlighted, you can use the attribute data-manual on the <script> element you used for prism and use the API. + Example:

+
<script src="prism.js" data-manual></script>
+ +

Usage with Webpack, Browserify, & Other Bundlers

+ +

If you want to use Prism with a bundler, install Prism with npm:

+ +
$ npm install prismjs
+ +

You can then import into your bundle:

+ +
import Prism from 'prismjs';
+ +

To make it easy to configure your Prism instance with only the languages and plugins you need, use the babel plugin, + babel-plugin-prismjs. This will allow you to load + the minimum number of languages and plugins to satisfy your needs. + See that plugin's documentation for configuration details.

+ +

Usage with Node

+ +

If you want to use Prism on the server or through the command line, Prism can be used with Node.js as well. + This might be useful if you're trying to generate static HTML pages with highlighted code for environments that don't support browser-side JS, like AMP pages.

+ +

Example:

+
var Prism = require('prismjs');
+
+// The code snippet you want to highlight, as a string
+var code = "var data = 1;";
+
+// Returns a highlighted HTML string
+var html = Prism.highlight(code, Prism.languages.javascript, 'javascript');
+ +

Requiring prismjs will load the default languages: markup, css, + clike and javascript. You can load more languages with the + loadLanguages() utility, which will automatically handle any required dependencies.

+

Example:

+ +
var Prism = require('prismjs');
+var loadLanguages = require('prismjs/components/');
+loadLanguages(['haml']);
+
+// The code snippet you want to highlight, as a string
+var code = "= ['hi', 'there', 'reader!'].join \" \"";
+
+// Returns a highlighted HTML string
+var html = Prism.highlight(code, Prism.languages.haml, 'haml');
+ +

Note: Do not use loadLanguages() with Webpack or another bundler, as this will cause Webpack to include all languages and plugins. Use the babel plugin described above.

+ +
+ +
+

Supported languages

+

This is the list of all languages currently supported by Prism, with + their corresponding alias, to use in place of xxxx in the language-xxxx (or lang-xxxx) class:

+
+ +
+

Plugins

+

Plugins are additional scripts (and CSS code) that extend Prism’s functionality. Many of the following plugins are official, but are released as plugins to keep the Prism Core small for those who don’t need the extra functionality.

+ + +

No assembly required to use them. Just select them in the download page.

+

It’s very easy to write your own Prism plugins. Did you write a plugin for Prism that you want added to this list? Send a pull request!

+
+ +
+

Third-party language definitions

+ + +
+ +
+

Third-party tutorials

+ +

Several tutorials have been written by members of the community to help you integrate Prism into multiple different website types and configurations:

+ + + +

Please note that the tutorials listed here are not verified to contain correct information. Read at your risk and always check the official documentation here if something doesn’t work :)

+ +

Have you written a tutorial about Prism that’s not already included here? Send a pull request!

+
+ +
+

Credits

+ +
+ + + + + + + + + + + diff --git a/docs/_style/prism-master/logo.svg b/docs/_style/prism-master/logo.svg new file mode 100644 index 0000000000..22fcdec981 --- /dev/null +++ b/docs/_style/prism-master/logo.svg @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/docs/_style/prism-master/package.json b/docs/_style/prism-master/package.json new file mode 100644 index 0000000000..cbffb02aab --- /dev/null +++ b/docs/_style/prism-master/package.json @@ -0,0 +1,47 @@ +{ + "name": "prismjs", + "version": "1.15.0", + "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", + "main": "prism.js", + "style": "themes/prism.css", + "scripts": { + "test": "mocha tests/testrunner-tests.js && mocha tests/run.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/LeaVerou/prism.git" + }, + "keywords": [ + "prism", + "highlight" + ], + "author": "Lea Verou", + "license": "MIT", + "readmeFilename": "README.md", + "optionalDependencies": { + "clipboard": "^2.0.0" + }, + "devDependencies": { + "chai": "^2.3.0", + "gulp": "^3.8.6", + "gulp-concat": "^2.3.4", + "gulp-header": "^1.0.5", + "gulp-rename": "^1.2.0", + "gulp-uglify": "^0.3.1", + "gulp-replace": "^0.5.4", + "mocha": "^2.2.5", + "yargs": "^3.26.0" + }, + "jspm": { + "main": "prism", + "registry": "jspm", + "jspmPackage": true, + "format": "global", + "files": [ + "components/**/*.js", + "plugins/**/*", + "themes/*.css", + "prism.js" + ] + } +} diff --git a/docs/_style/prism-master/plugins/autolinker/index.html b/docs/_style/prism-master/plugins/autolinker/index.html new file mode 100644 index 0000000000..6053b62c02 --- /dev/null +++ b/docs/_style/prism-master/plugins/autolinker/index.html @@ -0,0 +1,70 @@ + + + + + + +Autolinker ▲ Prism plugins + + + + + + + + + + + +
+
+ +

Autolinker

+

Converts URLs and emails in code to clickable links. Parses Markdown links in comments.

+
+ +
+

How to use

+

URLs and emails will be linked automatically, you don’t need to do anything. To link some text inside a comment to a certain URL, + you may use the Markdown syntax: +

[Text you want to see](http://url-goes-here.com)
+
+ +
+

Examples

+ +

JavaScript

+
/**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
+ * @author Lea Verou http://lea.verou.me
+ * Reach Lea at fake@email.com (no, not really)
+ * And this is [a Markdown link](http://prismjs.com). Sweet, huh?
+ */
+var foo = 5;
+// And a single line comment http://google.com
+ +

CSS

+
@font-face {
+	src: url(http://lea.verou.me/logo.otf);
+	font-family: 'LeaVerou';
+}
+ +

HTML

+
<!-- Links in HTML, woo!
+Lea Verou http://lea.verou.me or, with Markdown, [Lea Verou](http://lea.verou.me) -->
+<img src="http://prismjs.com/img/spectrum.png" alt="In attributes too!" />
+<p>Autolinking in raw text: http://prismjs.com</p>
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/autolinker/prism-autolinker.css b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.css new file mode 100644 index 0000000000..b5f7630924 --- /dev/null +++ b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.css @@ -0,0 +1,3 @@ +.token a { + color: inherit; +} \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/autolinker/prism-autolinker.js b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.js new file mode 100644 index 0000000000..3913c98adb --- /dev/null +++ b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.js @@ -0,0 +1,81 @@ +(function(){ + +if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism +) { + return; +} + +var url = /\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&]+(?:\?[\w\-+%~/.:#=?&!$'()*,;]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;]*)?/, + email = /\b\S+@[\w.]+[a-z]{2}/, + linkMd = /\[([^\]]+)]\(([^)]+)\)/, + + // Tokens that may contain URLs and emails + candidates = ['comment', 'url', 'attr-value', 'string']; + +Prism.plugins.autolinker = { + processGrammar: function (grammar) { + // Abort if grammar has already been processed + if (!grammar || grammar['url-link']) { + return; + } + Prism.languages.DFS(grammar, function (key, def, type) { + if (candidates.indexOf(type) > -1 && Prism.util.type(def) !== 'Array') { + if (!def.pattern) { + def = this[key] = { + pattern: def + }; + } + + def.inside = def.inside || {}; + + if (type == 'comment') { + def.inside['md-link'] = linkMd; + } + if (type == 'attr-value') { + Prism.languages.insertBefore('inside', 'punctuation', { 'url-link': url }, def); + } + else { + def.inside['url-link'] = url; + } + + def.inside['email-link'] = email; + } + }); + grammar['url-link'] = url; + grammar['email-link'] = email; + } +}; + +Prism.hooks.add('before-highlight', function(env) { + Prism.plugins.autolinker.processGrammar(env.grammar); +}); + +Prism.hooks.add('wrap', function(env) { + if (/-link$/.test(env.type)) { + env.tag = 'a'; + + var href = env.content; + + if (env.type == 'email-link' && href.indexOf('mailto:') != 0) { + href = 'mailto:' + href; + } + else if (env.type == 'md-link') { + // Markdown + var match = env.content.match(linkMd); + + href = match[2]; + env.content = match[1]; + } + + env.attributes.href = href; + } + + // Silently catch any error thrown by decodeURIComponent (#1186) + try { + env.content = decodeURIComponent(env.content); + } catch(e) {} +}); + +})(); diff --git a/docs/_style/prism-master/plugins/autolinker/prism-autolinker.min.js b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.min.js new file mode 100644 index 0000000000..9fdced9560 --- /dev/null +++ b/docs/_style/prism-master/plugins/autolinker/prism-autolinker.min.js @@ -0,0 +1 @@ +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~\/.:=&]+(?:\?[\w\-+%~\/.:#=?&!$'()*,;]*)?(?:#[\w\-+%~\/.:#=?&!$'()*,;]*)?/,n=/\b\S+@[\w.]+[a-z]{2}/,e=/\[([^\]]+)]\(([^)]+)\)/,t=["comment","url","attr-value","string"];Prism.plugins.autolinker={processGrammar:function(r){r&&!r["url-link"]&&(Prism.languages.DFS(r,function(r,a,l){t.indexOf(l)>-1&&"Array"!==Prism.util.type(a)&&(a.pattern||(a=this[r]={pattern:a}),a.inside=a.inside||{},"comment"==l&&(a.inside["md-link"]=e),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},a):a.inside["url-link"]=i,a.inside["email-link"]=n)}),r["url-link"]=i,r["email-link"]=n)}},Prism.hooks.add("before-highlight",function(i){Prism.plugins.autolinker.processGrammar(i.grammar)}),Prism.hooks.add("wrap",function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var t=i.content.match(e);n=t[2],i.content=t[1]}i.attributes.href=n}try{i.content=decodeURIComponent(i.content)}catch(r){}})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/autoloader/index.html b/docs/_style/prism-master/plugins/autoloader/index.html new file mode 100644 index 0000000000..3e5357e06b --- /dev/null +++ b/docs/_style/prism-master/plugins/autoloader/index.html @@ -0,0 +1,204 @@ + + + + + + +Autoloader ▲ Prism plugins + + + + + + + + + + + +
+
+ +

Autoloader

+

Automatically loads the needed languages to highlight the code blocks.

+
+ +
+

How to use

+ +

+ The plugin will automatically handle missing grammars and load them for you. + To do this, you need to provide it with a directory of all the grammars you want. +

+

+ You can download all the available grammars by clicking on the following link: .
+ Alternatively, you can also clone the GitHub repo and take the components folder from there. +

+

+ You can then download Prism core and any plugins from the Download page, without checking any languages (or just check the languages you want to load by default, e.g. if you're using a language a lot, then you probably want to save the extra HTTP request). +

+

+ A couple of additional options are available through the configuration object Prism.plugins.autoloader. +

+ +

Specifying the grammars path

+ +

+ By default, the plugin will look for the missing grammars in the components folder. + If your files are in a different location, you can specify it using the languages_path option: +

+ +
Prism.plugins.autoloader.languages_path = 'path/to/grammars/';
+ +

Using development versions

+ +

+ By default, the plugin uses the minified versions of the grammars. + If you wish to use the development versions instead, you can set the use_minified option to false: +

+ +
Prism.plugins.autoloader.use_minified = false;
+ +

Specifying additional dependencies

+ +

+ All default dependencies are already included in the plugin. + However, there are some cases where you might want to load an additional dependency for a specific code block. + To do so, just add a data-dependencies attribute on you <code> or <pre> tags, + containing a list of comma-separated language aliases. +

+ +
<pre><code class="language-pug" data-dependencies="less">
+:less
+	foo {
+		color: @red;
+	}
+</code><pre>
+ +

Force to reload a grammar

+ +

+ The plugin usually doesn't reload a grammar if it already exists. + In some very specific cases, you might however want to do so. + If you add an exclamation mark after an alias in the data-dependencies attribute, + this language will be reloaded. +

+ +
<pre class="language-markup" data-dependencies="markup,css!"><code>
+ +
+ +
+

Examples

+ +

Note that no languages are loaded on this page by default.

+ +

Basic usage with some Perl code:

+
my ($class, $filename) = @_;
+ +

The Less filter used in Pug:

+
:less
+	foo {
+		color: @red;
+	}
+ +
+ + + + + + + + + + + + + + + + diff --git a/docs/_style/prism-master/plugins/autoloader/prism-autoloader.js b/docs/_style/prism-master/plugins/autoloader/prism-autoloader.js new file mode 100644 index 0000000000..4d6a601450 --- /dev/null +++ b/docs/_style/prism-master/plugins/autoloader/prism-autoloader.js @@ -0,0 +1,209 @@ +(function () { + if (typeof self === 'undefined' || !self.Prism || !self.document || !document.createElement) { + return; + } + + // The dependencies map is built automatically with gulp + var lang_dependencies = /*languages_placeholder[*/{"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","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","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + + var lang_data = {}; + + var ignored_language = 'none'; + + var script = document.getElementsByTagName('script'); + script = script[script.length - 1]; + var languages_path = 'components/'; + if(script.hasAttribute('data-autoloader-path')) { + var path = script.getAttribute('data-autoloader-path').trim(); + if(path.length > 0 && !/^[a-z]+:\/\//i.test(script.src)) { + languages_path = path.replace(/\/?$/, '/'); + } + } else if (/[\w-]+\.js$/.test(script.src)) { + languages_path = script.src.replace(/[\w-]+\.js$/, 'components/'); + } + var config = Prism.plugins.autoloader = { + languages_path: languages_path, + use_minified: true + }; + + /** + * Lazy loads an external script + * @param {string} src + * @param {function=} success + * @param {function=} error + */ + var addScript = function (src, success, error) { + var s = document.createElement('script'); + s.src = src; + s.async = true; + s.onload = function() { + document.body.removeChild(s); + success && success(); + }; + s.onerror = function() { + document.body.removeChild(s); + error && error(); + }; + document.body.appendChild(s); + }; + + /** + * Returns the path to a grammar, using the language_path and use_minified config keys. + * @param {string} lang + * @returns {string} + */ + var getLanguagePath = function (lang) { + return config.languages_path + + 'prism-' + lang + + (config.use_minified ? '.min' : '') + '.js' + }; + + /** + * Tries to load a grammar and + * highlight again the given element once loaded. + * @param {string} lang + * @param {HTMLElement} elt + */ + var registerElement = function (lang, elt) { + var data = lang_data[lang]; + if (!data) { + data = lang_data[lang] = {}; + } + + // Look for additional dependencies defined on the or
 tags
+		var deps = elt.getAttribute('data-dependencies');
+		if (!deps && elt.parentNode && elt.parentNode.tagName.toLowerCase() === 'pre') {
+			deps = elt.parentNode.getAttribute('data-dependencies');
+		}
+
+		if (deps) {
+			deps = deps.split(/\s*,\s*/g);
+		} else {
+			deps = [];
+		}
+
+		loadLanguages(deps, function () {
+			loadLanguage(lang, function () {
+				Prism.highlightElement(elt);
+			});
+		});
+	};
+
+	/**
+	 * Sequentially loads an array of grammars.
+	 * @param {string[]|string} langs
+	 * @param {function=} success
+	 * @param {function=} error
+	 */
+	var loadLanguages = function (langs, success, error) {
+		if (typeof langs === 'string') {
+			langs = [langs];
+		}
+		var i = 0;
+		var l = langs.length;
+		var f = function () {
+			if (i < l) {
+				loadLanguage(langs[i], function () {
+					i++;
+					f();
+				}, function () {
+					error && error(langs[i]);
+				});
+			} else if (i === l) {
+				success && success(langs);
+			}
+		};
+		f();
+	};
+
+	/**
+	 * Load a grammar with its dependencies
+	 * @param {string} lang
+	 * @param {function=} success
+	 * @param {function=} error
+	 */
+	var loadLanguage = function (lang, success, error) {
+		var load = function () {
+			var force = false;
+			// Do we want to force reload the grammar?
+			if (lang.indexOf('!') >= 0) {
+				force = true;
+				lang = lang.replace('!', '');
+			}
+
+			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);
+			}
+
+			if (!force && Prism.languages[lang]) {
+				languageSuccess(lang);
+			} else if (!force && data.error) {
+				languageError(lang);
+			} else if (force || !data.loading) {
+				data.loading = true;
+				var src = getLanguagePath(lang);
+				addScript(src, function () {
+					data.loading = false;
+					languageSuccess(lang);
+
+				}, function () {
+					data.loading = false;
+					data.error = true;
+					languageError(lang);
+				});
+			}
+		};
+		var dependencies = lang_dependencies[lang];
+		if(dependencies && dependencies.length) {
+			loadLanguages(dependencies, load);
+		} else {
+			load();
+		}
+	};
+
+	/**
+	 * Runs all success callbacks for this language.
+	 * @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);
+			});
+		}
+	};
+
+	/**
+	 * Runs all error callbacks for this language.
+	 * @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);
+			});
+		}
+	};
+
+	Prism.hooks.add('complete', function (env) {
+		if (env.element && env.language && !env.grammar) {
+			if (env.language !== ignored_language) {
+				registerElement(env.language, env.element);
+			}
+		}
+	});
+
+}());
\ No newline at end of file
diff --git a/docs/_style/prism-master/plugins/autoloader/prism-autoloader.min.js b/docs/_style/prism-master/plugins/autoloader/prism-autoloader.min.js
new file mode 100644
index 0000000000..629f1b2bf0
--- /dev/null
+++ b/docs/_style/prism-master/plugins/autoloader/prism-autoloader.min.js
@@ -0,0 +1 @@
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={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",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",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}();
\ No newline at end of file
diff --git a/docs/_style/prism-master/plugins/command-line/index.html b/docs/_style/prism-master/plugins/command-line/index.html
new file mode 100644
index 0000000000..109138b671
--- /dev/null
+++ b/docs/_style/prism-master/plugins/command-line/index.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+Command Line ▲ Prism plugins
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +

Command Line

+

Display a command line with a prompt and, optionally, the output/response from the commands.

+
+ +
+

How to use

+ +

This is intended for code blocks (<pre><code>) and not for inline code.

+ +

Add class command-line to your <pre>. For a server command line, specify the user and host names using the data-user and data-host attributes. The resulting prompt displays a # for the root user and $ for all other users. For any other command line, such as a Windows prompt, you may specify the entire prompt using the data-prompt attribute.

+ +

Optional: You may specify the lines to be presented as output (no prompt and no highlighting) through the data-output attribute on the <pre> element in the following simple format:

+
    +
  • A single number refers to the line with that number
  • +
  • Ranges are denoted by two numbers, separated with a hyphen (-)
  • +
  • Multiple line numbers or ranges are separated by commas.
  • +
  • Whitespace is allowed anywhere and will be stripped off.
  • +
+ +

Examples:

+
+
5
+
The 5th line
+ +
1-5
+
Lines 1 through 5
+ +
1,4
+
Line 1 and line 4
+ +
1-2, 5, 9-20
+
Lines 1 through 2, line 5, lines 9 through 20
+
+ +

Optional: To automatically present some lines as output, you can prefix those lines with any string and specify the prefix using the data-filter-output attribute on the <pre> element. For example, data-filter-output="(out)" will treat lines beginning with (out) as output and remove the prefix.

+
+ +
+

Examples

+ +

Root User Without Output

+
cd /usr/local/etc
+cp php.ini php.ini.bak
+vi php.ini
+ +

Non-Root User With Output

+
pwd
+/usr/home/chris/bin
+ls -la
+total 2
+drwxr-xr-x   2 chris  chris     11 Jan 10 16:48 .
+drwxr--r-x  45 chris  chris     92 Feb 14 11:10 ..
+-rwxr-xr-x   1 chris  chris    444 Aug 25  2013 backup
+-rwxr-xr-x   1 chris  chris    642 Jan 17 14:42 deploy
+ +

Windows PowerShell With Output

+
dir
+
+
+    Directory: C:\Users\Chris
+
+
+Mode                LastWriteTime     Length Name
+----                -------------     ------ ----
+d-r--        10/14/2015   5:06 PM            Contacts
+d-r--        12/12/2015   1:47 PM            Desktop
+d-r--         11/4/2015   7:59 PM            Documents
+d-r--        10/14/2015   5:06 PM            Downloads
+d-r--        10/14/2015   5:06 PM            Favorites
+d-r--        10/14/2015   5:06 PM            Links
+d-r--        10/14/2015   5:06 PM            Music
+d-r--        10/14/2015   5:06 PM            Pictures
+d-r--        10/14/2015   5:06 PM            Saved Games
+d-r--        10/14/2015   5:06 PM            Searches
+d-r--        10/14/2015   5:06 PM            Videos
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/command-line/prism-command-line.css b/docs/_style/prism-master/plugins/command-line/prism-command-line.css new file mode 100644 index 0000000000..153a87076a --- /dev/null +++ b/docs/_style/prism-master/plugins/command-line/prism-command-line.css @@ -0,0 +1,33 @@ +.command-line-prompt { + border-right: 1px solid #999; + display: block; + float: left; + font-size: 100%; + letter-spacing: -1px; + margin-right: 1em; + pointer-events: none; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.command-line-prompt > span:before { + color: #999; + content: ' '; + display: block; + padding-right: 0.8em; +} + +.command-line-prompt > span[data-user]:before { + content: "[" attr(data-user) "@" attr(data-host) "] $"; +} + +.command-line-prompt > span[data-user="root"]:before { + content: "[" attr(data-user) "@" attr(data-host) "] #"; +} + +.command-line-prompt > span[data-prompt]:before { + content: attr(data-prompt); +} diff --git a/docs/_style/prism-master/plugins/command-line/prism-command-line.js b/docs/_style/prism-master/plugins/command-line/prism-command-line.js new file mode 100644 index 0000000000..3c77991461 --- /dev/null +++ b/docs/_style/prism-master/plugins/command-line/prism-command-line.js @@ -0,0 +1,139 @@ +(function() { + +if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; +} + +var clsReg = /(?:^|\s)command-line(?:\s|$)/; + +Prism.hooks.add('before-highlight', function (env) { + var vars = env.vars = env.vars || {}; + var commandLine = vars['command-line'] = vars['command-line'] || {}; + + if (commandLine.complete || !env.code) { + commandLine.complete = true; + return; + } + + // Works only for wrapped inside
 (not inline).
+	var pre = env.element.parentNode;
+	if (!pre || !/pre/i.test(pre.nodeName) || // Abort only if neither the 
 nor the  have the class
+		(!clsReg.test(pre.className) && !clsReg.test(env.element.className))) {
+		commandLine.complete = true;
+		return;
+	}
+
+	if (env.element.querySelector('.command-line-prompt')) { // Abort if prompt already exists.
+		commandLine.complete = true;
+		return;
+	}
+
+	var codeLines = env.code.split('\n');
+	commandLine.numberOfLines = codeLines.length;
+	var outputLines = commandLine.outputLines = [];
+
+	var outputSections = pre.getAttribute('data-output');
+	var outputFilter = pre.getAttribute('data-filter-output');
+	if (outputSections || outputSections === '') { // The user specified the output lines. -- cwells
+		outputSections = outputSections.split(',');
+		for (var i = 0; i < outputSections.length; i++) { // Parse the output sections into start/end ranges. -- cwells
+			var range = outputSections[i].split('-');
+			var outputStart = parseInt(range[0], 10);
+			var outputEnd = (range.length === 2 ? parseInt(range[1], 10) : outputStart);
+
+			if (!isNaN(outputStart) && !isNaN(outputEnd)) {
+				if (outputStart < 1) {
+					outputStart = 1;
+				}
+				if (outputEnd > codeLines.length) {
+					outputEnd = codeLines.length;
+				}
+				// Convert start and end to 0-based to simplify the arrays. -- cwells
+				outputStart--;
+				outputEnd--;
+				// Save the output line in an array and clear it in the code so it's not highlighted. -- cwells
+				for (var j = outputStart; j <= outputEnd; j++) {
+					outputLines[j] = codeLines[j];
+					codeLines[j] = '';
+				}
+			}
+		}
+	} else if (outputFilter) { // Treat lines beginning with this string as output. -- cwells
+		for (var i = 0; i < codeLines.length; i++) {
+			if (codeLines[i].indexOf(outputFilter) === 0) { // This line is output. -- cwells
+				outputLines[i] = codeLines[i].slice(outputFilter.length);
+				codeLines[i] = '';
+			}
+		}
+	}
+
+	env.code = codeLines.join('\n');
+});
+
+Prism.hooks.add('before-insert', function (env) {
+	var vars = env.vars = env.vars || {};
+	var commandLine = vars['command-line'] = vars['command-line'] || {};
+	if (commandLine.complete) {
+		return;
+	}
+
+	// Reinsert the output lines into the highlighted code. -- cwells
+	var codeLines = env.highlightedCode.split('\n');
+	for (var i = 0; i < commandLine.outputLines.length; i++) {
+		if (commandLine.outputLines.hasOwnProperty(i)) {
+			codeLines[i] = commandLine.outputLines[i];
+		}
+	}
+	env.highlightedCode = codeLines.join('\n');
+});
+
+Prism.hooks.add('complete', function (env) {
+	var vars = env.vars = env.vars || {};
+	var commandLine = vars['command-line'] = vars['command-line'] || {};
+	if (commandLine.complete) {
+		return;
+	}
+
+	var pre = env.element.parentNode;
+	if (clsReg.test(env.element.className)) { // Remove the class "command-line" from the 
+		env.element.className = env.element.className.replace(clsReg, ' ');
+	}
+	if (!clsReg.test(pre.className)) { // Add the class "command-line" to the 
+		pre.className += ' command-line';
+	}
+
+	var getAttribute = function(key, defaultValue) {
+		return (pre.getAttribute(key) || defaultValue).replace(/"/g, '"');
+	};
+
+	// Create the "rows" that will become the command-line prompts. -- cwells
+	var promptLines = new Array(commandLine.numberOfLines + 1);
+	var promptText = getAttribute('data-prompt', '');
+	if (promptText !== '') {
+		promptLines = promptLines.join('');
+	} else {
+		var user = getAttribute('data-user', 'user');
+		var host = getAttribute('data-host', 'localhost');
+		promptLines = promptLines.join('');
+	}
+
+	// Create the wrapper element. -- cwells
+	var prompt = document.createElement('span');
+	prompt.className = 'command-line-prompt';
+	prompt.innerHTML = promptLines;
+
+	// Remove the prompt from the output lines. -- cwells
+	for (var i = 0; i < commandLine.outputLines.length; i++) {
+		if (commandLine.outputLines.hasOwnProperty(i)) {
+			var node = prompt.children[i];
+			node.removeAttribute('data-user');
+			node.removeAttribute('data-host');
+			node.removeAttribute('data-prompt');
+		}
+	}
+
+	env.element.insertBefore(prompt, env.element.firstChild);
+	commandLine.complete = true;
+});
+
+}());
diff --git a/docs/_style/prism-master/plugins/command-line/prism-command-line.min.js b/docs/_style/prism-master/plugins/command-line/prism-command-line.min.js
new file mode 100644
index 0000000000..44d011ac44
--- /dev/null
+++ b/docs/_style/prism-master/plugins/command-line/prism-command-line.min.js
@@ -0,0 +1 @@
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e=/(?:^|\s)command-line(?:\s|$)/;Prism.hooks.add("before-highlight",function(t){var a=t.vars=t.vars||{},n=a["command-line"]=a["command-line"]||{};if(n.complete||!t.code)return n.complete=!0,void 0;var r=t.element.parentNode;if(!r||!/pre/i.test(r.nodeName)||!e.test(r.className)&&!e.test(t.element.className))return n.complete=!0,void 0;if(t.element.querySelector(".command-line-prompt"))return n.complete=!0,void 0;var o=t.code.split("\n");n.numberOfLines=o.length;var s=n.outputLines=[],i=r.getAttribute("data-output"),l=r.getAttribute("data-filter-output");if(i||""===i){i=i.split(",");for(var m=0;mp&&(p=1),c>o.length&&(c=o.length),p--,c--;for(var u=p;c>=u;u++)s[u]=o[u],o[u]=""}}}else if(l)for(var m=0;m');else{var l=o("data-user","user"),m=o("data-host","localhost");s=s.join('')}var d=document.createElement("span");d.className="command-line-prompt",d.innerHTML=s;for(var p=0;p
+
+
+
+	
+	
+	Copy to Clipboard ▲ Prism plugins
+	
+	
+	
+	
+	
+
+	
+	
+
+
+
+
+
+ +

Copy to Clipboard

+

Add a button that copies the code block to the clipboard when clicked.

+
+ +
+

How to use

+

In addition to including the plugin file with your PrismJS build, ensure Clipboard.js is loaded before the plugin.

+ +

The simplest way to include Clipboard.js is to use any of the + recommended CDNs. If you're using Browserify, Clipboard.js will be loaded auotmatically + if it's included in your package.json. + If you don't load Clipboard.js yourself, the plugin will load it from a CDN for you.

+ +

+
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.js new file mode 100644 index 0000000000..0b185f4734 --- /dev/null +++ b/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -0,0 +1,75 @@ +(function(){ + if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; + } + + if (!Prism.plugins.toolbar) { + console.warn('Copy to Clipboard plugin loaded before Toolbar plugin.'); + + return; + } + + var ClipboardJS = window.ClipboardJS || undefined; + + if (!ClipboardJS && typeof require === 'function') { + ClipboardJS = require('clipboard'); + } + + var callbacks = []; + + if (!ClipboardJS) { + var script = document.createElement('script'); + var head = document.querySelector('head'); + + script.onload = function() { + ClipboardJS = window.ClipboardJS; + + if (ClipboardJS) { + while (callbacks.length) { + callbacks.pop()(); + } + } + }; + + script.src = 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'; + head.appendChild(script); + } + + Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) { + var linkCopy = document.createElement('a'); + linkCopy.textContent = 'Copy'; + + if (!ClipboardJS) { + callbacks.push(registerClipboard); + } else { + registerClipboard(); + } + + return linkCopy; + + function registerClipboard() { + var clip = new ClipboardJS(linkCopy, { + 'text': function () { + return env.code; + } + }); + + clip.on('success', function() { + linkCopy.textContent = 'Copied!'; + + resetText(); + }); + clip.on('error', function () { + linkCopy.textContent = 'Press Ctrl+C to copy'; + + resetText(); + }); + } + + function resetText() { + setTimeout(function () { + linkCopy.textContent = 'Copy'; + }, 5000); + } + }); +})(); diff --git a/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js new file mode 100644 index 0000000000..aa5742db56 --- /dev/null +++ b/docs/_style/prism-master/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -0,0 +1 @@ +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."),void 0;var o=window.ClipboardJS||void 0;o||"function"!=typeof require||(o=require("clipboard"));var e=[];if(!o){var t=document.createElement("script"),n=document.querySelector("head");t.onload=function(){if(o=window.ClipboardJS)for(;e.length;)e.pop()()},t.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",n.appendChild(t)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){function n(){var e=new o(i,{text:function(){return t.code}});e.on("success",function(){i.textContent="Copied!",r()}),e.on("error",function(){i.textContent="Press Ctrl+C to copy",r()})}function r(){setTimeout(function(){i.textContent="Copy"},5e3)}var i=document.createElement("a");return i.textContent="Copy",o?n():e.push(n),i})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/custom-class/index.html b/docs/_style/prism-master/plugins/custom-class/index.html new file mode 100644 index 0000000000..ee4fade718 --- /dev/null +++ b/docs/_style/prism-master/plugins/custom-class/index.html @@ -0,0 +1,133 @@ + + + + + + +Custom Class ▲ Prism plugins + + + + + + + + + +
+
+ +

Custom Class

+

This plugin allows you to prefix Prism default classes (.comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).

+
+ +
+

Motivation

+ +

Prism default classes are sensible but fixed and too generic. This plugin provide some ways to customize those classes to suit your needs. Example usages:

+ +
    +
  • + You want to add namespace for all of them (like .prism--comment) to avoid conflict with your existing classes. +
  • +
  • + You use a naming convention (like BEM). You want to write classes like .editor__comment. +
  • +
  • You use + CSS Modules. You want to use your hashed classes, like .comment_7sh3a. +
  • +
+ +

Features

+ +

This plugin currently provides 2 features:

+ +

1. Prefix all Prism classes with a string

+ + Prism.plugins.customClass.prefix('prism--') + +

2. Replace some Prism classes with your defined ones via an object

+ +
Prism.plugins.customClass.map({
+	keyword: 'special-keyword',
+	string: 'string_ch29s',
+	comment: 'comment_93jsa'
+})
+ +

Object's keys are the tokens you want to replace (eg: comment), with their values being the classes you want to use (eg: my-comment). Tokens which are not specified will stay the same.

+ +

Notes

+ +
    +
  • +

    Feature functions must be called AFTER Prism and this plugin. For example:

    + +
    <!-- 1. load prism -->
    +<script src="prism.js"></script>
    +<!-- 2. load the plugin if you don't include it inside prism when download -->
    +<script src="plugins/custom-class/custom-class.js"></script>
    +<!-- 3. call the feature you want to use -->
    +<script>
    +	Prism.plugins.customClass.map(myClassMap);
    +	Prism.plugins.customClass.prefix(myPrefixString);
    +</script>
    + +
  • + +
  • In most cases, using 1 feature is enough. However, it is possible to use both of them together if you want (Result will be like .my-namespace--comment_93jsa).
  • + +
+ +

CSS Modules Usage:

+ +

The initial purpose of this plugin is to be used with CSS Modules. It works perfectly with the class map object returned by CSS Modules. For example:

+ +
import Prism from 'prismjs';
+import classMap from 'styles/editor-class-map.css';
+Prism.plugins.customClass.map(classMap)
+ +
+ +
+

Example

+ +

Input

+
<pre class="language-javascript"><code>
+	var foo = 'bar';
+</code></pre>
+ +

Options

+
Prism.plugins.customClass.map({
+	keyword: 'special-keyword',
+	string: 'my-string'
+});
+Prism.plugins.customClass.prefix('pr-');
+ +

Output

+
<pre class="language-javascript"><code>
+	<span class="pr-token pr-special-keyword">var</span>
+	foo
+	<span class="pr-token pr-operator">=</span>
+	<span class="pr-my-string">'bar'</span>
+	<span class="pr-token pr-punctuation">;</span>
+</code></pre>
+
+ +
+

Todo

+ +
+ +
+ + + + + + + + + diff --git a/docs/_style/prism-master/plugins/custom-class/prism-custom-class.js b/docs/_style/prism-master/plugins/custom-class/prism-custom-class.js new file mode 100644 index 0000000000..bb5bd6a6eb --- /dev/null +++ b/docs/_style/prism-master/plugins/custom-class/prism-custom-class.js @@ -0,0 +1,31 @@ +(function(){ + +if ( + (typeof self === 'undefined' || !self.Prism) && + (typeof global === 'undefined' || !global.Prism) +) { + return; +} + +var options = { + classMap: {} +}; +Prism.plugins.customClass = { + map: function map(cm) { + options.classMap = cm; + }, + prefix: function prefix(string) { + options.prefixString = string; + } +} + +Prism.hooks.add('wrap', function (env) { + if (!options.classMap && !options.prefixString) { + return; + } + env.classes = env.classes.map(function(c) { + return (options.prefixString || '') + (options.classMap[c] || c); + }); +}); + +})(); diff --git a/docs/_style/prism-master/plugins/custom-class/prism-custom-class.min.js b/docs/_style/prism-master/plugins/custom-class/prism-custom-class.min.js new file mode 100644 index 0000000000..f22063f557 --- /dev/null +++ b/docs/_style/prism-master/plugins/custom-class/prism-custom-class.min.js @@ -0,0 +1 @@ +!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var s={classMap:{}};Prism.plugins.customClass={map:function(i){s.classMap=i},prefix:function(i){s.prefixString=i}},Prism.hooks.add("wrap",function(i){(s.classMap||s.prefixString)&&(i.classes=i.classes.map(function(i){return(s.prefixString||"")+(s.classMap[i]||i)}))})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/data-uri-highlight/index.html b/docs/_style/prism-master/plugins/data-uri-highlight/index.html new file mode 100644 index 0000000000..380be2d67e --- /dev/null +++ b/docs/_style/prism-master/plugins/data-uri-highlight/index.html @@ -0,0 +1,60 @@ + + + + + + +Data-URI Highlight ▲ Prism plugins + + + + + + + + + + + +
+
+ +

Data-URI Highlight

+

Highlights data-URI contents.

+
+ +
+

How to use

+

Data-URIs will be highlighted automatically, provided the needed grammar is loaded. + The grammar to use is guessed using the MIME type information.

+
+ +
+

Example

+ +
div {
+    border: 40px solid transparent;
+    border-image: 33.334% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30"> \
+                          <circle cx="5" cy="5" r="5" fill="%23ab4"/><circle cx="15" cy="5" r="5" fill="%23655"/> \
+                          <circle cx="25" cy="5" r="5" fill="%23e07"/><circle cx="5" cy="15" r="5" fill="%23655"/> \
+                          <circle cx="15" cy="15" r="5" fill="hsl(15, 25%, 75%)"/> \
+                          <circle cx="25" cy="15" r="5" fill="%23655"/><circle cx="5" cy="25" r="5" fill="%23fb3"/> \
+                          <circle cx="15" cy="25" r="5" fill="%23655"/><circle cx="25" cy="25" r="5" fill="%2358a"/></svg>');
+    padding: 1em;
+    max-width: 20em;
+    font: 130%/1.6 Baskerville, Palatino, serif;
+}
+ +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.js b/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.js new file mode 100644 index 0000000000..7ff8d1fd5f --- /dev/null +++ b/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.js @@ -0,0 +1,98 @@ +(function () { + + if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism + ) { + return; + } + + var autoLinkerProcess = function (grammar) { + if (Prism.plugins.autolinker) { + Prism.plugins.autolinker.processGrammar(grammar); + } + return grammar; + }; + var dataURI = { + pattern: /(.)\bdata:[^\/]+\/[^,]+,(?:(?!\1)[\s\S]|\\\1)+(?=\1)/, + lookbehind: true, + inside: { + 'language-css': { + pattern: /(data:[^\/]+\/(?:[^+,]+\+)?css,)[\s\S]+/, + lookbehind: true + }, + 'language-javascript': { + pattern: /(data:[^\/]+\/(?:[^+,]+\+)?javascript,)[\s\S]+/, + lookbehind: true + }, + 'language-json': { + pattern: /(data:[^\/]+\/(?:[^+,]+\+)?json,)[\s\S]+/, + lookbehind: true + }, + 'language-markup': { + pattern: /(data:[^\/]+\/(?:[^+,]+\+)?(?:html|xml),)[\s\S]+/, + lookbehind: true + } + } + }; + + // Tokens that may contain URLs + var candidates = ['url', 'attr-value', 'string']; + + Prism.plugins.dataURIHighlight = { + processGrammar: function (grammar) { + // Abort if grammar has already been processed + if (!grammar || grammar['data-uri']) { + return; + } + + Prism.languages.DFS(grammar, function (key, def, type) { + if (candidates.indexOf(type) > -1 && Prism.util.type(def) !== 'Array') { + if (!def.pattern) { + def = this[key] = { + pattern: def + }; + } + + def.inside = def.inside || {}; + + if (type == 'attr-value') { + Prism.languages.insertBefore('inside', def.inside['url-link'] ? 'url-link' : 'punctuation', { + 'data-uri': dataURI + }, def); + } + else { + if (def.inside['url-link']) { + Prism.languages.insertBefore('inside', 'url-link', { + 'data-uri': dataURI + }, def); + } else { + def.inside['data-uri'] = dataURI; + } + } + } + }); + grammar['data-uri'] = dataURI; + } + }; + + Prism.hooks.add('before-highlight', function (env) { + // Prepare the needed grammars for this code block + if (dataURI.pattern.test(env.code)) { + for (var p in dataURI.inside) { + if (dataURI.inside.hasOwnProperty(p)) { + if (!dataURI.inside[p].inside && dataURI.inside[p].pattern.test(env.code)) { + var lang = p.match(/^language-(.+)/)[1]; + if (Prism.languages[lang]) { + dataURI.inside[p].inside = { + rest: autoLinkerProcess(Prism.languages[lang]) + }; + } + } + } + } + } + + Prism.plugins.dataURIHighlight.processGrammar(env.grammar); + }); +}()); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.min.js b/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.min.js new file mode 100644 index 0000000000..479828d93f --- /dev/null +++ b/docs/_style/prism-master/plugins/data-uri-highlight/prism-data-uri-highlight.min.js @@ -0,0 +1 @@ +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var i=function(i){return Prism.plugins.autolinker&&Prism.plugins.autolinker.processGrammar(i),i},a={pattern:/(.)\bdata:[^\/]+\/[^,]+,(?:(?!\1)[\s\S]|\\\1)+(?=\1)/,lookbehind:!0,inside:{"language-css":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?css,)[\s\S]+/,lookbehind:!0},"language-javascript":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?javascript,)[\s\S]+/,lookbehind:!0},"language-json":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?json,)[\s\S]+/,lookbehind:!0},"language-markup":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?(?:html|xml),)[\s\S]+/,lookbehind:!0}}},n=["url","attr-value","string"];Prism.plugins.dataURIHighlight={processGrammar:function(i){i&&!i["data-uri"]&&(Prism.languages.DFS(i,function(i,e,r){n.indexOf(r)>-1&&"Array"!==Prism.util.type(e)&&(e.pattern||(e=this[i]={pattern:e}),e.inside=e.inside||{},"attr-value"==r?Prism.languages.insertBefore("inside",e.inside["url-link"]?"url-link":"punctuation",{"data-uri":a},e):e.inside["url-link"]?Prism.languages.insertBefore("inside","url-link",{"data-uri":a},e):e.inside["data-uri"]=a)}),i["data-uri"]=a)}},Prism.hooks.add("before-highlight",function(n){if(a.pattern.test(n.code))for(var e in a.inside)if(a.inside.hasOwnProperty(e)&&!a.inside[e].inside&&a.inside[e].pattern.test(n.code)){var r=e.match(/^language-(.+)/)[1];Prism.languages[r]&&(a.inside[e].inside={rest:i(Prism.languages[r])})}Prism.plugins.dataURIHighlight.processGrammar(n.grammar)})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/file-highlight/index.html b/docs/_style/prism-master/plugins/file-highlight/index.html new file mode 100644 index 0000000000..e66b9897ee --- /dev/null +++ b/docs/_style/prism-master/plugins/file-highlight/index.html @@ -0,0 +1,75 @@ + + + + + + +File Highlight ▲ Prism plugins + + + + + + + + + + + +
+
+ +

File Highlight

+

Fetch external files and highlight them with Prism. Used on the Prism website itself.

+
+ +
+

How to use

+ +

Use the data-src attribute on empty <pre> elements, like so:

+ +
<pre data-src="myfile.js"></pre>
+ +

You don’t need to specify the language, it’s automatically determined by the file extension. + If, however, the language cannot be determined from the file extension or the file extension is incorrect, you may specify a language as well (with the usual class name way).

+ +

Please note that the files are fetched with XMLHttpRequest. This means that if the file is on a different origin, fetching it will fail, unless CORS is enabled on that website.

+ +

+ When used in conjunction with the Toolbar plugin, this plugin can also display a button to download the file. + To use it, add a data-download-link attribute on the <pre> element.
+ Optionally, the text can also be customized by using a data-download-link-label attribute. +

+
<pre data-src="myfile.js" data-download-link data-download-link-label="Download this file"></pre>
+
+ +
+

Examples

+ +

The plugin’s JS code:

+

+	
+	

This page:

+

+
+	

File that doesn’t exist:

+

+
+	

With a download button:

+

+
+	

For more examples, browse around the Prism website. Most large code samples are actually files fetched with this plugin.

+
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.js b/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.js new file mode 100644 index 0000000000..65efaf9f07 --- /dev/null +++ b/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.js @@ -0,0 +1,105 @@ +(function () { + if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { + return; + } + + /** + * @param {Element} [container=document] + */ + self.Prism.fileHighlight = function(container) { + container = container || document; + + var Extensions = { + 'js': 'javascript', + 'py': 'python', + 'rb': 'ruby', + 'ps1': 'powershell', + 'psm1': 'powershell', + 'sh': 'bash', + 'bat': 'batch', + 'h': 'c', + 'tex': 'latex' + }; + + Array.prototype.slice.call(container.querySelectorAll('pre[data-src]')).forEach(function (pre) { + // ignore if already loaded + if (pre.hasAttribute('data-src-loaded')) { + return; + } + + // load current + var src = pre.getAttribute('data-src'); + + var language, parent = pre; + var lang = /\blang(?:uage)?-([\w-]+)\b/i; + while (parent && !lang.test(parent.className)) { + parent = parent.parentNode; + } + + if (parent) { + language = (pre.className.match(lang) || [, ''])[1]; + } + + if (!language) { + var extension = (src.match(/\.(\w+)$/) || [, ''])[1]; + language = Extensions[extension] || extension; + } + + var code = document.createElement('code'); + code.className = 'language-' + language; + + pre.textContent = ''; + + code.textContent = 'Loading…'; + + pre.appendChild(code); + + var xhr = new XMLHttpRequest(); + + xhr.open('GET', src, true); + + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + + if (xhr.status < 400 && xhr.responseText) { + code.textContent = xhr.responseText; + + Prism.highlightElement(code); + // mark as loaded + pre.setAttribute('data-src-loaded', ''); + } + else if (xhr.status >= 400) { + code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText; + } + else { + code.textContent = '✖ Error: File does not exist or is empty'; + } + } + }; + + xhr.send(null); + }); + + if (Prism.plugins.toolbar) { + Prism.plugins.toolbar.registerButton('download-file', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { + return; + } + var src = pre.getAttribute('data-src'); + var a = document.createElement('a'); + a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; + a.setAttribute('download', ''); + a.href = src; + return a; + }); + } + + }; + + document.addEventListener('DOMContentLoaded', function () { + // execute inside handler, for dropping Event as argumnet + self.Prism.fileHighlight(); + }); + +})(); diff --git a/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.min.js b/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.min.js new file mode 100644 index 0000000000..31869b3c84 --- /dev/null +++ b/docs/_style/prism-master/plugins/file-highlight/prism-file-highlight.min.js @@ -0,0 +1 @@ +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(t){t=t||document;var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(t.querySelectorAll("pre[data-src]")).forEach(function(t){if(!t.hasAttribute("data-src-loaded")){for(var a,n=t.getAttribute("data-src"),r=t,s=/\blang(?:uage)?-([\w-]+)\b/i;r&&!s.test(r.className);)r=r.parentNode;if(r&&(a=(t.className.match(s)||[,""])[1]),!a){var o=(n.match(/\.(\w+)$/)||[,""])[1];a=e[o]||o}var l=document.createElement("code");l.className="language-"+a,t.textContent="",l.textContent="Loading…",t.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l),t.setAttribute("data-src-loaded","")):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()}))}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/highlight-keywords/index.html b/docs/_style/prism-master/plugins/highlight-keywords/index.html new file mode 100644 index 0000000000..466587346b --- /dev/null +++ b/docs/_style/prism-master/plugins/highlight-keywords/index.html @@ -0,0 +1,51 @@ + + + + + + +Highlight Keywords ▲ Prism plugins + + + + + + + + + + +
+
+ +

Highlight Keywords

+

This plugin adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.

+
+ +
+

Examples

+ +

JavaScript

+

+
+	

HTML (Markup)

+

+
+
+ + + + + + + + + + diff --git a/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.js b/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.js new file mode 100644 index 0000000000..32b2812273 --- /dev/null +++ b/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.js @@ -0,0 +1,17 @@ +(function(){ + +if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism +) { + return; +} + +Prism.hooks.add('wrap', function(env) { + if (env.type !== "keyword") { + return; + } + env.classes.push('keyword-' + env.content); +}); + +})(); diff --git a/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.min.js b/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.min.js new file mode 100644 index 0000000000..c4326feadb --- /dev/null +++ b/docs/_style/prism-master/plugins/highlight-keywords/prism-highlight-keywords.min.js @@ -0,0 +1 @@ +!function(){"undefined"!=typeof self&&!self.Prism||"undefined"!=typeof global&&!global.Prism||Prism.hooks.add("wrap",function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)})}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/index.html b/docs/_style/prism-master/plugins/index.html new file mode 100644 index 0000000000..7b4a48a7af --- /dev/null +++ b/docs/_style/prism-master/plugins/index.html @@ -0,0 +1,42 @@ + + + + + + +Plugins ▲ Prism + + + + + + + + + + + +
+
+
+ +
+

Available plugins

+
    +
    + +
    +

    Contribute

    +

    Writing Prism plugins is easy! Read how at the “Extending Prism” section. +

    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/jsonp-highlight/index.html b/docs/_style/prism-master/plugins/jsonp-highlight/index.html new file mode 100644 index 0000000000..2ad4ac9a1f --- /dev/null +++ b/docs/_style/prism-master/plugins/jsonp-highlight/index.html @@ -0,0 +1,174 @@ + + + + + + +JSONP Highlight ▲ Prism plugins + + + + + + + + + + +
    +
    + +

    JSONP Highlight

    +

    Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).

    +
    + +
    +

    How to use

    + +

    Use the data-jsonp attribute on <pre> elements, like so:

    + +
    <pre
    +  class="language-javascript"
    +  data-jsonp="https://api.github.com/repos/leaverou/prism/contents/prism.js">
    +</pre>
    + +

    + Don't specifiy the callback query parameter in the URL; this will be added + automatically. If the API expects a different callback parameter name however, use the + data-callback parameter to specify the name: +

    + +
    <pre class="…" data-jsonp="…" data-callback="cb"></pre>
    + +

    + The next trick is of course actually extracting something from the JSONP response worth + highlighting, which means processing the response to extract the interesting data. +

    + +

    The following JSONP APIs are automatically detected and parsed:

    + + + +

    If you need to do your own parsing, you can hook your your own data adapters in two ways:

    +
      +
    1. + Supply the data-adapter parameter on the <pre> element. + This must be the name of a globally defined function. + The plugin will use only this adapter to parse the response. +
    2. +
    3. + Register your adapter function by calling + Prism.plugins.jsonphighlight.registerAdapter(function(rsp) { … }). + It will be added to the list of inbuilt adapters and used if no other registered + adapater (e.g. GitHub/Bitbucket) can parse the response. +
    4. +
    + +

    + In either case, the function must accept at least a single parameter (the JSONP response) and + returns a string of the content to highlight. If your adapter cannot parse the response, you + must return null. The DOM node that will contain the highlighted code will also + be passed in as the second argument, incase you need to use it to query any extra information + (maybe you wish to inspect the class or data-jsonp attributes to + assist in parsing the response). +

    + +

    + The following example demonstrates both methods of using a custom adapter, to simply return + the stringyfied JSONP response (i.e highlight the entire JSONP data): +

    + +
    <!-- perhaps this is in a .js file elsewhere -->
    +<script>
    +	function dump_json(rsp) {
    +		return "using dump_json: " + JSON.stringify(rsp,null,2);
    +	}
    +</script>
    +
    +<!-- … include prism.js … -->
    +<script>
    +	Prism.plugins.jsonphighlight.registerAdapter(function(rsp) {
    +		return "using registerAdapter: " + JSON.stringify(rsp,null,2);
    +	})
    +</script>
    +
    + +

    And later in your HTML:

    + +
    <!-- using the data-adapter attribute -->
    +<pre class="language-javascript" data-jsonp="…" data-adapter="dump_json"></pre>
    +
    +<!-- using whatever data adapters are available -->
    +<pre class="language-javascript" data-jsonp="…"></pre>
    +
    + +

    + Finally, unlike like the File Highlight + plugin, you do need to supply the appropriate class with the language + to highlight. This could have been auto-detected, but since you're not actually linking to + a file it's not always possible (see below in the example using GitHub status). + Furthermore, if you're linking to files with a .xaml extension for example, + this plugin then needs to somehow map that to highlight as markup, which just + means more bloat. You know what you're trying to highlight, just say so :) +

    + +

    Caveat for Gists

    + +

    + There's a bit of a catch with gists, as they can actually contain multiple files. + There are two options to handle this: +

    + +
      +
    1. + If your gist only contains one file, you don't need to to anything; the one and only + file will automatically be chosen and highlighted +
    2. +
    3. + If your file contains multiple files, the first one will be chosen by default. + However, you can supply the filename in the data-filename attribute, and + this file will be highlighted instead: +
      <pre class="…" data-jsonp="…" data-filename="mydemo.js"></pre>
      +
    4. +
    +
    + +
    +

    Examples

    + +

    The plugin’s JS code (from GitHub):

    +
    
    +
    +	

    GitHub Gist (gist contains a single file, automatically selected):

    +
    
    +
    +	

    GitHub Gist (gist contains a multiple files, file to load specified):

    +
    
    +
    + 	

    Bitbucket API:

    +
    
    + 	
    + 	

    Custom adapter (JSON.stringify showing GitHub status):

    +
    
    +
    +	

    Registered adapter (as above, but without explicitly declaring the data-adapter attribute):

    +
    
    +
    + +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/jsonp-highlight/prism-jsonp-highlight.js b/docs/_style/prism-master/plugins/jsonp-highlight/prism-jsonp-highlight.js new file mode 100644 index 0000000000..4ce5ca5081 --- /dev/null +++ b/docs/_style/prism-master/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -0,0 +1,151 @@ +(function() { + if ( !self.Prism || !self.document || !document.querySelectorAll || ![].filter) return; + + var adapters = []; + function registerAdapter(adapter) { + if (typeof adapter === "function" && !getAdapter(adapter)) { + adapters.push(adapter); + } + } + function getAdapter(adapter) { + if (typeof adapter === "function") { + return adapters.filter(function(fn) { return fn.valueOf() === adapter.valueOf()})[0]; + } + else if (typeof adapter === "string" && adapter.length > 0) { + return adapters.filter(function(fn) { return fn.name === adapter})[0]; + } + return null; + } + function removeAdapter(adapter) { + if (typeof adapter === "string") + adapter = getAdapter(adapter); + if (typeof adapter === "function") { + var index = adapters.indexOf(adapter); + if (index >=0) { + adapters.splice(index,1); + } + } + } + + Prism.plugins.jsonphighlight = { + registerAdapter: registerAdapter, + removeAdapter: removeAdapter, + highlight: highlight + }; + registerAdapter(function github(rsp, el) { + if ( rsp && rsp.meta && rsp.data ) { + if ( rsp.meta.status && rsp.meta.status >= 400 ) { + return "Error: " + ( rsp.data.message || rsp.meta.status ); + } + else if ( typeof(rsp.data.content) === "string" ) { + return typeof(atob) === "function" + ? atob(rsp.data.content.replace(/\s/g, "")) + : "Your browser cannot decode base64"; + } + } + return null; + }); + registerAdapter(function gist(rsp, el) { + if ( rsp && rsp.meta && rsp.data && rsp.data.files ) { + if ( rsp.meta.status && rsp.meta.status >= 400 ) { + return "Error: " + ( rsp.data.message || rsp.meta.status ); + } + else { + var filename = el.getAttribute("data-filename"); + if (filename == null) { + // Maybe in the future we can somehow render all files + // But the standard + + + + + + +
    +
    + +

    Keep markup

    +

    Prevents custom markup from being dropped out during highlighting.

    +
    + +
    + +

    How to use

    +

    You have nothing to do. With this plugin loaded, all markup inside code will be kept.

    + +

    Examples

    + +

    The following source code

    +
    <pre><code class="language-css">
    +@media <mark>screen</mark> {
    +	div {
    +		<mark>text</mark>-decoration: <mark><mark>under</mark>line</mark>;
    +		back<mark>ground: url</mark>('foo.png');
    +	}
    +}</code></pre>
    + +

    would render like this:

    +
    
    +@media screen {
    +	div {
    +		text-decoration: underline;
    +		background: url('foo.png');
    +	}
    +}
    + +

    + It also works for inline code: + var bar = function () { /* foo */ }; +

    + +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.js b/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.js new file mode 100644 index 0000000000..bc136c6720 --- /dev/null +++ b/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.js @@ -0,0 +1,99 @@ +(function () { + + if (typeof self === 'undefined' || !self.Prism || !self.document || !document.createRange) { + return; + } + + Prism.plugins.KeepMarkup = true; + + Prism.hooks.add('before-highlight', function (env) { + if (!env.element.children.length) { + return; + } + + var pos = 0; + var data = []; + var f = function (elt, baseNode) { + var o = {}; + if (!baseNode) { + // Clone the original tag to keep all attributes + o.clone = elt.cloneNode(false); + o.posOpen = pos; + data.push(o); + } + for (var i = 0, l = elt.childNodes.length; i < l; i++) { + var child = elt.childNodes[i]; + if (child.nodeType === 1) { // element + f(child); + } else if(child.nodeType === 3) { // text + pos += child.data.length; + } + } + if (!baseNode) { + o.posClose = pos; + } + }; + f(env.element, true); + + if (data && data.length) { + // data is an array of all existing tags + env.keepMarkup = data; + } + }); + + Prism.hooks.add('after-highlight', function (env) { + if(env.keepMarkup && env.keepMarkup.length) { + + var walk = function (elt, nodeState) { + for (var i = 0, l = elt.childNodes.length; i < l; i++) { + + var child = elt.childNodes[i]; + + if (child.nodeType === 1) { // element + if (!walk(child, nodeState)) { + return false; + } + + } else if (child.nodeType === 3) { // text + if(!nodeState.nodeStart && nodeState.pos + child.data.length > nodeState.node.posOpen) { + // We found the start position + nodeState.nodeStart = child; + nodeState.nodeStartPos = nodeState.node.posOpen - nodeState.pos; + } + if(nodeState.nodeStart && nodeState.pos + child.data.length >= nodeState.node.posClose) { + // We found the end position + nodeState.nodeEnd = child; + nodeState.nodeEndPos = nodeState.node.posClose - nodeState.pos; + } + + nodeState.pos += child.data.length; + } + + if (nodeState.nodeStart && nodeState.nodeEnd) { + // Select the range and wrap it with the clone + var range = document.createRange(); + range.setStart(nodeState.nodeStart, nodeState.nodeStartPos); + range.setEnd(nodeState.nodeEnd, nodeState.nodeEndPos); + nodeState.node.clone.appendChild(range.extractContents()); + range.insertNode(nodeState.node.clone); + range.detach(); + + // Process is over + return false; + } + } + return true; + }; + + // For each tag, we walk the DOM to reinsert it + env.keepMarkup.forEach(function (node) { + walk(env.element, { + node: node, + pos: 0 + }); + }); + // Store new highlightedCode for later hooks calls + env.highlightedCode = env.element.innerHTML; + } + }); +}()); diff --git a/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.min.js b/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.min.js new file mode 100644 index 0000000000..7f54d27680 --- /dev/null +++ b/docs/_style/prism-master/plugins/keep-markup/prism-keep-markup.min.js @@ -0,0 +1 @@ +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length){var n=0,o=[],t=function(e,d){var r={};d||(r.clone=e.cloneNode(!1),r.posOpen=n,o.push(r));for(var a=0,s=e.childNodes.length;s>a;a++){var l=e.childNodes[a];1===l.nodeType?t(l):3===l.nodeType&&(n+=l.data.length)}d||(r.posClose=n)};t(e.element,!0),o&&o.length&&(e.keepMarkup=o)}}),Prism.hooks.add("after-highlight",function(e){if(e.keepMarkup&&e.keepMarkup.length){var n=function(e,o){for(var t=0,d=e.childNodes.length;d>t;t++){var r=e.childNodes[t];if(1===r.nodeType){if(!n(r,o))return!1}else 3===r.nodeType&&(!o.nodeStart&&o.pos+r.data.length>o.node.posOpen&&(o.nodeStart=r,o.nodeStartPos=o.node.posOpen-o.pos),o.nodeStart&&o.pos+r.data.length>=o.node.posClose&&(o.nodeEnd=r,o.nodeEndPos=o.node.posClose-o.pos),o.pos+=r.data.length);if(o.nodeStart&&o.nodeEnd){var a=document.createRange();return a.setStart(o.nodeStart,o.nodeStartPos),a.setEnd(o.nodeEnd,o.nodeEndPos),o.node.clone.appendChild(a.extractContents()),a.insertNode(o.node.clone),a.detach(),!1}}return!0};e.keepMarkup.forEach(function(o){n(e.element,{node:o,pos:0})}),e.highlightedCode=e.element.innerHTML}}))}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/line-highlight/index.html b/docs/_style/prism-master/plugins/line-highlight/index.html new file mode 100644 index 0000000000..f3b58b4b41 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-highlight/index.html @@ -0,0 +1,88 @@ + + + + + + +Line highlight ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    Line highlight

    +

    Highlights specific lines and/or line ranges.

    +
    + +
    +

    How to use

    + +

    Obviously, this only works on code blocks (<pre><code>) and not for inline code. + +

    You specify the lines to be highlighted through the data-line attribute on the <pre> element, in the following simple format:

    +
      +
    • A single number refers to the line with that number
    • +
    • Ranges are denoted by two numbers, separated with a hyphen (-)
    • +
    • Multiple line numbers or ranges are separated by commas.
    • +
    • Whitespace is allowed anywhere and will be stripped off.
    • +
    + +

    Examples:

    +
    +
    5
    +
    The 5th line
    + +
    1-5
    +
    Lines 1 through 5
    + +
    1,4
    +
    Line 1 and line 4
    + +
    1-2, 5, 9-20
    +
    Lines 1 through 2, line 5, lines 9 through 20
    +
    + +

    In case you want the line numbering to be offset by a certain number (for example, you want the 1st line to be number 41 instead of 1, which is an offset of 40), you can additionally use the data-line-offset attribute. + +

    You can also link to specific lines on any code snippet, by using the following as a url hash: #{element-id}.{lines} where + {element-id} is the id of the <pre> element and {lines} is one or more lines or line ranges that follow the format + outlined above. For example, if there is an element with id="play" on the page, you can link to lines 5-6 by linking to #play.5-6

    +
    + +
    +

    Examples

    + +

    Line 2

    +
    
    +	
    +	

    Lines 15-25

    +
    
    +	
    +	

    Line 1 and lines 3-4 and line 42

    +
    
    +	
    +	

    Line 43, starting from line 41

    +
    
    +	
    +	

    Linking example

    +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.css b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.css new file mode 100644 index 0000000000..6058db44ac --- /dev/null +++ b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.css @@ -0,0 +1,49 @@ +pre[data-line] { + position: relative; + padding: 1em 0 1em 3em; +} + +.line-highlight { + position: absolute; + left: 0; + right: 0; + padding: inherit 0; + margin-top: 1em; /* Same as .prism’s padding-top */ + + background: hsla(24, 20%, 50%,.08); + background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); + + pointer-events: none; + + line-height: inherit; + white-space: pre; +} + + .line-highlight:before, + .line-highlight[data-end]:after { + content: attr(data-start); + position: absolute; + top: .4em; + left: .6em; + min-width: 1em; + padding: 0 .5em; + background-color: hsla(24, 20%, 50%,.4); + color: hsl(24, 20%, 95%); + font: bold 65%/1.5 sans-serif; + text-align: center; + vertical-align: .3em; + border-radius: 999px; + text-shadow: none; + box-shadow: 0 1px white; + } + + .line-highlight[data-end]:after { + content: attr(data-end); + top: auto; + bottom: .4em; + } + +.line-numbers .line-highlight:before, +.line-numbers .line-highlight:after { + content: none; +} diff --git a/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.js b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.js new file mode 100644 index 0000000000..5d919ae6c3 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.js @@ -0,0 +1,181 @@ +(function(){ + +if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { + return; +} + +function $$(expr, con) { + return Array.prototype.slice.call((con || document).querySelectorAll(expr)); +} + +function hasClass(element, className) { + className = " " + className + " "; + return (" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf(className) > -1 +} + +// Some browsers round the line-height, others don't. +// We need to test for it to position the elements properly. +var isLineHeightRounded = (function() { + var res; + return function() { + if(typeof res === 'undefined') { + var d = document.createElement('div'); + d.style.fontSize = '13px'; + d.style.lineHeight = '1.5'; + d.style.padding = 0; + d.style.border = 0; + d.innerHTML = ' 
     '; + document.body.appendChild(d); + // Browsers that round the line-height should have offsetHeight === 38 + // The others should have 39. + res = d.offsetHeight === 38; + document.body.removeChild(d); + } + return res; + } +}()); + +function highlightLines(pre, lines, classes) { + lines = typeof lines === 'string' ? lines : pre.getAttribute('data-line'); + + var ranges = lines.replace(/\s+/g, '').split(','), + offset = +pre.getAttribute('data-line-offset') || 0; + + var parseMethod = isLineHeightRounded() ? parseInt : parseFloat; + var lineHeight = parseMethod(getComputedStyle(pre).lineHeight); + var hasLineNumbers = hasClass(pre, 'line-numbers'); + + for (var i=0, currentRange; currentRange = ranges[i++];) { + var range = currentRange.split('-'); + + var start = +range[0], + end = +range[1] || start; + + var line = pre.querySelector('.line-highlight[data-range="' + currentRange + '"]') || document.createElement('div'); + + line.setAttribute('aria-hidden', 'true'); + line.setAttribute('data-range', currentRange); + line.className = (classes || '') + ' line-highlight'; + + //if the line-numbers plugin is enabled, then there is no reason for this plugin to display the line numbers + if(hasLineNumbers && Prism.plugins.lineNumbers) { + var startNode = Prism.plugins.lineNumbers.getLine(pre, start); + var endNode = Prism.plugins.lineNumbers.getLine(pre, end); + + if (startNode) { + line.style.top = startNode.offsetTop + 'px'; + } + + if (endNode) { + line.style.height = (endNode.offsetTop - startNode.offsetTop) + endNode.offsetHeight + 'px'; + } + } else { + line.setAttribute('data-start', start); + + if(end > start) { + line.setAttribute('data-end', end); + } + + line.style.top = (start - offset - 1) * lineHeight + 'px'; + + line.textContent = new Array(end - start + 2).join(' \n'); + } + + //allow this to play nicely with the line-numbers plugin + if(hasLineNumbers) { + //need to attack to pre as when line-numbers is enabled, the code tag is relatively which screws up the positioning + pre.appendChild(line); + } else { + (pre.querySelector('code') || pre).appendChild(line); + } + } +} + +function applyHash() { + var hash = location.hash.slice(1); + + // Remove pre-existing temporary lines + $$('.temporary.line-highlight').forEach(function (line) { + line.parentNode.removeChild(line); + }); + + var range = (hash.match(/\.([\d,-]+)$/) || [,''])[1]; + + if (!range || document.getElementById(hash)) { + return; + } + + var id = hash.slice(0, hash.lastIndexOf('.')), + pre = document.getElementById(id); + + if (!pre) { + return; + } + + if (!pre.hasAttribute('data-line')) { + pre.setAttribute('data-line', ''); + } + + highlightLines(pre, range, 'temporary '); + + document.querySelector('.temporary.line-highlight').scrollIntoView(); +} + +var fakeTimer = 0; // Hack to limit the number of times applyHash() runs + +Prism.hooks.add('before-sanity-check', function(env) { + var pre = env.element.parentNode; + var lines = pre && pre.getAttribute('data-line'); + + if (!pre || !lines || !/pre/i.test(pre.nodeName)) { + return; + } + + /* + * Cleanup for other plugins (e.g. autoloader). + * + * Sometimes blocks are highlighted multiple times. It is necessary + * to cleanup any left-over tags, because the whitespace inside of the
    + * tags change the content of the tag. + */ + var num = 0; + $$('.line-highlight', pre).forEach(function (line) { + num += line.textContent.length; + line.parentNode.removeChild(line); + }); + // Remove extra whitespace + if (num && /^( \n)+$/.test(env.code.slice(-num))) { + env.code = env.code.slice(0, -num); + } +}); + +Prism.hooks.add('complete', function completeHook(env) { + var pre = env.element.parentNode; + var lines = pre && pre.getAttribute('data-line'); + + if (!pre || !lines || !/pre/i.test(pre.nodeName)) { + return; + } + + clearTimeout(fakeTimer); + + var hasLineNumbers = Prism.plugins.lineNumbers; + var isLineNumbersLoaded = env.plugins && env.plugins.lineNumbers; + + if (hasClass(pre, 'line-numbers') && hasLineNumbers && !isLineNumbersLoaded) { + Prism.hooks.add('line-numbers', completeHook); + } else { + highlightLines(pre, lines); + fakeTimer = setTimeout(applyHash, 1); + } +}); + + window.addEventListener('hashchange', applyHash); + window.addEventListener('resize', function () { + var preElements = document.querySelectorAll('pre[data-line]'); + Array.prototype.forEach.call(preElements, function (pre) { + highlightLines(pre); + }); + }); + +})(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.min.js b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.min.js new file mode 100644 index 0000000000..6c87091459 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-highlight/prism-line-highlight.min.js @@ -0,0 +1 @@ +!function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){n="string"==typeof n?n:e.getAttribute("data-line");for(var o,l=n.replace(/\s+/g,"").split(","),a=+e.getAttribute("data-line-offset")||0,s=r()?parseInt:parseFloat,d=s(getComputedStyle(e).lineHeight),u=t(e,"line-numbers"),c=0;o=l[c++];){var p=o.split("-"),m=+p[0],f=+p[1]||m,h=e.querySelector('.line-highlight[data-range="'+o+'"]')||document.createElement("div");if(h.setAttribute("aria-hidden","true"),h.setAttribute("data-range",o),h.className=(i||"")+" line-highlight",u&&Prism.plugins.lineNumbers){var g=Prism.plugins.lineNumbers.getLine(e,m),y=Prism.plugins.lineNumbers.getLine(e,f);g&&(h.style.top=g.offsetTop+"px"),y&&(h.style.height=y.offsetTop-g.offsetTop+y.offsetHeight+"px")}else h.setAttribute("data-start",m),f>m&&h.setAttribute("data-end",f),h.style.top=(m-a-1)*d+"px",h.textContent=new Array(f-m+2).join(" \n");u?e.appendChild(h):(e.querySelector("code")||e).appendChild(h)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" 
     ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("before-sanity-check",function(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){var r=0;e(".line-highlight",n).forEach(function(e){r+=e.textContent.length,e.parentNode.removeChild(e)}),r&&/^( \n)+$/.test(t.code.slice(-r))&&(t.code=t.code.slice(0,-r))}}),Prism.hooks.add("complete",function l(e){var r=e.element.parentNode,a=r&&r.getAttribute("data-line");if(r&&a&&/pre/i.test(r.nodeName)){clearTimeout(o);var s=Prism.plugins.lineNumbers,d=e.plugins&&e.plugins.lineNumbers;t(r,"line-numbers")&&s&&!d?Prism.hooks.add("line-numbers",l):(n(r,a),o=setTimeout(i,1))}}),window.addEventListener("hashchange",i),window.addEventListener("resize",function(){var e=document.querySelectorAll("pre[data-line]");Array.prototype.forEach.call(e,function(e){n(e)})})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/line-numbers/index.html b/docs/_style/prism-master/plugins/line-numbers/index.html new file mode 100644 index 0000000000..5af756cae0 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-numbers/index.html @@ -0,0 +1,69 @@ + + + + + + +Line Numbers ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    Line Numbers

    +

    Line number at the beginning of code lines.

    +
    + +
    +

    How to use

    + +

    Obviously, this is supposed to work only for code blocks (<pre><code>) and not for inline code.

    +

    Add class line-numbers to your desired <pre> and line-numbers plugin will take care.

    +

    Optional: You can specify the data-start (Number) attribute on the <pre> element. It will shift the line counter.

    +

    Optional: To support multiline line numbers using soft wrap add css white-space to pre-line or pre-wrap.

    +
    + +
    +

    Examples

    + +

    JavaScript

    +
    
    +
    +  

    CSS

    +
    
    +
    +  

    HTML

    +

    Please note the data-start="-5" in the code below.

    +
    
    +
    +  

    Unknown languages

    +
    This raw text
    +is not highlighted
    +but it still has
    +lines numbers
    + +

    Soft wrap support

    +
    
    +
    +
    + +
    + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.css b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.css new file mode 100644 index 0000000000..08b29ed615 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.css @@ -0,0 +1,41 @@ +pre[class*="language-"].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; +} + +pre[class*="language-"].line-numbers > code { + position: relative; + white-space: inherit; +} + +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid #999; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + +} + + .line-numbers-rows > span { + pointer-events: none; + display: block; + counter-increment: linenumber; + } + + .line-numbers-rows > span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; + } diff --git a/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.js b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.js new file mode 100644 index 0000000000..e9e684fe94 --- /dev/null +++ b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.js @@ -0,0 +1,159 @@ +(function () { + + if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; + } + + /** + * Plugin name which is used as a class name for
     which is activating the plugin
    +	 * @type {String}
    +	 */
    +	var PLUGIN_NAME = 'line-numbers';
    +	
    +	/**
    +	 * Regular expression used for determining line breaks
    +	 * @type {RegExp}
    +	 */
    +	var NEW_LINE_EXP = /\n(?!$)/g;
    +
    +	/**
    +	 * Resizes line numbers spans according to height of line of code
    +	 * @param {Element} element 
     element
    +	 */
    +	var _resizeElement = function (element) {
    +		var codeStyles = getStyles(element);
    +		var whiteSpace = codeStyles['white-space'];
    +
    +		if (whiteSpace === 'pre-wrap' || whiteSpace === 'pre-line') {
    +			var codeElement = element.querySelector('code');
    +			var lineNumbersWrapper = element.querySelector('.line-numbers-rows');
    +			var lineNumberSizer = element.querySelector('.line-numbers-sizer');
    +			var codeLines = codeElement.textContent.split(NEW_LINE_EXP);
    +
    +			if (!lineNumberSizer) {
    +				lineNumberSizer = document.createElement('span');
    +				lineNumberSizer.className = 'line-numbers-sizer';
    +
    +				codeElement.appendChild(lineNumberSizer);
    +			}
    +
    +			lineNumberSizer.style.display = 'block';
    +
    +			codeLines.forEach(function (line, lineNumber) {
    +				lineNumberSizer.textContent = line || '\n';
    +				var lineSize = lineNumberSizer.getBoundingClientRect().height;
    +				lineNumbersWrapper.children[lineNumber].style.height = lineSize + 'px';
    +			});
    +
    +			lineNumberSizer.textContent = '';
    +			lineNumberSizer.style.display = 'none';
    +		}
    +	};
    +
    +	/**
    +	 * Returns style declarations for the element
    +	 * @param {Element} element
    +	 */
    +	var getStyles = function (element) {
    +		if (!element) {
    +			return null;
    +		}
    +
    +		return window.getComputedStyle ? getComputedStyle(element) : (element.currentStyle || null);
    +	};
    +
    +	window.addEventListener('resize', function () {
    +		Array.prototype.forEach.call(document.querySelectorAll('pre.' + PLUGIN_NAME), _resizeElement);
    +	});
    +
    +	Prism.hooks.add('complete', function (env) {
    +		if (!env.code) {
    +			return;
    +		}
    +
    +		// works only for  wrapped inside 
     (not inline)
    +		var pre = env.element.parentNode;
    +		var clsReg = /\s*\bline-numbers\b\s*/;
    +		if (
    +			!pre || !/pre/i.test(pre.nodeName) ||
    +			// Abort only if nor the 
     nor the  have the class
    +			(!clsReg.test(pre.className) && !clsReg.test(env.element.className))
    +		) {
    +			return;
    +		}
    +
    +		if (env.element.querySelector('.line-numbers-rows')) {
    +			// Abort if line numbers already exists
    +			return;
    +		}
    +
    +		if (clsReg.test(env.element.className)) {
    +			// Remove the class 'line-numbers' from the 
    +			env.element.className = env.element.className.replace(clsReg, ' ');
    +		}
    +		if (!clsReg.test(pre.className)) {
    +			// Add the class 'line-numbers' to the 
    +			pre.className += ' line-numbers';
    +		}
    +
    +		var match = env.code.match(NEW_LINE_EXP);
    +		var linesNum = match ? match.length + 1 : 1;
    +		var lineNumbersWrapper;
    +
    +		var lines = new Array(linesNum + 1);
    +		lines = lines.join('');
    +
    +		lineNumbersWrapper = document.createElement('span');
    +		lineNumbersWrapper.setAttribute('aria-hidden', 'true');
    +		lineNumbersWrapper.className = 'line-numbers-rows';
    +		lineNumbersWrapper.innerHTML = lines;
    +
    +		if (pre.hasAttribute('data-start')) {
    +			pre.style.counterReset = 'linenumber ' + (parseInt(pre.getAttribute('data-start'), 10) - 1);
    +		}
    +
    +		env.element.appendChild(lineNumbersWrapper);
    +
    +		_resizeElement(pre);
    +
    +		Prism.hooks.run('line-numbers', env);
    +	});
    +
    +	Prism.hooks.add('line-numbers', function (env) {
    +		env.plugins = env.plugins || {};
    +		env.plugins.lineNumbers = true;
    +	});
    +	
    +	/**
    +	 * Global exports
    +	 */
    +	Prism.plugins.lineNumbers = {
    +		/**
    +		 * Get node for provided line number
    +		 * @param {Element} element pre element
    +		 * @param {Number} number line number
    +		 * @return {Element|undefined}
    +		 */
    +		getLine: function (element, number) {
    +			if (element.tagName !== 'PRE' || !element.classList.contains(PLUGIN_NAME)) {
    +				return;
    +			}
    +
    +			var lineNumberRows = element.querySelector('.line-numbers-rows');
    +			var lineNumberStart = parseInt(element.getAttribute('data-start'), 10) || 1;
    +			var lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1);
    +
    +			if (number < lineNumberStart) {
    +				number = lineNumberStart;
    +			}
    +			if (number > lineNumberEnd) {
    +				number = lineNumberEnd;
    +			}
    +
    +			var lineIndex = number - lineNumberStart;
    +
    +			return lineNumberRows.children[lineIndex];
    +		}
    +	};
    +
    +}());
    \ No newline at end of file
    diff --git a/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.min.js b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.min.js
    new file mode 100644
    index 0000000000..5291216f69
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/line-numbers/prism-line-numbers.min.js
    @@ -0,0 +1 @@
    +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e="line-numbers",t=/\n(?!$)/g,n=function(e){var n=r(e),s=n["white-space"];if("pre-wrap"===s||"pre-line"===s){var l=e.querySelector("code"),i=e.querySelector(".line-numbers-rows"),a=e.querySelector(".line-numbers-sizer"),o=l.textContent.split(t);a||(a=document.createElement("span"),a.className="line-numbers-sizer",l.appendChild(a)),a.style.display="block",o.forEach(function(e,t){a.textContent=e||"\n";var n=a.getBoundingClientRect().height;i.children[t].style.height=n+"px"}),a.textContent="",a.style.display="none"}},r=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+e),n)}),Prism.hooks.add("complete",function(e){if(e.code){var r=e.element.parentNode,s=/\s*\bline-numbers\b\s*/;if(r&&/pre/i.test(r.nodeName)&&(s.test(r.className)||s.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){s.test(e.element.className)&&(e.element.className=e.element.className.replace(s," ")),s.test(r.className)||(r.className+=" line-numbers");var l,i=e.code.match(t),a=i?i.length+1:1,o=new Array(a+1);o=o.join(""),l=document.createElement("span"),l.setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=o,r.hasAttribute("data-start")&&(r.style.counterReset="linenumber "+(parseInt(r.getAttribute("data-start"),10)-1)),e.element.appendChild(l),n(r),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(t,n){if("PRE"===t.tagName&&t.classList.contains(e)){var r=t.querySelector(".line-numbers-rows"),s=parseInt(t.getAttribute("data-start"),10)||1,l=s+(r.children.length-1);s>n&&(n=s),n>l&&(n=l);var i=n-s;return r.children[i]}}}}}();
    \ No newline at end of file
    diff --git a/docs/_style/prism-master/plugins/normalize-whitespace/demo.html b/docs/_style/prism-master/plugins/normalize-whitespace/demo.html
    new file mode 100644
    index 0000000000..a6bcf22bea
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/normalize-whitespace/demo.html
    @@ -0,0 +1,33 @@
    +
    +
    + +
    +
    +	
    +
    +
    +		var example = {
    +			foo: true,
    +
    +			bar: false
    +		};
    +
    +
    +	
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/normalize-whitespace/index.html b/docs/_style/prism-master/plugins/normalize-whitespace/index.html new file mode 100644 index 0000000000..e1469de650 --- /dev/null +++ b/docs/_style/prism-master/plugins/normalize-whitespace/index.html @@ -0,0 +1,180 @@ + + + + + + + Normalize Whitespace ▲ Prism plugins + + + + + + + + + + + + +
    +
    + +

    Normalize Whitespace

    +

    Supports multiple operations to normalize whitespace in code blocks.

    +
    + +
    +

    How to use

    + +

    Obviously, this is supposed to work only for code blocks (<pre><code>) and not for inline code.

    +

    By default the plugin trims all leading and trailing whitespace of every code block. + It also removes extra indents and trailing whitespace on every line.

    + +

    The plugin can be disabled for a particular code block by adding the class no-whitespace-normalization to + either the <pre> or <code> tag.

    + +

    The default settings can be overridden with the setDefaults() method + like so:

    + +
    
    +Prism.plugins.NormalizeWhitespace.setDefaults({
    +	'remove-trailing': true,
    +	'remove-indent': true,
    +	'left-trim': true,
    +	'right-trim': true,
    +	/*'break-lines': 80,
    +	'indent': 2,
    +	'remove-initial-line-feed': false,
    +	'tabs-to-spaces': 4,
    +	'spaces-to-tabs': 4*/
    +});
    +
    + +

    The following settings are available:

    + +
    +
    remove-trailing
    +
    Removes trailing whitespace on all lines.
    +
    remove-indent
    +
    If the whole code block is indented too much it removes the extra indent.
    +
    left-trim
    +
    Removes all whitespace from the top of the code block.
    +
    right-trim
    +
    Removes all whitespace from the bottom of the code block.
    +
    break-lines
    +
    Simple way of breaking long lines at a certain length (default is 80 characters).
    +
    indent
    +
    Adds a certain number of tabs to every line.
    +
    remove-initial-line-feed
    +
    Less aggressive version of left-trim. + It only removes a single line feed from the top of the code block.
    +
    tabs-to-spaces
    +
    Converts all tabs to a certain number of spaces (default is 4 spaces).
    +
    spaces-to-tabs
    +
    Converts a certain number of spaces to a tab (default is 4 spaces).
    +
    +
    + +
    +

    Examples

    + +

    The following example demonstrates the use of this plugin:

    + +
    
    +
    +	

    The result looks like this:

    + +
    +
    +	
    +
    +
    +		var example = {
    +			foo: true,
    +
    +			bar: false
    +		};
    +
    +
    +	
    +
    +
    + +

    It is also compatible with the keep-markup plugin:

    + +
    +
    +	
    +
    +
    +	@media screen {
    +		div {
    +			text-decoration: underline;
    +			background: url('foo.png');
    +		}
    +	}
    +
    +
    +
    + +

    This plugin can also be used on the server or on the command line with Node.js:

    + +
    
    +var Prism = require('prismjs');
    +var Normalizer = require('prismjs/plugins/normalize-whitespace/prism-normalize-whitespace');
    +// Create a new Normalizer object
    +var nw = new Normalizer({
    +	'remove-trailing': true,
    +	'remove-indent': true,
    +	'left-trim': true,
    +	'right-trim': true,
    +	/*'break-lines': 80,
    +	'indent': 2,
    +	'remove-initial-line-feed': false,
    +	'tabs-to-spaces': 4,
    +	'spaces-to-tabs': 4*/
    +});
    +
    +// ..or use the default object from Prism
    +nw = Prism.plugins.NormalizeWhitespace;
    +
    +// The code snippet you want to highlight, as a string
    +var code = "\t\t\tvar data = 1;    ";
    +
    +// Removes leading and trailing whitespace
    +// and then indents by 1 tab
    +code = nw.normalize(code, {
    +	// Extra settings
    +	indent: 1
    +});
    +
    +// Returns a highlighted HTML string
    +var html = Prism.highlight(code, Prism.languages.javascript);
    +	
    + + +
    + +
    + + + + + + + + + + diff --git a/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.js b/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.js new file mode 100644 index 0000000000..b6c6472793 --- /dev/null +++ b/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.js @@ -0,0 +1,190 @@ +(function() { + +var assign = Object.assign || function (obj1, obj2) { + for (var name in obj2) { + if (obj2.hasOwnProperty(name)) + obj1[name] = obj2[name]; + } + return obj1; +} + +function NormalizeWhitespace(defaults) { + this.defaults = assign({}, defaults); +} + +function toCamelCase(value) { + return value.replace(/-(\w)/g, function(match, firstChar) { + return firstChar.toUpperCase(); + }); +} + +function tabLen(str) { + var res = 0; + for (var i = 0; i < str.length; ++i) { + if (str.charCodeAt(i) == '\t'.charCodeAt(0)) + res += 3; + } + return str.length + res; +} + +NormalizeWhitespace.prototype = { + setDefaults: function (defaults) { + this.defaults = assign(this.defaults, defaults); + }, + normalize: function (input, settings) { + settings = assign(this.defaults, settings); + + for (var name in settings) { + var methodName = toCamelCase(name); + if (name !== "normalize" && methodName !== 'setDefaults' && + settings[name] && this[methodName]) { + input = this[methodName].call(this, input, settings[name]); + } + } + + return input; + }, + + /* + * Normalization methods + */ + leftTrim: function (input) { + return input.replace(/^\s+/, ''); + }, + rightTrim: function (input) { + return input.replace(/\s+$/, ''); + }, + tabsToSpaces: function (input, spaces) { + spaces = spaces|0 || 4; + return input.replace(/\t/g, new Array(++spaces).join(' ')); + }, + spacesToTabs: function (input, spaces) { + spaces = spaces|0 || 4; + return input.replace(RegExp(' {' + spaces + '}', 'g'), '\t'); + }, + removeTrailing: function (input) { + return input.replace(/\s*?$/gm, ''); + }, + // Support for deprecated plugin remove-initial-line-feed + removeInitialLineFeed: function (input) { + return input.replace(/^(?:\r?\n|\r)/, ''); + }, + removeIndent: function (input) { + var indents = input.match(/^[^\S\n\r]*(?=\S)/gm); + + if (!indents || !indents[0].length) + return input; + + indents.sort(function(a, b){return a.length - b.length; }); + + if (!indents[0].length) + return input; + + return input.replace(RegExp('^' + indents[0], 'gm'), ''); + }, + indent: function (input, tabs) { + return input.replace(/^[^\S\n\r]*(?=\S)/gm, new Array(++tabs).join('\t') + '$&'); + }, + breakLines: function (input, characters) { + characters = (characters === true) ? 80 : characters|0 || 80; + + var lines = input.split('\n'); + for (var i = 0; i < lines.length; ++i) { + if (tabLen(lines[i]) <= characters) + continue; + + var line = lines[i].split(/(\s+)/g), + len = 0; + + for (var j = 0; j < line.length; ++j) { + var tl = tabLen(line[j]); + len += tl; + if (len > characters) { + line[j] = '\n' + line[j]; + len = tl; + } + } + lines[i] = line.join(''); + } + return lines.join('\n'); + } +}; + +// Support node modules +if (typeof module !== 'undefined' && module.exports) { + module.exports = NormalizeWhitespace; +} + +// Exit if prism is not loaded +if (typeof Prism === 'undefined') { + return; +} + +Prism.plugins.NormalizeWhitespace = new NormalizeWhitespace({ + 'remove-trailing': true, + 'remove-indent': true, + 'left-trim': true, + 'right-trim': true, + /*'break-lines': 80, + 'indent': 2, + 'remove-initial-line-feed': false, + 'tabs-to-spaces': 4, + 'spaces-to-tabs': 4*/ +}); + +Prism.hooks.add('before-sanity-check', function (env) { + var Normalizer = Prism.plugins.NormalizeWhitespace; + + // Check settings + if (env.settings && env.settings['whitespace-normalization'] === false) { + return; + } + + // Simple mode if there is no env.element + if ((!env.element || !env.element.parentNode) && env.code) { + env.code = Normalizer.normalize(env.code, env.settings); + return; + } + + // Normal mode + var pre = env.element.parentNode; + var clsReg = /\bno-whitespace-normalization\b/; + if (!env.code || !pre || pre.nodeName.toLowerCase() !== 'pre' || + clsReg.test(pre.className) || clsReg.test(env.element.className)) + return; + + var children = pre.childNodes, + before = '', + after = '', + codeFound = false; + + // Move surrounding whitespace from the
     tag into the  tag
    +	for (var i = 0; i < children.length; ++i) {
    +		var node = children[i];
    +
    +		if (node == env.element) {
    +			codeFound = true;
    +		} else if (node.nodeName === "#text") {
    +			if (codeFound) {
    +				after += node.nodeValue;
    +			} else {
    +				before += node.nodeValue;
    +			}
    +
    +			pre.removeChild(node);
    +			--i;
    +		}
    +	}
    +
    +	if (!env.element.children.length || !Prism.plugins.KeepMarkup) {
    +		env.code = before + env.code + after;
    +		env.code = Normalizer.normalize(env.code, env.settings);
    +	} else {
    +		// Preserve markup for keep-markup plugin
    +		var html = before + env.element.innerHTML + after;
    +		env.element.innerHTML = Normalizer.normalize(html, env.settings);
    +		env.code = env.element.textContent;
    +	}
    +});
    +
    +}());
    diff --git a/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.min.js b/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.min.js
    new file mode 100644
    index 0000000000..39fa5795a9
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/normalize-whitespace/prism-normalize-whitespace.min.js
    @@ -0,0 +1 @@
    +!function(){function e(e){this.defaults=r({},e)}function n(e){return e.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function t(e){for(var n=0,t=0;tn&&(o[s]="\n"+o[s],a=l)}r[i]=o.join("")}return r.join("\n")}},"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof Prism&&(Prism.plugins.NormalizeWhitespace=new e({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(e){var n=Prism.plugins.NormalizeWhitespace;if(!e.settings||e.settings["whitespace-normalization"]!==!1){if((!e.element||!e.element.parentNode)&&e.code)return e.code=n.normalize(e.code,e.settings),void 0;var t=e.element.parentNode,r=/\bno-whitespace-normalization\b/;if(e.code&&t&&"pre"===t.nodeName.toLowerCase()&&!r.test(t.className)&&!r.test(e.element.className)){for(var i=t.childNodes,o="",a="",s=!1,l=0;l
    +
    +
    +
    +	
    +	
    +	Previewers ▲ Prism plugins
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +	
    +
    +
    +
    +
    +
    + +

    Previewers

    +

    Previewers for angles, colors, gradients, easing and time.

    +
    + +
    +

    How to use

    + +

    You don't need to do anything. With this plugin loaded, a previewer will appear on hovering some values in code blocks. + The following previewers are supported:

    +
      +
    • angle for angles
    • +
    • color for colors
    • +
    • gradient for gradients
    • +
    • easing for easing functions
    • +
    • time for durations
    • +
    +

    This plugin is compatible with CSS, Less, Markup attributes, Sass, Scss and Stylus.

    +
    + +
    +

    Examples

    + +

    CSS

    +
    .example-gradient {
    +	background: -webkit-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Chrome10+, Safari5.1+ */
    +	background:    -moz-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* FF3.6+ */
    +	background:     -ms-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* IE10+ */
    +	background:      -o-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Opera 11.10+ */
    +	background:         linear-gradient(to right, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* W3C */
    +}
    +.example-angle {
    +	transform: rotate(10deg);
    +}
    +.example-color {
    +	color: rgba(255, 0, 0, 0.2);
    +	background: purple;
    +	border: 1px solid hsl(100, 70%, 40%);
    +}
    +.example-easing {
    +	transition-timing-function: linear;
    +}
    +.example-time {
    +	transition-duration: 3s;
    +}
    + +

    Markup attributes

    +
    <table bgcolor="#6E5494">
    +<tr style="background: lightblue;">
    + +

    Less

    +
    @gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
    +.example-gradient {
    +	background: -webkit-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Chrome10+, Safari5.1+ */
    +	background:    -moz-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* FF3.6+ */
    +	background:     -ms-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* IE10+ */
    +	background:      -o-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Opera 11.10+ */
    +	background:         linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* W3C */
    +}
    +@angle: 3rad;
    +.example-angle {
    +	transform: rotate(.4turn)
    +}
    +@nice-blue: #5B83AD;
    +.example-color {
    +	color: hsla(102, 53%, 42%, 0.4);
    +}
    +@easing: cubic-bezier(0.1, 0.3, 1, .4);
    +.example-easing {
    +	transition-timing-function: ease;
    +}
    +@time: 1s;
    +.example-time {
    +	transition-duration: 2s;
    +}
    + +

    Sass

    +
    $gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
    +@mixin example-gradient
    +	background: -moz-radial-gradient(center, ellipse cover, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
    +	background: radial-gradient(ellipse at center, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
    +$angle: 380grad
    +@mixin example-angle
    +	transform: rotate(-120deg)
    +.example-angle
    +	transform: rotate(18rad)
    +$color: blue
    +@mixin example-color
    +	color: rgba(147, 32, 34, 0.8)
    +.example-color
    +	color: pink
    +$easing: ease-out
    +.example-easing
    +	transition-timing-function: ease-in-out
    +$time: 3s
    +@mixin example-time
    +	transition-duration: 800ms
    +.example-time
    +	transition-duration: 0.8s
    +
    + +

    Scss

    +
    $gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
    +$attr: background;
    +.example-gradient {
    +	#{$attr}-image: repeating-linear-gradient(10deg, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px);
    +}
    +$angle: 1.8turn;
    +.example-angle {
    +	transform: rotate(-3rad)
    +}
    +$color: blue;
    +.example-color {
    +	#{$attr}-color: rgba(255, 255, 0, 0.75);
    +}
    +$easing: linear;
    +.example-easing {
    +	transition-timing-function: cubic-bezier(0.9, 0.1, .2, .4);
    +}
    +$time: 1s;
    +.example-time {
    +	transition-duration: 10s
    +}
    + +

    Stylus

    +
    gradient = linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
    +.example-gradient
    +	background-image: repeating-radial-gradient(circle, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px)
    +angle = 357deg
    +.example-angle
    +	transform: rotate(100grad)
    +color = olive
    +.example-color
    +	color: #000
    +easing = ease-in
    +.example-easing
    +	transition-timing-function: ease-out
    +time = 3s
    +.example-time
    +	transition-duration: 0.5s
    +
    + +
    +

    Disabling a previewer

    +

    All previewers are enabled by default. To enable only a subset of them, a data-previewers attribute + can be added on a code block or any ancestor. Its value should be a space-separated list of previewers + representing the subset.

    +

    For example:

    +
    <pre class="language-css" data-previewers="color time"><code>div {
    +	/* Only the previewer for color and time are enabled */
    +	color: red;
    +	transition-duration: 1s;
    +	/* The previewer for angles is not enabled. */
    +	transform: rotate(10deg);
    +}</code></pre>
    +

    will give the following result:

    +
    div {
    +	/* Only the previewers for color and time are enabled */
    +	color: red;
    +	transition-duration: 1s;
    +	/* The previewer for angles is not enabled. */
    +	transform: rotate(10deg);
    +}
    +
    + +
    +

    API

    +

    This plugins provides a constructor that can be accessed through Prism.plugins.Previewer.

    +

    Once a previewer has been instantiated, an HTML element is appended to the document body. + This element will appear when specific tokens are hovered.

    + +

    new Prism.plugins.Previewer(type, updater, supportedLanguages)

    + +
      +
    • +

      type: the token type this previewer is associated to. + The previewer will be shown when hovering tokens of this type.

      +
    • +
    • +

      updater: the function that will be called each time an associated token is hovered. + This function takes the text content of the token as its only parameter. + The previewer HTML element can be accessed through the keyword this. + This function must return true for the previewer to be shown.

      +
    • +
    • +

      supportedLanguages: an optional array of supported languages. + The previewer will be available only for those. + Defaults to '*', which means every languages.

      +
    • +
    • +

      initializer: an optional function. + This function will be called when the previewer is initialized, + right after the HTML element has been appended to the document body.

      +
    • +
    + +
    + +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/previewers/prism-previewers.css b/docs/_style/prism-master/plugins/previewers/prism-previewers.css new file mode 100644 index 0000000000..b36988c2bf --- /dev/null +++ b/docs/_style/prism-master/plugins/previewers/prism-previewers.css @@ -0,0 +1,242 @@ +.prism-previewer, +.prism-previewer:before, +.prism-previewer:after { + position: absolute; + pointer-events: none; +} +.prism-previewer, +.prism-previewer:after { + left: 50%; +} +.prism-previewer { + margin-top: -48px; + width: 32px; + height: 32px; + margin-left: -16px; + + opacity: 0; + -webkit-transition: opacity .25s; + -o-transition: opacity .25s; + transition: opacity .25s; +} +.prism-previewer.flipped { + margin-top: 0; + margin-bottom: -48px; +} +.prism-previewer:before, +.prism-previewer:after { + content: ''; + position: absolute; + pointer-events: none; +} +.prism-previewer:before { + top: -5px; + right: -5px; + left: -5px; + bottom: -5px; + border-radius: 10px; + border: 5px solid #fff; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75); +} +.prism-previewer:after { + top: 100%; + width: 0; + height: 0; + margin: 5px 0 0 -7px; + border: 7px solid transparent; + border-color: rgba(255, 0, 0, 0); + border-top-color: #fff; +} +.prism-previewer.flipped:after { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: 5px; + border-top-color: rgba(255, 0, 0, 0); + border-bottom-color: #fff; +} +.prism-previewer.active { + opacity: 1; +} + +.prism-previewer-angle:before { + border-radius: 50%; + background: #fff; +} +.prism-previewer-angle:after { + margin-top: 4px; +} +.prism-previewer-angle svg { + width: 32px; + height: 32px; + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.prism-previewer-angle[data-negative] svg { + -webkit-transform: scaleX(-1) rotate(-90deg); + -moz-transform: scaleX(-1) rotate(-90deg); + -ms-transform: scaleX(-1) rotate(-90deg); + -o-transform: scaleX(-1) rotate(-90deg); + transform: scaleX(-1) rotate(-90deg); +} +.prism-previewer-angle circle { + fill: transparent; + stroke: hsl(200, 10%, 20%); + stroke-opacity: 0.9; + stroke-width: 32; + stroke-dasharray: 0, 500; +} + +.prism-previewer-gradient { + background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb); + background-size: 10px 10px; + background-position: 0 0, 5px 5px; + + width: 64px; + margin-left: -32px; +} +.prism-previewer-gradient:before { + content: none; +} +.prism-previewer-gradient div { + position: absolute; + top: -5px; + left: -5px; + right: -5px; + bottom: -5px; + border-radius: 10px; + border: 5px solid #fff; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75); +} + +.prism-previewer-color { + background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb); + background-size: 10px 10px; + background-position: 0 0, 5px 5px; +} +.prism-previewer-color:before { + background-color: inherit; + background-clip: padding-box; +} + +.prism-previewer-easing { + margin-top: -76px; + margin-left: -30px; + width: 60px; + height: 60px; + background: #333; +} +.prism-previewer-easing.flipped { + margin-bottom: -116px; +} +.prism-previewer-easing svg { + width: 60px; + height: 60px; +} +.prism-previewer-easing circle { + fill: hsl(200, 10%, 20%); + stroke: white; +} +.prism-previewer-easing path { + fill: none; + stroke: white; + stroke-linecap: round; + stroke-width: 4; +} +.prism-previewer-easing line { + stroke: white; + stroke-opacity: 0.5; + stroke-width: 2; +} + +@-webkit-keyframes prism-previewer-time { + 0% { + stroke-dasharray: 0, 500; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 100, 500; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 0, 500; + stroke-dashoffset: -100; + } +} + +@-o-keyframes prism-previewer-time { + 0% { + stroke-dasharray: 0, 500; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 100, 500; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 0, 500; + stroke-dashoffset: -100; + } +} + +@-moz-keyframes prism-previewer-time { + 0% { + stroke-dasharray: 0, 500; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 100, 500; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 0, 500; + stroke-dashoffset: -100; + } +} + +@keyframes prism-previewer-time { + 0% { + stroke-dasharray: 0, 500; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 100, 500; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 0, 500; + stroke-dashoffset: -100; + } +} + +.prism-previewer-time:before { + border-radius: 50%; + background: #fff; +} +.prism-previewer-time:after { + margin-top: 4px; +} +.prism-previewer-time svg { + width: 32px; + height: 32px; + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.prism-previewer-time circle { + fill: transparent; + stroke: hsl(200, 10%, 20%); + stroke-opacity: 0.9; + stroke-width: 32; + stroke-dasharray: 0, 500; + stroke-dashoffset: 0; + -webkit-animation: prism-previewer-time linear infinite 3s; + -moz-animation: prism-previewer-time linear infinite 3s; + -o-animation: prism-previewer-time linear infinite 3s; + animation: prism-previewer-time linear infinite 3s; +} \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/previewers/prism-previewers.js b/docs/_style/prism-master/plugins/previewers/prism-previewers.js new file mode 100644 index 0000000000..0f0d2f9c72 --- /dev/null +++ b/docs/_style/prism-master/plugins/previewers/prism-previewers.js @@ -0,0 +1,708 @@ +(function() { + + if ( + typeof self !== 'undefined' && !self.Prism || + !self.document || !Function.prototype.bind + ) { + return; + } + + var previewers = { + // gradient must be defined before color and angle + 'gradient': { + create: (function () { + + // Stores already processed gradients so that we don't + // make the conversion every time the previewer is shown + var cache = {}; + + /** + * Returns a W3C-valid linear gradient + * @param {string} prefix Vendor prefix if any ("-moz-", "-webkit-", etc.) + * @param {string} func Gradient function name ("linear-gradient") + * @param {string[]} values Array of the gradient function parameters (["0deg", "red 0%", "blue 100%"]) + */ + var convertToW3CLinearGradient = function(prefix, func, values) { + // Default value for angle + var angle = '180deg'; + + if (/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(values[0])) { + angle = values.shift(); + if (angle.indexOf('to ') < 0) { + // Angle uses old keywords + // W3C syntax uses "to" + opposite keywords + if (angle.indexOf('top') >= 0) { + if (angle.indexOf('left') >= 0) { + angle = 'to bottom right'; + } else if (angle.indexOf('right') >= 0) { + angle = 'to bottom left'; + } else { + angle = 'to bottom'; + } + } else if (angle.indexOf('bottom') >= 0) { + if (angle.indexOf('left') >= 0) { + angle = 'to top right'; + } else if (angle.indexOf('right') >= 0) { + angle = 'to top left'; + } else { + angle = 'to top'; + } + } else if (angle.indexOf('left') >= 0) { + angle = 'to right'; + } else if (angle.indexOf('right') >= 0) { + angle = 'to left'; + } else if (prefix) { + // Angle is shifted by 90deg in prefixed gradients + if (angle.indexOf('deg') >= 0) { + angle = (90 - parseFloat(angle)) + 'deg'; + } else if (angle.indexOf('rad') >= 0) { + angle = (Math.PI / 2 - parseFloat(angle)) + 'rad'; + } + } + } + } + + return func + '(' + angle + ',' + values.join(',') + ')'; + }; + + /** + * Returns a W3C-valid radial gradient + * @param {string} prefix Vendor prefix if any ("-moz-", "-webkit-", etc.) + * @param {string} func Gradient function name ("linear-gradient") + * @param {string[]} values Array of the gradient function parameters (["0deg", "red 0%", "blue 100%"]) + */ + var convertToW3CRadialGradient = function(prefix, func, values) { + if (values[0].indexOf('at') < 0) { + // Looks like old syntax + + // Default values + var position = 'center'; + var shape = 'ellipse'; + var size = 'farthest-corner'; + + if (/\bcenter|top|right|bottom|left\b|^\d+/.test(values[0])) { + // Found a position + // Remove angle value, if any + position = values.shift().replace(/\s*-?\d+(?:rad|deg)\s*/, ''); + } + if (/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(values[0])) { + // Found a shape and/or size + var shapeSizeParts = values.shift().split(/\s+/); + if (shapeSizeParts[0] && (shapeSizeParts[0] === 'circle' || shapeSizeParts[0] === 'ellipse')) { + shape = shapeSizeParts.shift(); + } + if (shapeSizeParts[0]) { + size = shapeSizeParts.shift(); + } + + // Old keywords are converted to their synonyms + if (size === 'cover') { + size = 'farthest-corner'; + } else if (size === 'contain') { + size = 'clothest-side'; + } + } + + return func + '(' + shape + ' ' + size + ' at ' + position + ',' + values.join(',') + ')'; + } + return func + '(' + values.join(',') + ')'; + }; + + /** + * Converts a gradient to a W3C-valid one + * Does not support old webkit syntax (-webkit-gradient(linear...) and -webkit-gradient(radial...)) + * @param {string} gradient The CSS gradient + */ + var convertToW3CGradient = function(gradient) { + if (cache[gradient]) { + return cache[gradient]; + } + var parts = gradient.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/); + // "", "-moz-", etc. + var prefix = parts && parts[1]; + // "linear-gradient", "radial-gradient", etc. + var func = parts && parts[2]; + + var values = gradient.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g, '').split(/\s*,\s*/); + + if (func.indexOf('linear') >= 0) { + return cache[gradient] = convertToW3CLinearGradient(prefix, func, values); + } else if (func.indexOf('radial') >= 0) { + return cache[gradient] = convertToW3CRadialGradient(prefix, func, values); + } + return cache[gradient] = func + '(' + values.join(',') + ')'; + }; + + return function () { + new Prism.plugins.Previewer('gradient', function(value) { + this.firstChild.style.backgroundImage = ''; + this.firstChild.style.backgroundImage = convertToW3CGradient(value); + return !!this.firstChild.style.backgroundImage; + }, '*', function () { + this._elt.innerHTML = '
    '; + }); + }; + }()), + tokens: { + 'gradient': { + pattern: /(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi, + inside: { + 'function': /[\w-]+(?=\()/, + 'punctuation': /[(),]/ + } + } + }, + languages: { + 'css': true, + 'less': true, + 'sass': [ + { + lang: 'sass', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['variable-line'] + }, + { + lang: 'sass', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['property-line'] + } + ], + 'scss': true, + 'stylus': [ + { + lang: 'stylus', + before: 'func', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside + }, + { + lang: 'stylus', + before: 'func', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside + } + ] + } + }, + 'angle': { + create: function () { + new Prism.plugins.Previewer('angle', function(value) { + var num = parseFloat(value); + var unit = value.match(/[a-z]+$/i); + var max, percentage; + if (!num || !unit) { + return false; + } + unit = unit[0]; + + switch(unit) { + case 'deg': + max = 360; + break; + case 'grad': + max = 400; + break; + case 'rad': + max = 2 * Math.PI; + break; + case 'turn': + max = 1; + } + + percentage = 100 * num/max; + percentage %= 100; + + this[(num < 0? 'set' : 'remove') + 'Attribute']('data-negative', ''); + this.querySelector('circle').style.strokeDasharray = Math.abs(percentage) + ',500'; + return true; + }, '*', function () { + this._elt.innerHTML = '' + + '' + + ''; + }); + }, + tokens: { + 'angle': /(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i + }, + languages: { + 'css': true, + 'less': true, + 'markup': { + lang: 'markup', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'] + }, + 'sass': [ + { + lang: 'sass', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['property-line'] + }, + { + lang: 'sass', + before: 'operator', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['variable-line'] + } + ], + 'scss': true, + 'stylus': [ + { + lang: 'stylus', + before: 'func', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside + }, + { + lang: 'stylus', + before: 'func', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside + } + ] + } + }, + 'color': { + create: function () { + new Prism.plugins.Previewer('color', function(value) { + this.style.backgroundColor = ''; + this.style.backgroundColor = value; + return !!this.style.backgroundColor; + }); + }, + tokens: { + 'color': { + pattern: /\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, + inside: { + 'function': /[\w-]+(?=\()/, + 'punctuation': /[(),]/ + } + } + }, + languages: { + 'css': true, + 'less': true, + 'markup': { + lang: 'markup', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'] + }, + 'sass': [ + { + lang: 'sass', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['variable-line'] + }, + { + lang: 'sass', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['property-line'] + } + ], + 'scss': true, + 'stylus': [ + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside + }, + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside + } + ] + } + }, + 'easing': { + create: function () { + new Prism.plugins.Previewer('easing', function (value) { + + value = { + 'linear': '0,0,1,1', + 'ease': '.25,.1,.25,1', + 'ease-in': '.42,0,1,1', + 'ease-out': '0,0,.58,1', + 'ease-in-out':'.42,0,.58,1' + }[value] || value; + + var p = value.match(/-?\d*\.?\d+/g); + + if(p.length === 4) { + p = p.map(function(p, i) { return (i % 2? 1 - p : p) * 100; }); + + this.querySelector('path').setAttribute('d', 'M0,100 C' + p[0] + ',' + p[1] + ', ' + p[2] + ',' + p[3] + ', 100,0'); + + var lines = this.querySelectorAll('line'); + lines[0].setAttribute('x2', p[0]); + lines[0].setAttribute('y2', p[1]); + lines[1].setAttribute('x2', p[2]); + lines[1].setAttribute('y2', p[3]); + + return true; + } + + return false; + }, '*', function () { + this._elt.innerHTML = '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ''; + }); + }, + tokens: { + 'easing': { + pattern: /\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i, + inside: { + 'function': /[\w-]+(?=\()/, + 'punctuation': /[(),]/ + } + } + }, + languages: { + 'css': true, + 'less': true, + 'sass': [ + { + lang: 'sass', + inside: 'inside', + before: 'punctuation', + root: Prism.languages.sass && Prism.languages.sass['variable-line'] + }, + { + lang: 'sass', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['property-line'] + } + ], + 'scss': true, + 'stylus': [ + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside + }, + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside + } + ] + } + }, + + 'time': { + create: function () { + new Prism.plugins.Previewer('time', function(value) { + var num = parseFloat(value); + var unit = value.match(/[a-z]+$/i); + if (!num || !unit) { + return false; + } + unit = unit[0]; + this.querySelector('circle').style.animationDuration = 2 * num + unit; + return true; + }, '*', function () { + this._elt.innerHTML = '' + + '' + + ''; + }); + }, + tokens: { + 'time': /(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i + }, + languages: { + 'css': true, + 'less': true, + 'markup': { + lang: 'markup', + before: 'punctuation', + inside: 'inside', + root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'] + }, + 'sass': [ + { + lang: 'sass', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['property-line'] + }, + { + lang: 'sass', + before: 'operator', + inside: 'inside', + root: Prism.languages.sass && Prism.languages.sass['variable-line'] + } + ], + 'scss': true, + 'stylus': [ + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside + }, + { + lang: 'stylus', + before: 'hexcode', + inside: 'rest', + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside + } + ] + } + } + }; + + /** + * Returns the absolute X, Y offsets for an element + * @param {HTMLElement} element + * @returns {{top: number, right: number, bottom: number, left: number, width: number, height: number}} + */ + var getOffset = function (element) { + var elementBounds = element.getBoundingClientRect(); + var left = elementBounds.left; + var top = elementBounds.top; + var documentBounds = document.documentElement.getBoundingClientRect(); + left -= documentBounds.left; + top -= documentBounds.top; + + return { + top: top, + right: innerWidth - left - elementBounds.width, + bottom: innerHeight - top - elementBounds.height, + left: left, + width: elementBounds.width, + height: elementBounds.height + }; + }; + + var tokenRegexp = /(?:^|\s)token(?=$|\s)/; + var activeRegexp = /(?:^|\s)active(?=$|\s)/g; + var flippedRegexp = /(?:^|\s)flipped(?=$|\s)/g; + + /** + * Previewer constructor + * @param {string} type Unique previewer type + * @param {function} updater Function that will be called on mouseover. + * @param {string[]|string=} supportedLanguages Aliases of the languages this previewer must be enabled for. Defaults to "*", all languages. + * @param {function=} initializer Function that will be called on initialization. + * @constructor + */ + var Previewer = function (type, updater, supportedLanguages, initializer) { + this._elt = null; + this._type = type; + this._clsRegexp = RegExp('(?:^|\\s)' + type + '(?=$|\\s)'); + this._token = null; + this.updater = updater; + this._mouseout = this.mouseout.bind(this); + this.initializer = initializer; + + var self = this; + + if (!supportedLanguages) { + supportedLanguages = ['*']; + } + if (Prism.util.type(supportedLanguages) !== 'Array') { + supportedLanguages = [supportedLanguages]; + } + supportedLanguages.forEach(function (lang) { + if (typeof lang !== 'string') { + lang = lang.lang; + } + if (!Previewer.byLanguages[lang]) { + Previewer.byLanguages[lang] = []; + } + if (Previewer.byLanguages[lang].indexOf(self) < 0) { + Previewer.byLanguages[lang].push(self); + } + }); + Previewer.byType[type] = this; + }; + + /** + * Creates the HTML element for the previewer. + */ + Previewer.prototype.init = function () { + if (this._elt) { + return; + } + this._elt = document.createElement('div'); + this._elt.className = 'prism-previewer prism-previewer-' + this._type; + document.body.appendChild(this._elt); + if(this.initializer) { + this.initializer(); + } + }; + + Previewer.prototype.isDisabled = function (token) { + do { + if (token.hasAttribute && token.hasAttribute('data-previewers')) { + var previewers = token.getAttribute('data-previewers'); + return (previewers || '').split(/\s+/).indexOf(this._type) === -1; + } + } while(token = token.parentNode); + return false; + }; + + /** + * Checks the class name of each hovered element + * @param token + */ + Previewer.prototype.check = function (token) { + if (tokenRegexp.test(token.className) && this.isDisabled(token)) { + return; + } + do { + if (tokenRegexp.test(token.className) && this._clsRegexp.test(token.className)) { + break; + } + } while(token = token.parentNode); + + if (token && token !== this._token) { + this._token = token; + this.show(); + } + }; + + /** + * Called on mouseout + */ + Previewer.prototype.mouseout = function() { + this._token.removeEventListener('mouseout', this._mouseout, false); + this._token = null; + this.hide(); + }; + + /** + * Shows the previewer positioned properly for the current token. + */ + Previewer.prototype.show = function () { + if (!this._elt) { + this.init(); + } + if (!this._token) { + return; + } + + if (this.updater.call(this._elt, this._token.textContent)) { + this._token.addEventListener('mouseout', this._mouseout, false); + + var offset = getOffset(this._token); + this._elt.className += ' active'; + + if (offset.top - this._elt.offsetHeight > 0) { + this._elt.className = this._elt.className.replace(flippedRegexp, ''); + this._elt.style.top = offset.top + 'px'; + this._elt.style.bottom = ''; + } else { + this._elt.className += ' flipped'; + this._elt.style.bottom = offset.bottom + 'px'; + this._elt.style.top = ''; + } + + this._elt.style.left = offset.left + Math.min(200, offset.width / 2) + 'px'; + } else { + this.hide(); + } + }; + + /** + * Hides the previewer. + */ + Previewer.prototype.hide = function () { + this._elt.className = this._elt.className.replace(activeRegexp, ''); + }; + + /** + * Map of all registered previewers by language + * @type {{}} + */ + Previewer.byLanguages = {}; + + /** + * Map of all registered previewers by type + * @type {{}} + */ + Previewer.byType = {}; + + /** + * Initializes the mouseover event on the code block. + * @param {HTMLElement} elt The code block (env.element) + * @param {string} lang The language (env.language) + */ + Previewer.initEvents = function (elt, lang) { + var previewers = []; + if (Previewer.byLanguages[lang]) { + previewers = previewers.concat(Previewer.byLanguages[lang]); + } + if (Previewer.byLanguages['*']) { + previewers = previewers.concat(Previewer.byLanguages['*']); + } + elt.addEventListener('mouseover', function (e) { + var target = e.target; + previewers.forEach(function (previewer) { + previewer.check(target); + }); + }, false); + }; + Prism.plugins.Previewer = Previewer; + + Prism.hooks.add('before-highlight', function (env) { + for (var previewer in previewers) { + var languages = previewers[previewer].languages; + if (env.language && languages[env.language] && !languages[env.language].initialized) { + var lang = languages[env.language]; + if (Prism.util.type(lang) !== 'Array') { + lang = [lang]; + } + lang.forEach(function (lang) { + var before, inside, root, skip; + if (lang === true) { + before = 'important'; + inside = env.language; + lang = env.language; + } else { + before = lang.before || 'important'; + inside = lang.inside || lang.lang; + root = lang.root || Prism.languages; + skip = lang.skip; + lang = env.language; + } + + if (!skip && Prism.languages[lang]) { + Prism.languages.insertBefore(inside, before, previewers[previewer].tokens, root); + env.grammar = Prism.languages[lang]; + + languages[env.language] = {initialized: true}; + } + }); + } + } + }); + + // Initialize the previewers only when needed + Prism.hooks.add('after-highlight', function (env) { + if(Previewer.byLanguages['*'] || Previewer.byLanguages[env.language]) { + Previewer.initEvents(env.element, env.language); + } + }); + + for (var previewer in previewers) { + previewers[previewer].create(); + } + +}()); diff --git a/docs/_style/prism-master/plugins/previewers/prism-previewers.min.js b/docs/_style/prism-master/plugins/previewers/prism-previewers.min.js new file mode 100644 index 0000000000..477d4e52d9 --- /dev/null +++ b/docs/_style/prism-master/plugins/previewers/prism-previewers.min.js @@ -0,0 +1 @@ +!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var e={gradient:{create:function(){var e={},s=function(e,s,i){var t="180deg";return/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(i[0])&&(t=i.shift(),t.indexOf("to ")<0&&(t.indexOf("top")>=0?t=t.indexOf("left")>=0?"to bottom right":t.indexOf("right")>=0?"to bottom left":"to bottom":t.indexOf("bottom")>=0?t=t.indexOf("left")>=0?"to top right":t.indexOf("right")>=0?"to top left":"to top":t.indexOf("left")>=0?t="to right":t.indexOf("right")>=0?t="to left":e&&(t.indexOf("deg")>=0?t=90-parseFloat(t)+"deg":t.indexOf("rad")>=0&&(t=Math.PI/2-parseFloat(t)+"rad")))),s+"("+t+","+i.join(",")+")"},i=function(e,s,i){if(i[0].indexOf("at")<0){var t="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(i[0])&&(t=i.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(i[0])){var n=i.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+t+","+i.join(",")+")"}return s+"("+i.join(",")+")"},t=function(t){if(e[t])return e[t];var a=t.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),r=a&&a[1],n=a&&a[2],l=t.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return e[t]=n.indexOf("linear")>=0?s(r,n,l):n.indexOf("radial")>=0?i(r,n,l):n+"("+l.join(",")+")"};return function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=t(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
    "})}}(),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,i,t=parseFloat(e),a=e.match(/[a-z]+$/i);if(!t||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return i=100*t/s,i%=100,this[(0>t?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(i)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:{pattern:/\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e;var s=e.match(/-?\d*\.?\d+/g);if(4===s.length){s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var i=this.querySelectorAll("line");return i[0].setAttribute("x2",s[0]),i[0].setAttribute("y2",s[1]),i[1].setAttribute("x2",s[2]),i[1].setAttribute("y2",s[3]),!0}return!1},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),i=e.match(/[a-z]+$/i);return s&&i?(i=i[0],this.querySelector("circle").style.animationDuration=2*s+i,!0):!1},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},s=function(e){var s=e.getBoundingClientRect(),i=s.left,t=s.top,a=document.documentElement.getBoundingClientRect();return i-=a.left,t-=a.top,{top:t,right:innerWidth-i-s.width,bottom:innerHeight-t-s.height,left:i,width:s.width,height:s.height}},i=/(?:^|\s)token(?=$|\s)/,t=/(?:^|\s)active(?=$|\s)/g,a=/(?:^|\s)flipped(?=$|\s)/g,r=function(e,s,i,t){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=t;var a=this;i||(i=["*"]),"Array"!==Prism.util.type(i)&&(i=[i]),i.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do if(e.hasAttribute&&e.hasAttribute("data-previewers")){var s=e.getAttribute("data-previewers");return-1===(s||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!i.test(e.className)||!this.isDisabled(e)){do if(i.test(e.className)&&this._clsRegexp.test(e.className))break;while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=s(this._token);this._elt.className+=" active",e.top-this._elt.offsetHeight>0?(this._elt.className=this._elt.className.replace(a,""),this._elt.style.top=e.top+"px",this._elt.style.bottom=""):(this._elt.className+=" flipped",this._elt.style.bottom=e.bottom+"px",this._elt.style.top=""),this._elt.style.left=e.left+Math.min(200,e.width/2)+"px"}else this.hide()},r.prototype.hide=function(){this._elt.className=this._elt.className.replace(t,"")},r.byLanguages={},r.byType={},r.initEvents=function(e,s){var i=[];r.byLanguages[s]&&(i=i.concat(r.byLanguages[s])),r.byLanguages["*"]&&(i=i.concat(r.byLanguages["*"])),e.addEventListener("mouseover",function(e){var s=e.target;i.forEach(function(e){e.check(s)})},!1)},Prism.plugins.Previewer=r,Prism.hooks.add("before-highlight",function(s){for(var i in e){var t=e[i].languages;if(s.language&&t[s.language]&&!t[s.language].initialized){var a=t[s.language];"Array"!==Prism.util.type(a)&&(a=[a]),a.forEach(function(a){var r,n,l,o;a===!0?(r="important",n=s.language,a=s.language):(r=a.before||"important",n=a.inside||a.lang,l=a.root||Prism.languages,o=a.skip,a=s.language),!o&&Prism.languages[a]&&(Prism.languages.insertBefore(n,r,e[i].tokens,l),s.grammar=Prism.languages[a],t[s.language]={initialized:!0})})}}}),Prism.hooks.add("after-highlight",function(e){(r.byLanguages["*"]||r.byLanguages[e.language])&&r.initEvents(e.element,e.language)});for(var n in e)e[n].create()}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/remove-initial-line-feed/index.html b/docs/_style/prism-master/plugins/remove-initial-line-feed/index.html new file mode 100644 index 0000000000..8eb942fa67 --- /dev/null +++ b/docs/_style/prism-master/plugins/remove-initial-line-feed/index.html @@ -0,0 +1,59 @@ + + + + + + + Remove initial line feed ▲ Prism plugins + + + + + + + + + + +
    +
    + +

    Remove initial line feed

    +

    Removes the initial line feed in code blocks.

    +
    + +
    +

    How to use (DEPRECATED)

    + +

    This plugin will be removed in the future. Please use the general purpose Normalize Whitespace plugin instead.

    +

    Obviously, this is supposed to work only for code blocks (<pre><code>) and not for inline code.

    +

    With this plugin included, any initial line feed will be removed by default.

    +

    To bypass this behaviour, you may add the class keep-initial-line-feed to your desired <pre>.

    +
    + +
    +

    Examples

    + +

    Without adding the class

    +
    
    +<div></div>
    +
    + +

    With the class added

    +
    
    +<div></div>
    +
    + +
    + +
    + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js b/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js new file mode 100644 index 0000000000..f62a8bfef0 --- /dev/null +++ b/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js @@ -0,0 +1,21 @@ +(function() { + +if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; +} + +Prism.hooks.add('before-sanity-check', function (env) { + if (env.code) { + var pre = env.element.parentNode; + var clsReg = /\s*\bkeep-initial-line-feed\b\s*/; + if ( + pre && pre.nodeName.toLowerCase() === 'pre' && + // Apply only if nor the
     or the  have the class
    +			(!clsReg.test(pre.className) && !clsReg.test(env.element.className))
    +		) {
    +			env.code = env.code.replace(/^(?:\r?\n|\r)/, '');
    +		}
    +	}
    +});
    +
    +}());
    \ No newline at end of file
    diff --git a/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js b/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js
    new file mode 100644
    index 0000000000..e0016a496b
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js
    @@ -0,0 +1 @@
    +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.hooks.add("before-sanity-check",function(e){if(e.code){var s=e.element.parentNode,n=/\s*\bkeep-initial-line-feed\b\s*/;!s||"pre"!==s.nodeName.toLowerCase()||n.test(s.className)||n.test(e.element.className)||(e.code=e.code.replace(/^(?:\r?\n|\r)/,""))}})}();
    \ No newline at end of file
    diff --git a/docs/_style/prism-master/plugins/show-invisibles/index.html b/docs/_style/prism-master/plugins/show-invisibles/index.html
    new file mode 100644
    index 0000000000..cb0ad436a4
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/show-invisibles/index.html
    @@ -0,0 +1,46 @@
    +
    +
    +
    +
    +
    +
    +Show Invisibles ▲ Prism plugins
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +

    Show Invisibles

    +

    Show hidden characters such as tabs and line breaks.

    +
    + +
    +

    Examples

    + +
    
    +	
    +	
    
    +	
    +	
    
    +
    + +
    + + + + + + + + + + diff --git a/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.css b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.css new file mode 100644 index 0000000000..c57be58812 --- /dev/null +++ b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.css @@ -0,0 +1,34 @@ +.token.tab:not(:empty), +.token.cr, +.token.lf, +.token.space { + position: relative; +} + +.token.tab:not(:empty):before, +.token.cr:before, +.token.lf:before, +.token.space:before { + color: inherit; + opacity: 0.4; + position: absolute; +} + +.token.tab:not(:empty):before { + content: '\21E5'; +} + +.token.cr:before { + content: '\240D'; +} + +.token.crlf:before { + content: '\240D\240A'; +} +.token.lf:before { + content: '\240A'; +} + +.token.space:before { + content: '\00B7'; +} diff --git a/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.js b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.js new file mode 100644 index 0000000000..f3d120a9e8 --- /dev/null +++ b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.js @@ -0,0 +1,21 @@ +(function(){ + +if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism +) { + return; +} + +Prism.hooks.add('before-highlight', function(env) { + var tokens = env.grammar; + + if (!tokens) return; + + tokens.tab = /\t/g; + tokens.crlf = /\r\n/g; + tokens.lf = /\n/g; + tokens.cr = /\r/g; + tokens.space = / /g; +}); +})(); diff --git a/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.min.js b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.min.js new file mode 100644 index 0000000000..9df7258c89 --- /dev/null +++ b/docs/_style/prism-master/plugins/show-invisibles/prism-show-invisibles.min.js @@ -0,0 +1 @@ +!function(){"undefined"!=typeof self&&!self.Prism||"undefined"!=typeof global&&!global.Prism||Prism.hooks.add("before-highlight",function(e){var f=e.grammar;f&&(f.tab=/\t/g,f.crlf=/\r\n/g,f.lf=/\n/g,f.cr=/\r/g,f.space=/ /g)})}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/show-language/index.html b/docs/_style/prism-master/plugins/show-language/index.html new file mode 100644 index 0000000000..e79b1ccf9f --- /dev/null +++ b/docs/_style/prism-master/plugins/show-language/index.html @@ -0,0 +1,54 @@ + + + + + + +Show Language ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    Show Language

    +

    Display the highlighted language in code blocks (inline code does not show the label).

    +
    + +
    +

    Examples

    + +

    JavaScript

    +
    
    +
    +	

    CSS

    +
    
    +
    +	

    HTML (Markup)

    +
    
    +
    +	

    SVG

    +

    The data-language attribute can be used to display a specific label whether it has been defined as a language or not.

    +
    
    +
    + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/show-language/prism-show-language.js b/docs/_style/prism-master/plugins/show-language/prism-show-language.js new file mode 100644 index 0000000000..38675bb6b7 --- /dev/null +++ b/docs/_style/prism-master/plugins/show-language/prism-show-language.js @@ -0,0 +1,31 @@ +(function(){ + +if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; +} + +if (!Prism.plugins.toolbar) { + console.warn('Show Languages plugin loaded before Toolbar plugin.'); + + return; +} + +// The languages map is built automatically with gulp +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +Prism.plugins.toolbar.registerButton('show-language', function(env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName)) { + return; + } + var language = pre.getAttribute('data-language') || Languages[env.language] || (env.language && (env.language.substring(0, 1).toUpperCase() + env.language.substring(1))); + + if(!language) { + return; + } + var element = document.createElement('span'); + element.textContent = language; + + return element; +}); + +})(); diff --git a/docs/_style/prism-master/plugins/show-language/prism-show-language.min.js b/docs/_style/prism-master/plugins/show-language/prism-show-language.min.js new file mode 100644 index 0000000000..7f4dd60fbf --- /dev/null +++ b/docs/_style/prism-master/plugins/show-language/prism-show-language.min.js @@ -0,0 +1 @@ +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/toolbar/index.html b/docs/_style/prism-master/plugins/toolbar/index.html new file mode 100644 index 0000000000..5547c5de85 --- /dev/null +++ b/docs/_style/prism-master/plugins/toolbar/index.html @@ -0,0 +1,134 @@ + + + + + + + Toolbar ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    Toolbar

    +

    Attach a toolbar for plugins to easily register buttons on the top of a code block.

    +
    + +
    +

    How to use

    +

    The Toolbar plugin allows for several methods to register your button, using the Prism.plugins.toolbar.registerButton function.

    + +

    The simplest method is through the HTML API. Add a data-label attribute to the pre element, and the Toolbar + plugin will read the value of that attribute and append a label to the code snippet.

    + +
    <pre data-src="plugins/toolbar/prism-toolbar.js" data-label="Hello World!"></pre>
    + +

    If you want to provide arbitrary HTML to the label, create a template element with the HTML you want in the label, and provide the + template element's id to data-label. The Toolbar plugin will use the template's content for the button. + You can also use to declare your event handlers inline:

    + +
    <pre data-src="plugins/toolbar/prism-toolbar.js" data-label="my-label-button"></pre>
    + +
    <template id="my-label-button"><button onclick="console.log('This is an inline-handler');">My button</button></template>
    + +

    For more flexibility, the Toolbar exposes a JavaScript function that can be used to register new buttons or labels to the Toolbar, + Prism.plugins.toolbar.registerButton.

    + +

    The function accepts a key for the button and an object with a text property string and an optional + onClick function or url string. The onClick function will be called when the button is clicked, while the + url property will be set to the anchor tag's href.

    + +
    Prism.plugins.toolbar.registerButton('hello-world', {
    +	text: 'Hello World!', // required
    +	onClick: function (env) { // optional
    +		alert('This code snippet is written in ' + env.language + '.');
    +	}
    +});
    + +

    See how the above code registers the Hello World! button? You can use this in your plugins to register your own buttons with the toolbar.

    + +

    If you need more control, you can provide a function to registerButton that returns either a span, a, or + button element.

    + +
    Prism.plugins.toolbar.registerButton('select-code', function() {
    +	var button = document.createElement('button');
    +	button.innerHTML = 'Select Code';
    +
    +	button.addEventListener('click', function () {
    +		// Source: http://stackoverflow.com/a/11128179/2757940
    +		if (document.body.createTextRange) { // ms
    +			var range = document.body.createTextRange();
    +			range.moveToElementText(env.element);
    +			range.select();
    +		} else if (window.getSelection) { // moz, opera, webkit
    +			var selection = window.getSelection();
    +			var range = document.createRange();
    +			range.selectNodeContents(env.element);
    +			selection.removeAllRanges();
    +			selection.addRange(range);
    +		}
    +	});
    +
    +	return button;
    +});
    + +

    The above function creates the Select Code button you see, and when you click it, the code gets highlighted.

    + +

    By default, the buttons will be added to the code snippet in the order they were registered. If more control over + the order is needed, an HTML attribute can be added to the body tag with a comma-separated string indicating the + order.

    + +
    <body data-toolbar-order="select-code,hello-world,label">
    +
    + +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/toolbar/prism-toolbar.css b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.css new file mode 100644 index 0000000000..2b234e19f0 --- /dev/null +++ b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.css @@ -0,0 +1,58 @@ +div.code-toolbar { + position: relative; +} + +div.code-toolbar > .toolbar { + position: absolute; + top: .3em; + right: .2em; + transition: opacity 0.3s ease-in-out; + opacity: 0; +} + +div.code-toolbar:hover > .toolbar { + opacity: 1; +} + +div.code-toolbar > .toolbar .toolbar-item { + display: inline-block; +} + +div.code-toolbar > .toolbar a { + cursor: pointer; +} + +div.code-toolbar > .toolbar button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + -webkit-user-select: none; /* for button */ + -moz-user-select: none; + -ms-user-select: none; +} + +div.code-toolbar > .toolbar a, +div.code-toolbar > .toolbar button, +div.code-toolbar > .toolbar span { + color: #bbb; + font-size: .8em; + padding: 0 .5em; + background: #f5f2f0; + background: rgba(224, 224, 224, 0.2); + box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); + border-radius: .5em; +} + +div.code-toolbar > .toolbar a:hover, +div.code-toolbar > .toolbar a:focus, +div.code-toolbar > .toolbar button:hover, +div.code-toolbar > .toolbar button:focus, +div.code-toolbar > .toolbar span:hover, +div.code-toolbar > .toolbar span:focus { + color: inherit; + text-decoration: none; +} diff --git a/docs/_style/prism-master/plugins/toolbar/prism-toolbar.js b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.js new file mode 100644 index 0000000000..93294514b1 --- /dev/null +++ b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.js @@ -0,0 +1,137 @@ +(function(){ + if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; + } + + var callbacks = []; + var map = {}; + var noop = function() {}; + + Prism.plugins.toolbar = {}; + + /** + * Register a button callback with the toolbar. + * + * @param {string} key + * @param {Object|Function} opts + */ + var registerButton = Prism.plugins.toolbar.registerButton = function (key, opts) { + var callback; + + if (typeof opts === 'function') { + callback = opts; + } else { + callback = function (env) { + var element; + + if (typeof opts.onClick === 'function') { + element = document.createElement('button'); + element.type = 'button'; + element.addEventListener('click', function () { + opts.onClick.call(this, env); + }); + } else if (typeof opts.url === 'string') { + element = document.createElement('a'); + element.href = opts.url; + } else { + element = document.createElement('span'); + } + + element.textContent = opts.text; + + return element; + }; + } + + callbacks.push(map[key] = callback); + }; + + /** + * Post-highlight Prism hook callback. + * + * @param env + */ + var hook = Prism.plugins.toolbar.hook = function (env) { + // Check if inline or actual code block (credit to line-numbers plugin) + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName)) { + return; + } + + // Autoloader rehighlights, so only do this once. + if (pre.parentNode.classList.contains('code-toolbar')) { + return; + } + + // Create wrapper for
     to prevent scrolling toolbar with content
    +		var wrapper = document.createElement("div");
    +		wrapper.classList.add("code-toolbar");
    +		pre.parentNode.insertBefore(wrapper, pre);
    +		wrapper.appendChild(pre);
    +
    +		// Setup the toolbar
    +		var toolbar = document.createElement('div');
    +		toolbar.classList.add('toolbar');
    +
    +		if (document.body.hasAttribute('data-toolbar-order')) {
    +			callbacks = document.body.getAttribute('data-toolbar-order').split(',').map(function(key) {
    +				return map[key] || noop;
    +			});
    +		}
    +
    +		callbacks.forEach(function(callback) {
    +			var element = callback(env);
    +
    +			if (!element) {
    +				return;
    +			}
    +
    +			var item = document.createElement('div');
    +			item.classList.add('toolbar-item');
    +
    +			item.appendChild(element);
    +			toolbar.appendChild(item);
    +		});
    +
    +		// Add our toolbar to the currently created wrapper of 
     tag
    +		wrapper.appendChild(toolbar);
    +	};
    +
    +	registerButton('label', function(env) {
    +		var pre = env.element.parentNode;
    +		if (!pre || !/pre/i.test(pre.nodeName)) {
    +			return;
    +		}
    +
    +		if (!pre.hasAttribute('data-label')) {
    +			return;
    +		}
    +
    +		var element, template;
    +		var text = pre.getAttribute('data-label');
    +		try {
    +			// Any normal text will blow up this selector.
    +			template = document.querySelector('template#' + text);
    +		} catch (e) {}
    +
    +		if (template) {
    +			element = template.content;
    +		} else {
    +			if (pre.hasAttribute('data-url')) {
    +				element = document.createElement('a');
    +				element.href = pre.getAttribute('data-url');
    +			} else {
    +				element = document.createElement('span');
    +			}
    +
    +			element.textContent = text;
    +		}
    +
    +		return element;
    +	});
    +
    +	/**
    +	 * Register the toolbar with Prism.
    +	 */
    +	Prism.hooks.add('complete', hook);
    +})();
    diff --git a/docs/_style/prism-master/plugins/toolbar/prism-toolbar.min.js b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.min.js
    new file mode 100644
    index 0000000000..17cee96226
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/toolbar/prism-toolbar.min.js
    @@ -0,0 +1 @@
    +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t=[],e={},n=function(){};Prism.plugins.toolbar={};var a=Prism.plugins.toolbar.registerButton=function(n,a){var o;o="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?(e=document.createElement("button"),e.type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a"),e.href=a.url):e=document.createElement("span"),e.textContent=a.text,e},t.push(e[n]=o)},o=Prism.plugins.toolbar.hook=function(a){var o=a.element.parentNode;if(o&&/pre/i.test(o.nodeName)&&!o.parentNode.classList.contains("code-toolbar")){var r=document.createElement("div");r.classList.add("code-toolbar"),o.parentNode.insertBefore(r,o),r.appendChild(o);var i=document.createElement("div");i.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(t=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return e[t]||n})),t.forEach(function(t){var e=t(a);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),i.appendChild(n)}}),r.appendChild(i)}};a("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(r){}return a?n=a.content:(e.hasAttribute("data-url")?(n=document.createElement("a"),n.href=e.getAttribute("data-url")):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",o)}}();
    \ No newline at end of file
    diff --git a/docs/_style/prism-master/plugins/unescaped-markup/index.html b/docs/_style/prism-master/plugins/unescaped-markup/index.html
    new file mode 100644
    index 0000000000..442ef2aa9f
    --- /dev/null
    +++ b/docs/_style/prism-master/plugins/unescaped-markup/index.html
    @@ -0,0 +1,195 @@
    +
    +
    +
    +
    +	
    +	
    +	Unescaped markup ▲ Prism plugins
    +	
    +	
    +	
    +	
    +
    +	
    +
    +	
    +	
    +
    +
    +
    +
    +
    + +

    Unescaped markup

    +

    Write markup without having to escape anything.

    +
    + +
    +

    How to use

    +

    This plugin provides several methods of achieving the same thing:

    + +
      +
    • Instead of using <pre><code> elements, use <script type="text/plain"> +
      <script type="text/plain" class="language-markup">
      +<p>Example</p>
      +</script>
      +
    • +
    • Use a HTML-comment to escape your code +
      <pre class="language-markup"><code><!--
      +<p>Example</p>
      +--></code></pre>
    • +
    +
    + +
    +

    Examples

    + +

    View source to see that the following didn’t need escaping (except for </script>, that does):

    + + + +

    The next example uses the HTML-comment method:

    + +
    +
    + +
    +

    FAQ

    + +

    Why not use the HTML <template> tag?

    + +

    Because it is a PITA to get its textContent and needs to be pointlessly cloned. + Feel free to implement it yourself and send a pull request though, if you are so inclined.

    + +

    Can I use this inline?

    + +

    Not out of the box, because I figured it’s more of a hassle to type <script type="text/plain"> than escape the 1-2 < characters you need to escape in inline code. + Also inline code is not as frequently copy-pasted, which was the major source of annoyance that got me to write this plugin.

    +
    + +
    + + + + + + + + + diff --git a/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.css b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.css new file mode 100644 index 0000000000..3ba2a1e699 --- /dev/null +++ b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.css @@ -0,0 +1,10 @@ +/* Fallback, in case JS does not run, to ensure the code is at least visible */ +[class*='lang-'] script[type='text/plain'], +[class*='language-'] script[type='text/plain'], +script[type='text/plain'][class*='lang-'], +script[type='text/plain'][class*='language-'] { + display: block; + font: 100% Consolas, Monaco, monospace; + white-space: pre; + overflow: auto; +} diff --git a/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.js b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.js new file mode 100644 index 0000000000..8684ebacff --- /dev/null +++ b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.js @@ -0,0 +1,44 @@ +(function () { + + if (typeof self === 'undefined' || !self.Prism || !self.document || !Prism.languages.markup) { + return; + } + + Prism.plugins.UnescapedMarkup = true; + + Prism.hooks.add('before-highlightall', function (env) { + env.selector += ", [class*='lang-'] script[type='text/plain'], [class*='language-'] script[type='text/plain']" + + ", script[type='text/plain'][class*='lang-'], script[type='text/plain'][class*='language-']"; + }); + + Prism.hooks.add('before-sanity-check', function (env) { + if ((env.element.matches || env.element.msMatchesSelector).call(env.element, "script[type='text/plain']")) { + var code = document.createElement("code"); + var pre = document.createElement("pre"); + + pre.className = code.className = env.element.className; + + if (env.element.dataset) { + Object.keys(env.element.dataset).forEach(function (key) { + if (Object.prototype.hasOwnProperty.call(env.element.dataset, key)) { + pre.dataset[key] = env.element.dataset[key]; + } + }); + } + + env.code = env.code.replace(/<\/script(>|>)/gi, ""); + code.textContent = env.code; + + pre.appendChild(code); + env.element.parentNode.replaceChild(pre, env.element); + env.element = code; + return; + } + + var pre = env.element.parentNode; + if (!env.code && pre && pre.nodeName.toLowerCase() == 'pre' && + env.element.childNodes.length && env.element.childNodes[0].nodeName == "#comment") { + env.element.textContent = env.code = env.element.childNodes[0].textContent; + } + }); +}()); diff --git a/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.min.js b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.min.js new file mode 100644 index 0000000000..f48514a3b7 --- /dev/null +++ b/docs/_style/prism-master/plugins/unescaped-markup/prism-unescaped-markup.min.js @@ -0,0 +1 @@ +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&Prism.languages.markup&&(Prism.plugins.UnescapedMarkup=!0,Prism.hooks.add("before-highlightall",function(e){e.selector+=", [class*='lang-'] script[type='text/plain'], [class*='language-'] script[type='text/plain'], script[type='text/plain'][class*='lang-'], script[type='text/plain'][class*='language-']"}),Prism.hooks.add("before-sanity-check",function(e){if((e.element.matches||e.element.msMatchesSelector).call(e.element,"script[type='text/plain']")){var t=document.createElement("code"),n=document.createElement("pre");return n.className=t.className=e.element.className,e.element.dataset&&Object.keys(e.element.dataset).forEach(function(t){Object.prototype.hasOwnProperty.call(e.element.dataset,t)&&(n.dataset[t]=e.element.dataset[t])}),e.code=e.code.replace(/<\/script(>|>)/gi,""),t.textContent=e.code,n.appendChild(t),e.element.parentNode.replaceChild(n,e.element),e.element=t,void 0}var n=e.element.parentNode;!e.code&&n&&"pre"==n.nodeName.toLowerCase()&&e.element.childNodes.length&&"#comment"==e.element.childNodes[0].nodeName&&(e.element.textContent=e.code=e.element.childNodes[0].textContent)}))}(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/wpd/index.html b/docs/_style/prism-master/plugins/wpd/index.html new file mode 100644 index 0000000000..9157a483f0 --- /dev/null +++ b/docs/_style/prism-master/plugins/wpd/index.html @@ -0,0 +1,68 @@ + + + + + + +WebPlatform Docs ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    WebPlatform Docs

    +

    Makes tokens link to WebPlatform.org documentation. The links open in a new tab.

    +
    + +
    +

    How to use

    + +

    No setup required, just include the plugin in your download and you’re good to go!

    + +

    Tokens that currently link to documentation:

    + +
      +
    • HTML, MathML and SVG tags
    • +
    • HTML, MathML and SVG non-namespaced attributes
    • +
    • (Non-prefixed) CSS properties
    • +
    • (Non-prefixed) CSS @rules
    • +
    • (Non-prefixed) CSS pseudo-classes
    • +
    • (Non-prefixed) CSS pseudo-elements (starting with ::)
    • +
    + +

    Beta: This plugin is still in beta. Please help make it better: Test it and report any false positives etc!

    +
    + +
    +

    Examples

    + +

    CSS

    +
    
    +	
    
    +
    +	

    HTML

    +
    
    +
    +	

    SVG

    +
    
    +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/wpd/prism-wpd.css b/docs/_style/prism-master/plugins/wpd/prism-wpd.css new file mode 100644 index 0000000000..43b7165a86 --- /dev/null +++ b/docs/_style/prism-master/plugins/wpd/prism-wpd.css @@ -0,0 +1,11 @@ +code[class*="language-"] a[href], +pre[class*="language-"] a[href] { + cursor: help; + text-decoration: none; +} + +code[class*="language-"] a[href]:hover, +pre[class*="language-"] a[href]:hover { + cursor: help; + text-decoration: underline; +} \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/wpd/prism-wpd.js b/docs/_style/prism-master/plugins/wpd/prism-wpd.js new file mode 100644 index 0000000000..dc147d4f65 --- /dev/null +++ b/docs/_style/prism-master/plugins/wpd/prism-wpd.js @@ -0,0 +1,169 @@ +(function(){ + +if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism +) { + return; +} + +if (Prism.languages.css) { + // check whether the selector is an advanced pattern before extending it + if (Prism.languages.css.selector.pattern) + { + Prism.languages.css.selector.inside['pseudo-class'] = /:[\w-]+/; + Prism.languages.css.selector.inside['pseudo-element'] = /::[\w-]+/; + } + else + { + Prism.languages.css.selector = { + pattern: Prism.languages.css.selector, + inside: { + 'pseudo-class': /:[\w-]+/, + 'pseudo-element': /::[\w-]+/ + } + }; + } +} + +if (Prism.languages.markup) { + Prism.languages.markup.tag.inside.tag.inside['tag-id'] = /[\w-]+/; + + var Tags = { + HTML: { + 'a': 1, 'abbr': 1, 'acronym': 1, 'b': 1, 'basefont': 1, 'bdo': 1, 'big': 1, 'blink': 1, 'cite': 1, 'code': 1, 'dfn': 1, 'em': 1, 'kbd': 1, 'i': 1, + 'rp': 1, 'rt': 1, 'ruby': 1, 's': 1, 'samp': 1, 'small': 1, 'spacer': 1, 'strike': 1, 'strong': 1, 'sub': 1, 'sup': 1, 'time': 1, 'tt': 1, 'u': 1, + 'var': 1, 'wbr': 1, 'noframes': 1, 'summary': 1, 'command': 1, 'dt': 1, 'dd': 1, 'figure': 1, 'figcaption': 1, 'center': 1, 'section': 1, 'nav': 1, + 'article': 1, 'aside': 1, 'hgroup': 1, 'header': 1, 'footer': 1, 'address': 1, 'noscript': 1, 'isIndex': 1, 'main': 1, 'mark': 1, 'marquee': 1, + 'meter': 1, 'menu': 1 + }, + SVG: { + 'animateColor': 1, 'animateMotion': 1, 'animateTransform': 1, 'glyph': 1, 'feBlend': 1, 'feColorMatrix': 1, 'feComponentTransfer': 1, + 'feFuncR': 1, 'feFuncG': 1, 'feFuncB': 1, 'feFuncA': 1, 'feComposite': 1, 'feConvolveMatrix': 1, 'feDiffuseLighting': 1, 'feDisplacementMap': 1, + 'feFlood': 1, 'feGaussianBlur': 1, 'feImage': 1, 'feMerge': 1, 'feMergeNode': 1, 'feMorphology': 1, 'feOffset': 1, 'feSpecularLighting': 1, + 'feTile': 1, 'feTurbulence': 1, 'feDistantLight': 1, 'fePointLight': 1, 'feSpotLight': 1, 'linearGradient': 1, 'radialGradient': 1, 'altGlyph': 1, + 'textPath': 1, 'tref': 1, 'altglyph': 1, 'textpath': 1, 'altglyphdef': 1, 'altglyphitem': 1, 'clipPath': 1, 'color-profile': 1, 'cursor': 1, + 'font-face': 1, 'font-face-format': 1, 'font-face-name': 1, 'font-face-src': 1, 'font-face-uri': 1, 'foreignObject': 1, 'glyphRef': 1, + 'hkern': 1, 'vkern': 1 + }, + MathML: {} + } +} + +var language; + +Prism.hooks.add('wrap', function(env) { + if ((env.type == 'tag-id' + || (env.type == 'property' && env.content.indexOf('-') != 0) + || (env.type == 'rule'&& env.content.indexOf('@-') != 0) + || (env.type == 'pseudo-class'&& env.content.indexOf(':-') != 0) + || (env.type == 'pseudo-element'&& env.content.indexOf('::-') != 0) + || (env.type == 'attr-name' && env.content.indexOf('data-') != 0) + ) && env.content.indexOf('<') === -1 + ) { + if (env.language == 'css' + || env.language == 'scss' + || env.language == 'markup' + ) { + var href = 'https://webplatform.github.io/docs/'; + var content = env.content; + + if (env.language == 'css' || env.language == 'scss') { + href += 'css/'; + + if (env.type == 'property') { + href += 'properties/'; + } + else if (env.type == 'rule') { + href += 'atrules/'; + content = content.substring(1); + } + else if (env.type == 'pseudo-class') { + href += 'selectors/pseudo-classes/'; + content = content.substring(1); + } + else if (env.type == 'pseudo-element') { + href += 'selectors/pseudo-elements/'; + content = content.substring(2); + } + } + else if (env.language == 'markup') { + if (env.type == 'tag-id') { + // Check language + language = getLanguage(env.content) || language; + + if (language) { + href += language + '/elements/'; + } + else { + return; // Abort + } + } + else if (env.type == 'attr-name') { + if (language) { + href += language + '/attributes/'; + } + else { + return; // Abort + } + } + } + + href += content; + env.tag = 'a'; + env.attributes.href = href; + env.attributes.target = '_blank'; + } + } +}); + +function getLanguage(tag) { + var tagL = tag.toLowerCase(); + + if (Tags.HTML[tagL]) { + return 'html'; + } + else if (Tags.SVG[tag]) { + return 'svg'; + } + else if (Tags.MathML[tag]) { + return 'mathml'; + } + + // Not in dictionary, perform check + if (Tags.HTML[tagL] !== 0 && typeof document !== 'undefined') { + var htmlInterface = (document.createElement(tag).toString().match(/\[object HTML(.+)Element\]/) || [])[1]; + + if (htmlInterface && htmlInterface != 'Unknown') { + Tags.HTML[tagL] = 1; + return 'html'; + } + } + + Tags.HTML[tagL] = 0; + + if (Tags.SVG[tag] !== 0 && typeof document !== 'undefined') { + var svgInterface = (document.createElementNS('http://www.w3.org/2000/svg', tag).toString().match(/\[object SVG(.+)Element\]/) || [])[1]; + + if (svgInterface && svgInterface != 'Unknown') { + Tags.SVG[tag] = 1; + return 'svg'; + } + } + + Tags.SVG[tag] = 0; + + // Lame way to detect MathML, but browsers don’t expose interface names there :( + if (Tags.MathML[tag] !== 0) { + if (tag.indexOf('m') === 0) { + Tags.MathML[tag] = 1; + return 'mathml'; + } + } + + Tags.MathML[tag] = 0; + + return null; +} + +})(); \ No newline at end of file diff --git a/docs/_style/prism-master/plugins/wpd/prism-wpd.min.js b/docs/_style/prism-master/plugins/wpd/prism-wpd.min.js new file mode 100644 index 0000000000..86bad36272 --- /dev/null +++ b/docs/_style/prism-master/plugins/wpd/prism-wpd.min.js @@ -0,0 +1 @@ +!function(){function e(e){var n=e.toLowerCase();if(t.HTML[n])return"html";if(t.SVG[e])return"svg";if(t.MathML[e])return"mathml";if(0!==t.HTML[n]&&"undefined"!=typeof document){var a=(document.createElement(e).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(a&&"Unknown"!=a)return t.HTML[n]=1,"html"}if(t.HTML[n]=0,0!==t.SVG[e]&&"undefined"!=typeof document){var s=(document.createElementNS("http://www.w3.org/2000/svg",e).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(s&&"Unknown"!=s)return t.SVG[e]=1,"svg"}return t.SVG[e]=0,0!==t.MathML[e]&&0===e.indexOf("m")?(t.MathML[e]=1,"mathml"):(t.MathML[e]=0,null)}if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){if(Prism.languages.css&&(Prism.languages.css.selector.pattern?(Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/,Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/):Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}),Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var t={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var n;Prism.hooks.add("wrap",function(t){if(("tag-id"==t.type||"property"==t.type&&0!=t.content.indexOf("-")||"rule"==t.type&&0!=t.content.indexOf("@-")||"pseudo-class"==t.type&&0!=t.content.indexOf(":-")||"pseudo-element"==t.type&&0!=t.content.indexOf("::-")||"attr-name"==t.type&&0!=t.content.indexOf("data-"))&&-1===t.content.indexOf("<")&&("css"==t.language||"scss"==t.language||"markup"==t.language)){var a="https://webplatform.github.io/docs/",s=t.content;if("css"==t.language||"scss"==t.language)a+="css/","property"==t.type?a+="properties/":"rule"==t.type?(a+="atrules/",s=s.substring(1)):"pseudo-class"==t.type?(a+="selectors/pseudo-classes/",s=s.substring(1)):"pseudo-element"==t.type&&(a+="selectors/pseudo-elements/",s=s.substring(2));else if("markup"==t.language)if("tag-id"==t.type){if(n=e(t.content)||n,!n)return;a+=n+"/elements/"}else if("attr-name"==t.type){if(!n)return;a+=n+"/attributes/"}a+=s,t.tag="a",t.attributes.href=a,t.attributes.target="_blank"}})}}(); \ No newline at end of file diff --git a/docs/_style/prism-master/prefixfree.min.js b/docs/_style/prism-master/prefixfree.min.js new file mode 100644 index 0000000000..94fc408721 --- /dev/null +++ b/docs/_style/prism-master/prefixfree.min.js @@ -0,0 +1,5 @@ +/** + * StyleFix 1.0.3 & PrefixFree 1.0.7 + * @author Lea Verou + * MIT license + */(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=t.parentNode,o=new XMLHttpRequest,u;o.onreadystatechange=function(){o.readyState===4&&u()};u=function(){var n=o.responseText;if(n&&t.parentNode&&(!o.status||o.status<400||o.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|\/|#)/i.test(n)?e:'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+r,"gi"),"$1")}var u=document.createElement("style");u.textContent=n;u.media=t.media;u.disabled=t.disabled;u.setAttribute("data-href",t.getAttribute("href"));s.insertBefore(u,t);s.removeChild(t);u.media=t.media}};try{o.open("GET",r);o.send(null)}catch(n){if(typeof XDomainRequest!="undefined"){o=new XDomainRequest;o.onerror=o.onprogress=function(){};o.onload=u;o.open("GET",r);o.send(null)}}t.setAttribute("data-inprogress","")},styleElement:function(t){if(t.hasAttribute("data-noprefix"))return;var n=t.disabled;t.textContent=e.fix(t.textContent,!0,t);t.disabled=n},styleAttribute:function(t){var n=t.getAttribute("style");n=e.fix(n,!1,t);t.setAttribute("style",n)},process:function(){t('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);t("style").forEach(StyleFix.styleElement);t("[style]").forEach(StyleFix.styleAttribute)},register:function(t,n){(e.fixers=e.fixers||[]).splice(n===undefined?e.fixers.length:n,0,t)},fix:function(t,n,r){for(var i=0;i-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(e,t,n,r){r=Math.abs(r-450)%360;return t+(n||"")+"linear-gradient("+r+"deg"}));e=t("functions","(\\s|:|,)","\\s*\\(","$1"+s+"$2(",e);e=t("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+s+"$2$3",e);e=t("properties","(^|\\{|\\s|;)","\\s*:","$1"+s+"$2:",e);if(n.properties.length){var o=RegExp("\\b("+n.properties.join("|")+")(?!:)","gi");e=t("valueProperties","\\b",":(.+?);",function(e){return e.replace(o,s+"$1")},e)}if(r){e=t("selectors","","\\b",n.prefixSelector,e);e=t("atrules","@","\\b","@"+s+"$1",e)}e=e.replace(RegExp("-"+s,"g"),"-");e=e.replace(/-\*-(?=[a-z]+)/gi,n.prefix);return e},property:function(e){return(n.properties.indexOf(e)?n.prefix:"")+e},value:function(e,r){e=t("functions","(^|\\s|,)","\\s*\\(","$1"+n.prefix+"$2(",e);e=t("keywords","(^|\\s)","(\\s|$)","$1"+n.prefix+"$2$3",e);return e},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+n.prefix})},prefixProperty:function(e,t){var r=n.prefix+e;return t?StyleFix.camelCase(r):r}};(function(){var e={},t=[],r={},i=getComputedStyle(document.documentElement,null),s=document.createElement("div").style,o=function(n){if(n.charAt(0)==="-"){t.push(n);var r=n.split("-"),i=r[1];e[i]=++e[i]||1;while(r.length>3){r.pop();var s=r.join("-");u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e)in s};if(i.length>0)for(var a=0;a text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + + if (str instanceof Token) { + continue; + } + + if (greedy && i != strarr.length - 1) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + + var from = match.index + (lookbehind ? match[1].length : 0), + to = match.index + match[0].length, + k = i, + p = pos; + + for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { + p += strarr[k].length; + // Move the index i to the element in strarr that is closest to from + if (from >= p) { + ++i; + pos = p; + } + } + + // If strarr[i] is a Token, then the match starts inside another Token, which is invalid + if (strarr[i] instanceof Token) { + continue; + } + + // Number of tokens to delete and replace with the new match + delNum = k - i; + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str), + delNum = 1; + } + + if (!match) { + if (oneshot) { + break; + } + + continue; + } + + if(lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + + var args = [i, delNum]; + + if (before) { + ++i; + pos += before.length; + args.push(before); + } + + var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias, match, greedy); + + args.push(wrapped); + + if (after) { + args.push(after); + } + + Array.prototype.splice.apply(strarr, args); + + if (delNum != 1) + _.matchGrammar(text, strarr, grammar, i, pos, true, token); + + if (oneshot) + break; + } + } + } + }, + + tokenize: function(text, grammar, language) { + var strarr = [text]; + + var rest = grammar.rest; + + if (rest) { + for (var token in rest) { + grammar[token] = rest[token]; + } + + delete grammar.rest; + } + + _.matchGrammar(text, strarr, grammar, 0, 0, false); + + return strarr; + }, + + hooks: { + all: {}, + + add: function (name, callback) { + var hooks = _.hooks.all; + + hooks[name] = hooks[name] || []; + + hooks[name].push(callback); + }, + + run: function (name, env) { + var callbacks = _.hooks.all[name]; + + if (!callbacks || !callbacks.length) { + return; + } + + for (var i=0, callback; callback = callbacks[i++];) { + callback(env); + } + } + } +}; + +var Token = _.Token = function(type, content, alias, matchedStr, greedy) { + this.type = type; + this.content = content; + this.alias = alias; + // Copy of the full string this token was created from + this.length = (matchedStr || "").length|0; + this.greedy = !!greedy; +}; + +Token.stringify = function(o, language, parent) { + if (typeof o == 'string') { + return o; + } + + if (_.util.type(o) === 'Array') { + return o.map(function(element) { + return Token.stringify(element, language, o); + }).join(''); + } + + var env = { + type: o.type, + content: Token.stringify(o.content, language, parent), + tag: 'span', + classes: ['token', o.type], + attributes: {}, + language: language, + parent: parent + }; + + if (o.alias) { + var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias]; + Array.prototype.push.apply(env.classes, aliases); + } + + _.hooks.run('wrap', env); + + var attributes = Object.keys(env.attributes).map(function(name) { + return name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"'; + }).join(' '); + + return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + (attributes ? ' ' + attributes : '') + '>' + env.content + ''; + +}; + +if (!_self.document) { + if (!_self.addEventListener) { + // in Node.js + return _self.Prism; + } + + if (!_.disableWorkerMessageHandler) { + // In worker + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), + lang = message.language, + code = message.code, + immediateClose = message.immediateClose; + + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + + return _self.Prism; +} + +//Get current script and highlight +var script = document.currentScript || [].slice.call(document.getElementsByTagName("script")).pop(); + +if (script) { + _.filename = script.src; + + if (!_.manual && !script.hasAttribute('data-manual')) { + if(document.readyState !== "loading") { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(_.highlightAll); + } else { + window.setTimeout(_.highlightAll, 16); + } + } + else { + document.addEventListener('DOMContentLoaded', _.highlightAll); + } + } +} + +return _self.Prism; + +})(); + +if (typeof module !== 'undefined' && module.exports) { + module.exports = Prism; +} + +// hack for components to work correctly in node.js +if (typeof global !== 'undefined') { + global.Prism = Prism; +} + + +/* ********************************************** + Begin prism-markup.js +********************************************** */ + +Prism.languages.markup = { + 'comment': //, + 'prolog': /<\?[\s\S]+?\?>/, + 'doctype': //i, + 'cdata': //i, + 'tag': { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i, + greedy: true, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/i, + inside: { + 'punctuation': /^<\/?/, + 'namespace': /^[^\s>\/:]+:/ + } + }, + 'attr-value': { + pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i, + inside: { + 'punctuation': [ + /^=/, + { + pattern: /(^|[^\\])["']/, + lookbehind: true + } + ] + } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { + 'namespace': /^[^\s>\/:]+:/ + } + } + + } + }, + 'entity': /&#?[\da-z]{1,8};/i +}; + +Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = + Prism.languages.markup['entity']; + +// Plugin to make entity title show the real entity, idea by Roman Komarov +Prism.hooks.add('wrap', function(env) { + + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&'); + } +}); + +Prism.languages.xml = Prism.languages.markup; +Prism.languages.html = Prism.languages.markup; +Prism.languages.mathml = Prism.languages.markup; +Prism.languages.svg = Prism.languages.markup; + + +/* ********************************************** + Begin prism-css.js +********************************************** */ + +Prism.languages.css = { + 'comment': /\/\*[\s\S]*?\*\//, + 'atrule': { + pattern: /@[\w-]+?.*?(?:;|(?=\s*\{))/i, + inside: { + 'rule': /@[\w-]+/ + // See rest below + } + }, + 'url': /url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i, + 'selector': /[^{}\s][^{};]*?(?=\s*\{)/, + 'string': { + pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, + 'important': /!important\b/i, + 'function': /[-a-z0-9]+(?=\()/i, + 'punctuation': /[(){};:,]/ +}; + +Prism.languages.css['atrule'].inside.rest = Prism.languages.css; + +if (Prism.languages.markup) { + Prism.languages.insertBefore('markup', 'tag', { + 'style': { + pattern: /()[\s\S]*?(?=<\/style>)/i, + lookbehind: true, + inside: Prism.languages.css, + alias: 'language-css', + greedy: true + } + }); + + Prism.languages.insertBefore('inside', 'attr-value', { + 'style-attr': { + pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i, + inside: { + 'attr-name': { + pattern: /^\s*style/i, + inside: Prism.languages.markup.tag.inside + }, + 'punctuation': /^\s*=\s*['"]|['"]\s*$/, + 'attr-value': { + pattern: /.+/i, + inside: Prism.languages.css + } + }, + alias: 'language-css' + } + }, Prism.languages.markup.tag); +} + + +/* ********************************************** + Begin prism-clike.js +********************************************** */ + +Prism.languages.clike = { + 'comment': [ + { + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + 'string': { + pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'class-name': { + pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, + lookbehind: true, + inside: { + punctuation: /[.\\]/ + } + }, + 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, + 'boolean': /\b(?:true|false)\b/, + 'function': /\w+(?=\()/, + 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, + 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, + 'punctuation': /[{}[\];(),.:]/ +}; + + +/* ********************************************** + Begin prism-javascript.js +********************************************** */ + +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: true + } + ], + 'keyword': [ + { + pattern: /((?:^|})\s*)(?:catch|finally)\b/, + lookbehind: true + }, + /\b(?:as|async|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|var|void|while|with|yield)\b/ + ], + 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, + // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, + '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])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, + lookbehind: true, + greedy: true + }, + // This must be declared before keyword because we use "function" inside the look-forward + 'function-variable': { + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + alias: 'function' + }, + 'parameter': [ + { + pattern: /(function(?:\s+[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)[^\s()][^()]*?(?=\s*\))/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/, + inside: Prism.languages.javascript + }, + { + pattern: /(\(\s*)[^\s()][^()]*?(?=\s*\)\s*=>)/, + lookbehind: true, + 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|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)[^\s()][^()]*?(?=\s*\)\s*\{)/, + lookbehind: true, + inside: Prism.languages.javascript + } + ], + 'constant': /\b[A-Z][A-Z\d_]*\b/ +}); + +Prism.languages.insertBefore('javascript', 'string', { + 'template-string': { + pattern: /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/, + greedy: true, + inside: { + 'interpolation': { + pattern: /\${[^}]+}/, + inside: { + 'interpolation-punctuation': { + pattern: /^\${|}$/, + alias: 'punctuation' + }, + rest: Prism.languages.javascript + } + }, + 'string': /[\s\S]+/ + } + } +}); + +if (Prism.languages.markup) { + Prism.languages.insertBefore('markup', 'tag', { + 'script': { + pattern: /()[\s\S]*?(?=<\/script>)/i, + lookbehind: true, + inside: Prism.languages.javascript, + alias: 'language-javascript', + greedy: true + } + }); +} + +Prism.languages.js = Prism.languages.javascript; + + +/* ********************************************** + Begin prism-file-highlight.js +********************************************** */ + +(function () { + if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { + return; + } + + /** + * @param {Element} [container=document] + */ + self.Prism.fileHighlight = function(container) { + container = container || document; + + var Extensions = { + 'js': 'javascript', + 'py': 'python', + 'rb': 'ruby', + 'ps1': 'powershell', + 'psm1': 'powershell', + 'sh': 'bash', + 'bat': 'batch', + 'h': 'c', + 'tex': 'latex' + }; + + Array.prototype.slice.call(container.querySelectorAll('pre[data-src]')).forEach(function (pre) { + // ignore if already loaded + if (pre.hasAttribute('data-src-loaded')) { + return; + } + + // load current + var src = pre.getAttribute('data-src'); + + var language, parent = pre; + var lang = /\blang(?:uage)?-([\w-]+)\b/i; + while (parent && !lang.test(parent.className)) { + parent = parent.parentNode; + } + + if (parent) { + language = (pre.className.match(lang) || [, ''])[1]; + } + + if (!language) { + var extension = (src.match(/\.(\w+)$/) || [, ''])[1]; + language = Extensions[extension] || extension; + } + + var code = document.createElement('code'); + code.className = 'language-' + language; + + pre.textContent = ''; + + code.textContent = 'Loading…'; + + pre.appendChild(code); + + var xhr = new XMLHttpRequest(); + + xhr.open('GET', src, true); + + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + + if (xhr.status < 400 && xhr.responseText) { + code.textContent = xhr.responseText; + + Prism.highlightElement(code); + // mark as loaded + pre.setAttribute('data-src-loaded', ''); + } + else if (xhr.status >= 400) { + code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText; + } + else { + code.textContent = '✖ Error: File does not exist or is empty'; + } + } + }; + + xhr.send(null); + }); + + if (Prism.plugins.toolbar) { + Prism.plugins.toolbar.registerButton('download-file', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { + return; + } + var src = pre.getAttribute('data-src'); + var a = document.createElement('a'); + a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; + a.setAttribute('download', ''); + a.href = src; + return a; + }); + } + + }; + + document.addEventListener('DOMContentLoaded', function () { + // execute inside handler, for dropping Event as argumnet + self.Prism.fileHighlight(); + }); + +})(); diff --git a/docs/_style/prism-master/style.css b/docs/_style/prism-master/style.css new file mode 100644 index 0000000000..80a674edb9 --- /dev/null +++ b/docs/_style/prism-master/style.css @@ -0,0 +1,407 @@ +@import url(https://fonts.googleapis.com/css?family=Questrial); +@import url(https://fonts.googleapis.com/css?family=Arvo); + +@font-face { + src: url(https://lea.verou.me/logo.otf); + font-family: 'LeaVerou'; +} + +/* + Shared styles + */ + +section h1, +#features li strong, +header h2, +footer p { + font: 100% Rockwell, Arvo, serif; +} + +/* + Styles + */ + +* { + margin: 0; + padding: 0; + font-weight: normal; +} + +body { + font: 100%/1.5 Questrial, sans-serif; + tab-size: 4; + hyphens: auto; +} + +a { + color: inherit; +} + +section h1 { + font-size: 250%; +} + + section section h1 { + font-size: 150%; + } + + section h1 code { + font-style: normal; + } + + section h1 > a { + text-decoration: none; + } + + section h1 > a:before { + content: '§'; + position: absolute; + padding: 0 .2em; + margin-left: -1em; + border-radius: .2em; + color: silver; + text-shadow: 0 1px white; + } + + section h1 > a:hover:before { + color: black; + background: #f1ad26; + } + +p { + margin: 1em 0; +} + +section h1, +h2 { + margin: 1em 0 .3em; +} + +dt { + margin: 1em 0 0 0; + font-size: 130%; +} + + dt:after { + content: ':'; + } + +dd { + margin-left: 2em; +} + +strong { + font-weight: bold; +} + +code, pre { + font-family: Consolas, Monaco, 'Andale Mono', 'Lucida Console', monospace; + hyphens: none; +} + +pre { + max-height: 30em; + overflow: auto; +} + +pre > code.highlight { + outline: .4em solid red; + outline-offset: .4em; +} + +header, +body > section { + display: block; + max-width: 900px; + margin: auto; +} + +header, footer { + position: relative; + padding: 30px -webkit-calc(50% - 450px); /* Workaround for bug */ + padding: 30px calc(50% - 450px); + color: white; + text-shadow: 0 -1px 2px black; + background: url(img/spectrum.png) fixed; +} + +header:before, +footer:before { + content: ''; + position: absolute; + bottom: 0; left: 0; right: 0; + height: 20px; + background-size: 20px 40px; + background-repeat: repeat-x; + background-image: linear-gradient(45deg, transparent 34%, white 34%, white 66%, transparent 66%), + linear-gradient(135deg, transparent 34%, white 34%, white 66%, transparent 66%); +} + +header { + +} + + header .intro, + html.simple header { + overflow: hidden; + } + + header h1 { + float: left; + margin-right: 30px; + color: #7fab14; + text-align: center; + font-size: 140%; + text-transform: uppercase; + letter-spacing: .25em; + } + + header h2 { + margin-top: .5em; + color: #f1ad26; + } + + header h1 a { + text-decoration: none; + } + + header img { + display: block; + width: 150px; + height: 128px; + margin-bottom: .3em; + border: 0; + } + + header h2 { + font-size: 300%; + } + + header .intro p { + margin: 0; + font: 150%/1.4 Questrial, sans-serif; + font-size: 150%; + } + + #features { + width: 66em; + margin-top: 2em; + font-size: 80%; + } + + #features li { + margin: 0 0 2em 0; + list-style: none; + display: inline-block; + width: 27em; + vertical-align: top; + } + + #features li:nth-child(odd) { + margin-right: 5em; + } + + #features li:before { + content: '✓'; + float: left; + margin-left: -.8em; + color: #7fab14; + font-size: 400%; + line-height: 1; + } + + #features li strong { + display: block; + margin-bottom: .1em; + font-size: 200%; + } + + header .download-button { + float: right; + margin: 0 0 .5em .5em; + } + + #theme { + position: relative; + z-index: 1; + float: right; + margin-right: -1em; + text-align: center; + text-transform: uppercase; + letter-spacing: .2em; + } + + #theme > p { + position: absolute; + left: 100%; + transform: translateX(50%) rotate(90deg) ; + transform-origin: top left; + font-size: 130%; + } + + #theme > label { + position: relative; + display: flex; + justify-content: center; + align-items: center; + width: 8.5em; + height: 8.5em; + line-height: 1em; + border-radius: 50%; + background: hsla(0,0%,100%,.5); + cursor: pointer; + font-size: 90%; + padding: 0; + } + + #theme > label:before { + content: ''; + position: absolute; + top: 0; right: 0; bottom: 0; left: 0; + z-index: -1; + border-radius: inherit; + background: url(img/spectrum.png) fixed; + } + + #theme > label:nth-of-type(n+2) { + margin-top: -2.5em; + } + + #theme > input:not(:checked) + label:hover { + background: hsla(77, 80%, 60%, .5); + } + + #theme > input { + position: absolute; + clip: rect(0,0,0,0); + } + + #theme > input:checked + label { + background: #7fab14; + } + +footer { + margin-top: 2em; + background-position: bottom; + color: white; + text-shadow: 0 -1px 2px black; +} + + footer:before { + bottom: auto; + top: 0; + background-position: bottom; + } + + footer p { + font-size: 150%; + } + + footer ul { + column-count: 3; + } + +.download-button { + display: block; + padding: .2em .8em .1em; + border: 1px solid rgba(0,0,0,0.5); + border-radius: 10px; + background: #39a1cf; + box-shadow: 0 2px 10px black, + inset 0 1px hsla(0,0%,100%,.3), + inset 0 .4em hsla(0,0%,100%,.2), + inset 0 10px 20px hsla(0,0%,100%,.25), + inset 0 -15px 30px rgba(0,0,0,0.3); + color: white; + text-shadow: 0 -1px 2px black; + text-align: center; + font-size: 250%; + line-height: 1.5; + text-transform: uppercase; + text-decoration: none; + hyphens: manual; +} + +.download-button:hover { + background-color: #7fab14; +} + +.download-button:active { + box-shadow: inset 0 2px 8px rgba(0,0,0,.8); +} + +#toc { + position: fixed; + left: 1%; + max-width: calc(48% - 450px); + font-size: 80%; + opacity: .3; +} + +@media (max-width: 1200px) { + #toc { + display: none; + } +} + +#toc:hover { + opacity: 1; +} + + #toc h1 { + font-size: 180%; + } + + #toc li { + list-style: none; + } + +#logo:before { + content: '☠'; + float: right; + font: 100px/1.6 LeaVerou; +} + +.used-by-logos { + overflow: hidden; +} + .used-by-logos > a { + float: left; + width: 33.33%; + height: 100px; + text-align: center; + background: #F5F2F0; + box-sizing: border-box; + border: 5px solid white; + position: relative; + } + .used-by-logos > a > img { + max-height: 100%; + max-width: 100%; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + +label a.owner { + margin: 0 .5em; +} + +label a.owner:not(:hover) { + text-decoration: none; + color: #aaa; +} + +#languages-list ul { + column-count: 3; +} + #languages-list li { + padding: .2em; + } + #languages-list li[data-id="javascript"] { + border-bottom: 1px solid #aaa; + padding-bottom: 1em; + margin-bottom: 1em; + margin-right: 1em; + } diff --git a/docs/_style/prism-master/templates/footer.html b/docs/_style/prism-master/templates/footer.html new file mode 100644 index 0000000000..b0e306a505 --- /dev/null +++ b/docs/_style/prism-master/templates/footer.html @@ -0,0 +1,15 @@ + +

    Handcrafted with ♥, by Lea Verou, Golmote +& all these awesome people

    + + diff --git a/docs/_style/prism-master/templates/header-download.html b/docs/_style/prism-master/templates/header-download.html new file mode 100644 index 0000000000..4e3df4e23b --- /dev/null +++ b/docs/_style/prism-master/templates/header-download.html @@ -0,0 +1,2 @@ +Download Prism +Customize your download to include only the languages and plugins you need and the compression level you prefer. \ No newline at end of file diff --git a/docs/_style/prism-master/templates/header-main.html b/docs/_style/prism-master/templates/header-main.html new file mode 100644 index 0000000000..01fe940603 --- /dev/null +++ b/docs/_style/prism-master/templates/header-main.html @@ -0,0 +1,12 @@ +

    Prism

    + +Download + +

    + Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. + It’s used in thousands of websites, including some of those you visit daily. +

    + + diff --git a/docs/_style/prism-master/templates/header-plugins.html b/docs/_style/prism-master/templates/header-plugins.html new file mode 100644 index 0000000000..45e2aac856 --- /dev/null +++ b/docs/_style/prism-master/templates/header-plugins.html @@ -0,0 +1,8 @@ +

    Prism plugins

    + +Download + +

    + Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. + It’s used in thousands of websites, including some of those you visit daily. +

    diff --git a/docs/_style/prism-master/test-suite.html b/docs/_style/prism-master/test-suite.html new file mode 100644 index 0000000000..5aeebf2aee --- /dev/null +++ b/docs/_style/prism-master/test-suite.html @@ -0,0 +1,167 @@ + + + + + + +Running the test suite ▲ Prism + + + + + + + + + +
    +
    + +

    Running the test suite

    +

    Prism has a test suite, that ensures that the correct tokens are matched.

    +
    + +
    +

    Running the test suite

    + +

    Running the test suite is simple: just call npm test.

    +

    All test files are run in isolation. A new prism instance is created for each test case. This will slow the test runner a bit down, but we can be sure that nothing leaks into the next test case.

    + +
    +

    Running tests for specific languages

    + +

    To run the tests only for one language, you can use the language parameter: npm test -- --language=markup.

    +

    You can even specify multiple languages: npm test -- --language=markup --language=css.

    +
    +
    + +
    +

    Writing tests

    + +

    Thank you for writing tests! Tests are awesome! They ensure, that we can improve the codebase without breaking anything. Also, this way, we can ensure that upgrading Prism is as painless as possible for you.

    +

    You can add new tests by creating a new test case file (with the .test file extension) in the tests directory which is located at /tests/languages/${language}.

    + +
    +

    Language directories

    +

    All tests are sorted into directories in the tests/languages directory. Each directory name encodes, which language you are currently testing.

    +

    All language names must match the names from the definition in components.js.

    + +

    Example 1: testing a language in isolation (default use case)

    +

    Just put your test file into the directory of the language you want to test.

    +

    So, if you want to test CSS, put your test file in /tests/languages/css to test CSS only. If you create a test case in this directory, the test runner will ensure that the css language definition including all required language definitions are correctly loaded.

    + +

    Example 2: testing language injection

    +

    If you want to test language injection, you typically need to load two or more languages where one language is the “main” language that is being tested, with all other languages being injected into it.

    +

    You need to define multiple languages by separating them using a + sign: markup+php.

    +

    The languages are loaded in order, so first markup (+ dependencies) is loaded, then php (+ dependencies). The test loader ensures that no language is loaded more than once (for example if two languages have the same dependencies).

    +

    By default the last language is the main language: php+markup will have markup as main language. This is equal to putting your code in the following code block:

    +
    ...
    +<pre><code class="language-markup">
    +	<!-- your code here -->
    +</code><pre>
    +...
    + +

    If you need to load the languages in a given order, but you don't want to use the last language as main language, you can mark the main language with an exclamation mark: php!+markup. This will use php as main language. (You can only define one main language. The test runner will fail all tests in directories with more than one main language.)

    + +

    Note: by loading multiple languages you can do integration tests (ensure that loading two or more languages together won't break anything).

    +
    + +
    +

    Creating your test case file

    +

    At first you need to create a new file in the language directory, you want to test.

    +

    Use a proper name for your test case. Please use one case of the following conventions:

    +
      +
    • issue{issueid}: reference a github issue id (example: issue588.test).
    • +
    • {featurename}_feature: group all tests to one feature in one file (example: string_interpolation_feature.test).
    • +
    • {language}_inclusion: test inclusion of one language into the other (example: markup!+css/css_inclusion.test will test CSS inclusion into markup).
    • +
    +

    You can use all conventions as a prefix, so string_interpolation_feature_inline.test is possible. But please take a minute or two to think of a proper name of your test case file. You are writing code not only for the computers, but also for your fellow developers.

    +
    + +
    +

    Writing your test

    +

    The structure of a test case file is as follows:

    +
    
    +... language snippet...
    +----
    +... the simplified token stream you expect ...
    + +

    Your file is built up of two or three sections, separated by ten or more dashes -, starting at the begin of the line:

    +
      +
    1. Your language snippet. The code you want to compile using Prism. (required)
    2. +
    3. The simplified token stream you expect. Needs to be valid JSON. (required)
    4. +
    5. A comment explaining the test case. (optional)
    6. +
    +

    The easiest way would be to look at an existing test file:

    +
    var a = 5;
    +
    +----------------------------------------------------
    +
    +[
    +	["keyword", "var"],
    +	" a ",
    +	["operator", "="],
    +	["number", "5"],
    +	["punctuation", ";"]
    +]
    +
    +----------------------------------------------------
    +
    +This is a comment explaining this test case.
    +
    + +
    +

    Explaining the simplified token stream

    +

    While compiling, Prism transforms your source code into a token stream. This is basically a tree of nested tokens (or arrays, or strings).

    +

    As these trees are hard to write by hand, the test runner uses a simplified version of it.

    +

    It uses the following rules:

    +
      +
    • Token objects are transformed into an array: [token.type, token.content] (whereas token.content can be a nested structure).
    • +
    • All strings that are either empty or only contain whitespace, are removed from the token stream.
    • +
    • All empty structures are removed.
    • +
    +

    For further information: reading the tests of the test runner (tests/testrunner-tests.js) will help you understand the transformation.

    +
    +
    + +
    +

    Writing specific tests

    + +

    Sometimes, using the token stream tests is not powerful enough. By creating a test file with the file extension .js instead of .test, you can make Prism highlight arbitrary pieces of code and check their HTML results.

    +

    The language is determined by the folder containing the test file lies, as explained in the previous section.

    +

    The structure of your test file will look like this, for example:

    +
    module.exports = {
    +	'&#x278a;': '<span class="token entity" title="&#x278a;">&amp;#x278a;</span>',
    +	'&#182;': '<span class="token entity" title="&#182;">&amp;#182;</span>',
    +};
    +

    The keys are the codes which will be highlighted by Prism. The values are the expected results, as HTML.

    +
    + +
    +

    Test runner tests

    +

    The test runner itself is tested in a separate test case. You can find all “test core” related tests in tests/testrunner-tests.js.

    +

    You shouldn't need to touch this file ever, except you modify the test runner code.

    +
    + +
    +

    Internal structure

    +

    The global test flow is at follows:

    +
      +
    1. Run all internal tests (test the test runner).
    2. +
    3. Find all language tests.
    4. +
    5. Run all language tests individually.
    6. +
    7. Report the results.
    8. +
    +
    + + +
    + + + + + + + + + diff --git a/docs/_style/prism-master/test.html b/docs/_style/prism-master/test.html new file mode 100644 index 0000000000..e28cce1dd9 --- /dev/null +++ b/docs/_style/prism-master/test.html @@ -0,0 +1,203 @@ + + + + + + +Test drive ▲ Prism + + + + + + + + + + +
    +
    + +

    Test drive

    +

    Take Prism for a spin!

    +
    + +
    +
    +

    + +

    + +

    Result:

    +
    + +

    + Language: +

    +
    +
    + +
    + + + + + + + + + + + diff --git a/docs/_style/prism-master/tests/helper/prism-loader.js b/docs/_style/prism-master/tests/helper/prism-loader.js new file mode 100644 index 0000000000..3257485a5f --- /dev/null +++ b/docs/_style/prism-master/tests/helper/prism-loader.js @@ -0,0 +1,131 @@ +"use strict"; + +var fs = require("fs"); +var vm = require("vm"); +var components = require("../../components"); +var languagesCatalog = components.languages; + + +module.exports = { + + /** + * Creates a new Prism instance with the given language loaded + * + * @param {string|string[]} languages + * @returns {Prism} + */ + createInstance: function (languages) { + var context = { + loadedLanguages: [], + Prism: this.createEmptyPrism() + }; + + context = this.loadLanguages(languages, context); + + return context.Prism; + }, + + /** + * Loads the given languages and appends the config to the given Prism object + * + * @private + * @param {string|string[]} languages + * @param {{loadedLanguages: string[], Prism: Prism}} context + * @returns {{loadedLanguages: string[], Prism: Prism}} + */ + loadLanguages: function (languages, context) { + if (typeof languages === 'string') { + languages = [languages]; + } + + var self = this; + + languages.forEach(function (language) { + context = self.loadLanguage(language, context); + }); + + return context; + }, + + /** + * Loads the given language (including recursively loading the dependencies) and + * appends the config to the given Prism object + * + * @private + * @param {string} language + * @param {{loadedLanguages: string[], Prism: Prism}} context + * @returns {{loadedLanguages: string[], Prism: Prism}} + */ + loadLanguage: function (language, context) { + if (!languagesCatalog[language]) { + throw new Error("Language '" + language + "' not found."); + } + + // the given language was already loaded + if (-1 < context.loadedLanguages.indexOf(language)) { + return context; + } + + // if the language has a dependency -> load it first + if (languagesCatalog[language].require) { + context = this.loadLanguages(languagesCatalog[language].require, context); + } + + // load the language itself + var languageSource = this.loadFileSource(language); + context.Prism = this.runFileWithContext(languageSource, {Prism: context.Prism}).Prism; + context.loadedLanguages.push(language); + + return context; + }, + + + /** + * Creates a new empty prism instance + * + * @private + * @returns {Prism} + */ + createEmptyPrism: function () { + var coreSource = this.loadFileSource("core"); + var context = this.runFileWithContext(coreSource); + return context.Prism; + }, + + + /** + * Cached file sources, to prevent massive HDD work + * + * @private + * @type {Object.} + */ + fileSourceCache: {}, + + + /** + * Loads the given file source as string + * + * @private + * @param {string} name + * @returns {string} + */ + loadFileSource: function (name) { + return this.fileSourceCache[name] = this.fileSourceCache[name] || fs.readFileSync(__dirname + "/../../components/prism-" + name + ".js", "utf8"); + }, + + + /** + * Runs a VM for a given file source with the given context + * + * @private + * @param {string} fileSource + * @param {*} [context] + * + * @returns {*} + */ + runFileWithContext: function (fileSource, context) { + context = context || {}; + vm.runInNewContext(fileSource, context); + return context; + } +}; diff --git a/docs/_style/prism-master/tests/helper/test-case.js b/docs/_style/prism-master/tests/helper/test-case.js new file mode 100644 index 0000000000..cbf51a953b --- /dev/null +++ b/docs/_style/prism-master/tests/helper/test-case.js @@ -0,0 +1,196 @@ +"use strict"; + +var fs = require("fs"); +var assert = require("chai").assert; +var PrismLoader = require("./prism-loader"); +var TokenStreamTransformer = require("./token-stream-transformer"); + +/** + * Handles parsing of a test case file. + * + * + * A test case file consists of at least two parts, separated by a line of dashes. + * This separation line must start at the beginning of the line and consist of at least three dashes. + * + * The test case file can either consist of two parts: + * + * {source code} + * ---- + * {expected token stream} + * + * + * or of three parts: + * + * {source code} + * ---- + * {expected token stream} + * ---- + * {text comment explaining the test case} + * + * If the file contains more than three parts, the remaining parts are just ignored. + * If the file however does not contain at least two parts (so no expected token stream), + * the test case will later be marked as failed. + * + * + * @type {{runTestCase: Function, transformCompiledTokenStream: Function, parseTestCaseFile: Function}} + */ +module.exports = { + + /** + * Runs the given test case file and asserts the result + * + * The passed language identifier can either be a language like "css" or a composed language + * identifier like "css+markup". Composed identifiers can be used for testing language inclusion. + * + * When testing language inclusion, the first given language is the main language which will be passed + * to Prism for highlighting ("css+markup" will result in a call to Prism to highlight with the "css" grammar). + * But it will be ensured, that the additional passed languages will be loaded too. + * + * The languages will be loaded in the order they were provided. + * + * @param {string} languageIdentifier + * @param {string} filePath + */ + runTestCase: function (languageIdentifier, filePath) { + var testCase = this.parseTestCaseFile(filePath); + var usedLanguages = this.parseLanguageNames(languageIdentifier); + + if (null === testCase) { + throw new Error("Test case file has invalid format (or the provided token stream is invalid JSON), please read the docs."); + } + + var Prism = PrismLoader.createInstance(usedLanguages.languages); + // the first language is the main language to highlight + var mainLanguageGrammar = Prism.languages[usedLanguages.mainLanguage]; + var env = { + code: testCase.testSource, + grammar: mainLanguageGrammar, + language: usedLanguages.mainLanguage + }; + Prism.hooks.run('before-tokenize', env); + env.tokens = Prism.tokenize(env.code, env.grammar); + Prism.hooks.run('after-tokenize', env); + var compiledTokenStream = env.tokens; + + var simplifiedTokenStream = TokenStreamTransformer.simplify(compiledTokenStream); + + var tzd = JSON.stringify( simplifiedTokenStream ); var exp = JSON.stringify( testCase.expectedTokenStream ); + var i = 0; var j = 0; var diff = ""; + while ( j < tzd.length ){ if (exp[i] != tzd[j] || i == exp.length) diff += tzd[j]; else i++; j++; } + + // var message = "\nToken Stream: \n" + JSON.stringify( simplifiedTokenStream, null, " " ) + + var message = "\nToken Stream: \n" + tzd + + "\n-----------------------------------------\n" + + "Expected Token Stream: \n" + exp + + "\n-----------------------------------------\n" + diff; + + var result = assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); + }, + + + /** + * Parses the language names and finds the main language. + * + * It is either the last language or the language followed by a exclamation mark “!”. + * There should only be one language with an exclamation mark. + * + * @param {string} languageIdentifier + * + * @returns {{languages: string[], mainLanguage: string}} + */ + parseLanguageNames: function (languageIdentifier) { + var languages = languageIdentifier.split("+"); + var mainLanguage = null; + + languages = languages.map( + function (language) { + var pos = language.indexOf("!"); + + if (-1 < pos) { + if (mainLanguage) { + throw "There are multiple main languages defined."; + } + + mainLanguage = language.replace("!", ""); + return mainLanguage; + } + + return language; + } + ); + + if (!mainLanguage) { + mainLanguage = languages[languages.length-1]; + } + + return { + languages: languages, + mainLanguage: mainLanguage + }; + }, + + + /** + * Parses the test case from the given test case file + * + * @private + * @param {string} filePath + * @returns {{testSource: string, expectedTokenStream: Array.>, comment:string?}|null} + */ + parseTestCaseFile: function (filePath) { + var testCaseSource = fs.readFileSync(filePath, "utf8"); + var testCaseParts = testCaseSource.split(/^-{10,}\w*$/m); + + try { + var testCase = { + testSource: testCaseParts[0].trim(), + expectedTokenStream: JSON.parse(testCaseParts[1]), + comment: null + }; + + // if there are three parts, the third one is the comment + // explaining the test case + if (testCaseParts[2]) { + testCase.comment = testCaseParts[2].trim(); + } + + return testCase; + } + catch (e) { + // the JSON can't be parsed (e.g. it could be empty) + return null; + } + }, + + /** + * Runs the given pieces of codes and asserts their result. + * + * Code is provided as the key and expected result as the value. + * + * @param {string} languageIdentifier + * @param {object} codes + */ + runTestsWithHooks: function (languageIdentifier, codes) { + var usedLanguages = this.parseLanguageNames(languageIdentifier); + var Prism = PrismLoader.createInstance(usedLanguages.languages); + // the first language is the main language to highlight + + for (var code in codes) { + if (codes.hasOwnProperty(code)) { + var env = { + element: {}, + language: usedLanguages.mainLanguage, + grammar: Prism.languages[usedLanguages.mainLanguage], + code: code + }; + Prism.hooks.run('before-highlight', env); + env.highlightedCode = Prism.highlight(env.code, env.grammar, env.language); + Prism.hooks.run('before-insert', env); + env.element.innerHTML = env.highlightedCode; + Prism.hooks.run('after-highlight', env); + Prism.hooks.run('complete', env); + assert.equal(env.highlightedCode, codes[code]); + } + } + } +}; diff --git a/docs/_style/prism-master/tests/helper/test-discovery.js b/docs/_style/prism-master/tests/helper/test-discovery.js new file mode 100644 index 0000000000..b2aade1ad5 --- /dev/null +++ b/docs/_style/prism-master/tests/helper/test-discovery.js @@ -0,0 +1,115 @@ +"use strict"; + +var fs = require("fs"); +var path = require("path"); + + +module.exports = { + + /** + * Loads the list of all available tests + * + * @param {string} rootDir + * @returns {Object.} + */ + loadAllTests: function (rootDir) { + var testSuite = {}; + var self = this; + + this.getAllDirectories(rootDir).forEach( + function (language) { + testSuite[language] = self.getAllFiles(path.join(rootDir, language)); + } + ); + + return testSuite; + }, + + /** + * Loads the list of available tests that match the given languages + * + * @param {string} rootDir + * @param {string|string[]} languages + * @returns {Object.} + */ + loadSomeTests: function (rootDir, languages) { + var testSuite = {}; + var self = this; + + this.getSomeDirectories(rootDir, languages).forEach( + function (language) { + testSuite[language] = self.getAllFiles(path.join(rootDir, language)); + } + ); + + return testSuite; + }, + + + /** + * Returns a list of all (sub)directories (just the directory names, not full paths) + * in the given src directory + * + * @param {string} src + * @returns {Array.} + */ + getAllDirectories: function (src) { + return fs.readdirSync(src).filter( + function (file) { + return fs.statSync(path.join(src, file)).isDirectory(); + } + ); + }, + + /** + * Returns a list of all (sub)directories (just the directory names, not full paths) + * in the given src directory, matching the given languages + * + * @param {string} src + * @param {string|string[]} languages + * @returns {Array.} + */ + getSomeDirectories: function (src, languages) { + var self = this; + return fs.readdirSync(src).filter( + function (file) { + return fs.statSync(path.join(src, file)).isDirectory() && self.directoryMatches(file, languages); + } + ); + }, + + /** + * Returns whether a directory matches one of the given languages. + * @param {string} directory + * @param {string|string[]} languages + */ + directoryMatches: function (directory, languages) { + if (!Array.isArray(languages)) { + languages = [languages]; + } + var dirLanguages = directory.split(/!?\+!?/); + return dirLanguages.some(function (lang) { + return languages.indexOf(lang) >= 0; + }); + }, + + + /** + * Returns a list of all full file paths to all files in the given src directory + * + * @private + * @param {string} src + * @returns {Array.} + */ + getAllFiles: function (src) { + return fs.readdirSync(src).filter( + function (fileName) { + return fs.statSync(path.join(src, fileName)).isFile(); + } + ).map( + function (fileName) { + return path.join(src, fileName); + } + ); + } +}; diff --git a/docs/_style/prism-master/tests/helper/token-stream-transformer.js b/docs/_style/prism-master/tests/helper/token-stream-transformer.js new file mode 100644 index 0000000000..deb831c45b --- /dev/null +++ b/docs/_style/prism-master/tests/helper/token-stream-transformer.js @@ -0,0 +1,32 @@ +"use strict"; + + +module.exports = { + /** + * Simplifies the token stream to ease the matching with the expected token stream. + * + * * Strings are kept as-is + * * In arrays each value is transformed individually + * * Values that are empty (empty arrays or strings only containing whitespace) + * + * + * @param {Array} tokenStream + * @returns {Array.} + */ + simplify: function (tokenStream) { + if (Array.isArray(tokenStream)) { + return tokenStream + .map(this.simplify.bind(this)) + .filter(function (value) { + return !(Array.isArray(value) && !value.length) && !(typeof value === "string" && !value.trim().length); + } + ); + } + else if (typeof tokenStream === "object") { + return [tokenStream.type, this.simplify(tokenStream.content)]; + } + else { + return tokenStream; + } + } +}; diff --git a/docs/_style/prism-master/tests/languages/abap/comment_feature.test b/docs/_style/prism-master/tests/languages/abap/comment_feature.test new file mode 100644 index 0000000000..e0f28feba3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/comment_feature.test @@ -0,0 +1,13 @@ +* +* Foobar + +---------------------------------------------------- + +[ + ["comment", "*"], + ["comment", "* Foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/eol-comment_feature.test b/docs/_style/prism-master/tests/languages/abap/eol-comment_feature.test new file mode 100644 index 0000000000..f29fc84a5d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/eol-comment_feature.test @@ -0,0 +1,13 @@ +" +" foobar + +---------------------------------------------------- + +[ + ["eol-comment", "\""], + ["eol-comment", "\" foobar"] +] + +---------------------------------------------------- + +Checks for EOL comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/keyword_feature.test b/docs/_style/prism-master/tests/languages/abap/keyword_feature.test new file mode 100644 index 0000000000..0a5a94d82f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/keyword_feature.test @@ -0,0 +1,1801 @@ +SCIENTIFIC_WITH_LEADING_ZERO +SCALE_PRESERVING_SCIENTIFIC +RMC_COMMUNICATION_FAILURE +END-ENHANCEMENT-SECTION +MULTIPLY-CORRESPONDING +SUBTRACT-CORRESPONDING +VERIFICATION-MESSAGE +DIVIDE-CORRESPONDING +ENHANCEMENT-SECTION +CURRENCY_CONVERSION +RMC_SYSTEM_FAILURE +START-OF-SELECTION +MOVE-CORRESPONDING +RMC_INVALID_STATUS +CUSTOMER-FUNCTION +END-OF-DEFINITION +ENHANCEMENT-POINT +SYSTEM-EXCEPTIONS +ADD-CORRESPONDING +SCALE_PRESERVING +SELECTION-SCREEN +CURSOR-SELECTION +END-OF-SELECTION +LOAD-OF-PROGRAM +SCROLL-BOUNDARY +SELECTION-TABLE +EXCEPTION-TABLE +IMPLEMENTATIONS +PARAMETER-TABLE +RIGHT-JUSTIFIED +UNIT_CONVERSION +AUTHORITY-CHECK +LIST-PROCESSING +SIGN_AS_POSTFIX +COL_BACKGROUND +IMPLEMENTATION +INTERFACE-POOL +TRANSFORMATION +IDENTIFICATION +ENDENHANCEMENT +LINE-SELECTION +INITIALIZATION +LEFT-JUSTIFIED +SELECT-OPTIONS +SELECTION-SETS +COMMUNICATION +CORRESPONDING +DECIMAL_SHIFT +PRINT-CONTROL +VALUE-REQUEST +CHAIN-REQUEST +FUNCTION-POOL +FIELD-SYMBOLS +FUNCTIONALITY +INVERTED-DATE +SELECTION-SET +CLASS-METHODS +OUTPUT-LENGTH +CLASS-CODING +COL_NEGATIVE +ERRORMESSAGE +FIELD-GROUPS +HELP-REQUEST +NO-EXTENSION +NO-TOPOFPAGE +REDEFINITION +DISPLAY-MODE +ENDINTERFACE +EXIT-COMMAND +FIELD-SYMBOL +NO-SCROLLING +SHORTDUMP-ID +ACCESSPOLICY +CLASS-EVENTS +COL_POSITIVE +DECLARATIONS +ENHANCEMENTS +FILTER-TABLE +SWITCHSTATES +SYNTAX-CHECK +TRANSPORTING +ASYNCHRONOUS +SYNTAX-TRACE +TOKENIZATION +USER-COMMAND +WITH-HEADING +ABAP-SOURCE +BREAK-POINT +CHAIN-INPUT +COMPRESSION +FIXED-POINT +NEW-SECTION +NON-UNICODE +OCCURRENCES +RESPONSIBLE +SYSTEM-CALL +TRACE-TABLE +ABBREVIATED +CHAR-TO-HEX +END-OF-FILE +ENDFUNCTION +ENVIRONMENT +ASSOCIATION +COL_HEADING +EDITOR-CALL +END-OF-PAGE +ENGINEERING +IMPLEMENTED +INTENSIFIED +RADIOBUTTON +SYSTEM-EXIT +TOP-OF-PAGE +TRANSACTION +APPLICATION +CONCATENATE +DESTINATION +ENHANCEMENT +IMMEDIATELY +NO-GROUPING +PRECOMPILED +REPLACEMENT +TITLE-LINES +ACTIVATION +BYTE-ORDER +CLASS-POOL +CONNECTION +CONVERSION +DEFINITION +DEPARTMENT +EXPIRATION +INHERITING +MESSAGE-ID +NO-HEADING +PERFORMING +QUEUE-ONLY +RIGHTSPACE +SCIENTIFIC +STATUSINFO +STRUCTURES +SYNCPOINTS +WITH-TITLE +ATTRIBUTES +BOUNDARIES +CLASS-DATA +COL_NORMAL +DD/MM/YYYY +DESCENDING +INTERFACES +LINE-COUNT +MM/DD/YYYY +NON-UNIQUE +PRESERVING +SELECTIONS +STATEMENTS +SUBROUTINE +TRUNCATION +TYPE-POOLS +ARITHMETIC +BACKGROUND +ENDPROVIDE +EXCEPTIONS +IDENTIFIER +INDEX-LINE +OBLIGATORY +PARAMETERS +PERCENTAGE +PUSHBUTTON +RESOLUTION +COMPONENTS +DEALLOCATE +DISCONNECT +DUPLICATES +FIRST-LINE +HEAD-LINES +NO-DISPLAY +OCCURRENCE +RESPECTING +RETURNCODE +SUBMATCHES +TRACE-FILE +ASCENDING +BYPASSING +ENDMODULE +EXCEPTION +EXCLUDING +EXPORTING +INCREMENT +MATCHCODE +PARAMETER +PARTIALLY +PREFERRED +REFERENCE +REPLACING +RETURNING +SELECTION +SEPARATED +SPECIFIED +STATEMENT +TIMESTAMP +TYPE-POOL +ACCEPTING +APPENDAGE +ASSIGNING +COL_GROUP +COMPARING +CONSTANTS +DANGEROUS +IMPORTING +INSTANCES +LEFTSPACE +LOG-POINT +QUICKINFO +READ-ONLY +SCROLLING +SQLSCRIPT +STEP-LOOP +TOP-LINES +TRANSLATE +APPENDING +AUTHORITY +CHARACTER +COMPONENT +CONDITION +DIRECTORY +DUPLICATE +MESSAGING +RECEIVING +SUBSCREEN +ACCORDING +COL_TOTAL +END-LINES +ENDMETHOD +ENDSELECT +EXPANDING +EXTENSION +INCLUDING +INFOTYPES +INTERFACE +INTERVALS +LINE-SIZE +PF-STATUS +PROCEDURE +PROTECTED +REQUESTED +RESUMABLE +RIGHTPLUS +SAP-SPOOL +SECONDARY +STRUCTURE +SUBSTRING +TABLEVIEW +NUMOFCHAR +ADJACENT +ANALYSIS +ASSIGNED +BACKWARD +CHANNELS +CHECKBOX +CONTINUE +CRITICAL +DATAINFO +DD/MM/YY +DURATION +ENCODING +ENDCLASS +FUNCTION +LEFTPLUS +LINEFEED +MM/DD/YY +OVERFLOW +RECEIVED +SKIPPING +SORTABLE +STANDARD +SUBTRACT +SUPPRESS +TABSTRIP +TITLEBAR +TRUNCATE +UNASSIGN +WHENEVER +ANALYZER +COALESCE +COMMENTS +CONDENSE +DECIMALS +DEFERRED +ENDWHILE +EXPLICIT +KEYWORDS +MESSAGES +POSITION +PRIORITY +RECEIVER +RENAMING +TIMEZONE +TRAILING +ALLOCATE +CENTERED +CIRCULAR +CONTROLS +CURRENCY +DELETING +DESCRIBE +DISTANCE +ENDCATCH +EXPONENT +EXTENDED +GENERATE +IGNORING +INCLUDES +INTERNAL +MAJOR-ID +MODIFIER +NEW-LINE +OPTIONAL +PROPERTY +ROLLBACK +STARTING +SUPPLIED +ABSTRACT +CHANGING +CONTEXTS +CREATING +CUSTOMER +DATABASE +DAYLIGHT +DEFINING +DISTINCT +DIVISION +ENABLING +ENDCHAIN +ESCAPING +HARMLESS +IMPLICIT +INACTIVE +LANGUAGE +MINOR-ID +MULTIPLY +NEW-PAGE +NO-TITLE +POS_HIGH +SEPARATE +TEXTPOOL +TRANSFER +SELECTOR +DBMAXLEN +ITERATOR +SELECTOR +ARCHIVE +BIT-XOR +BYTE-CO +COLLECT +COMMENT +CURRENT +DEFAULT +DISPLAY +ENDFORM +EXTRACT +LEADING +LISTBOX +LOCATOR +MEMBERS +METHODS +NESTING +POS_LOW +PROCESS +PROVIDE +RAISING +RESERVE +SECONDS +SUMMARY +VISIBLE +BETWEEN +BIT-AND +BYTE-CS +CLEANUP +COMPUTE +CONTROL +CONVERT +DATASET +ENDCASE +FORWARD +HEADERS +HOTSPOT +INCLUDE +INVERSE +KEEPING +NO-ZERO +OBJECTS +OVERLAY +PADDING +PATTERN +PROGRAM +REFRESH +SECTION +SUMMING +TESTING +VERSION +WINDOWS +WITHOUT +BIT-NOT +BYTE-CA +BYTE-NA +CASTING +CONTEXT +COUNTRY +DYNAMIC +ENABLED +ENDLOOP +EXECUTE +FRIENDS +HANDLER +HEADING +INITIAL + *-INPUT +LOGFILE +MAXIMUM +MINIMUM +NO-GAPS +NO-SIGN +PRAGMAS +PRIMARY +PRIVATE +REDUCED +REPLACE +REQUEST +RESULTS +UNICODE +WARNING +ALIASES +BYTE-CN +BYTE-NS +CALLING +COL_KEY +COLUMNS +CONNECT +ENDEXEC +ENTRIES +EXCLUDE +FILTERS +FURTHER +HELP-ID +LOGICAL +MAPPING +MESSAGE +NAMETAB +OPTIONS +PACKAGE +PERFORM +RECEIVE +STATICS +VARYING +BINDING +CHARLEN +GREATER +XSTRLEN +ACCEPT +APPEND +DETAIL +ELSEIF +ENDING +ENDTRY +FORMAT +FRAMES +GIVING +HASHED +HEADER +IMPORT +INSERT +MARGIN +MODULE +NATIVE +OBJECT +OFFSET +REMOTE +RESUME +SAVING +SIMPLE +SUBMIT +TABBED +TOKENS +UNIQUE +UNPACK +UPDATE +WINDOW +YELLOW +ACTUAL +ASPECT +CENTER +CURSOR +DELETE +DIALOG +DIVIDE +DURING +ERRORS +EVENTS +EXTEND +FILTER +HANDLE +HAVING +IGNORE +LITTLE +MEMORY +NO-GAP +OCCURS +OPTION +PERSON +PLACES +PUBLIC +REDUCE +REPORT +RESULT +SINGLE +SORTED +SWITCH +SYNTAX +TARGET +VALUES +WRITER +ASSERT +BLOCKS +BOUNDS +BUFFER +CHANGE +COLUMN +COMMIT +CONCAT +COPIES +CREATE +DDMMYY +DEFINE +ENDIAN +ESCAPE +EXPAND +KERNEL +LAYOUT +LEGACY +LEVELS +MMDDYY +NUMBER +OUTPUT +RANGES +READER +RETURN +SCREEN +SEARCH +SELECT +SHARED +SOURCE +STABLE +STATIC +SUBKEY +SUFFIX +TABLES +UNWIND +YYMMDD +ASSIGN +BACKUP +BEFORE +BINARY +BIT-OR +BLANKS +CLIENT +CODING +COMMON +DEMAND +DYNPRO +EXCEPT +EXISTS +EXPORT +FIELDS +GLOBAL +GROUPS +LENGTH +LOCALE +MEDIUM +METHOD +MODIFY +NESTED +OTHERS +REJECT +SCROLL +SUPPLY +SYMBOL +ENDFOR +STRLEN +ALIGN +BEGIN +BOUND +ENDAT +ENTRY +EVENT +FINAL +FLUSH +GRANT +INNER +SHORT +USING +WRITE +AFTER +BLACK +BLOCK +CLOCK +COLOR +COUNT +DUMMY +EMPTY +ENDDO +ENDON +GREEN +INDEX +INOUT +LEAVE +LEVEL +LINES +MODIF +ORDER +OUTER +RANGE +RESET +RETRY +RIGHT +SMART +SPLIT +STYLE +TABLE +THROW +UNDER +UNTIL +UPPER +UTF-8 +WHERE +ALIAS +BLANK +CLEAR +CLOSE +EXACT +FETCH +FIRST +FOUND +GROUP +LLANG +LOCAL +OTHER +REGEX +SPOOL +TITLE +TYPES +VALID +WHILE +ALPHA +BOXED +CATCH +CHAIN +CHECK +CLASS +COVER +ENDIF +EQUIV +FIELD +FLOOR +FRAME +INPUT +LOWER +MATCH +NODES +PAGES +PRINT +RAISE +ROUND +SHIFT +SPACE +SPOTS +STAMP +STATE +TASKS +TIMES +TRMAC +ULINE +UNION +VALUE +WIDTH +EQUAL +LOG10 +TRUNC +BLOB +CASE +CEIL +CLOB +COND +EXIT +FILE +GAPS +HOLD +INCL +INTO +KEEP +KEYS +LAST +LINE +LONG +LPAD +MAIL +MODE +OPEN +PINK +READ +ROWS +TEST +THEN +ZERO +AREA +BACK +BADI +BYTE +CAST +EDIT +EXEC +FAIL +FIND +FKEQ +FONT +FREE +GKEQ +HIDE +INIT +ITNO +LATE +LOOP +MAIN +MARK +MOVE +NEXT +NULL +RISK +ROLE +UNIT +WAIT +ZONE +BASE +CALL +CODE +DATA +DATE +FKGE +GKGE +HIGH +KIND +LEFT +LIST +MASK +MESH +NAME +NODE +PACK +PAGE +POOL +SEND +SIGN +SIZE +SOME +STOP +TASK +TEXT +TIME +USER +VARY +WITH +WORD +BLUE +CONV +COPY +DEEP +ELSE +FORM +FROM +HINT +ICON +JOIN +LIKE +LOAD +ONLY +PART +SCAN +SKIP +SORT +TYPE +UNIX +VIEW +WHEN +WORK +ACOS +ASIN +ATAN +COSH +EACH +FRAC +LESS +RTTI +SINH +SQRT +TANH +AVG +BIT +DIV +ISO +LET +OUT +PAD +SQL +ALL +CI_ +CPI +END +LOB +LPI +MAX +MIN +NEW +OLE +RUN +SET +?TO +YES +ABS +ADD +AND +BIG +FOR +HDB +JOB +LOW +NOT +SAP +TRY +VIA +XML +ANY +GET +IDS +KEY +MOD +OFF +PUT +RAW +RED +REF +SUM +TAB +XSD +CNT +COS +EXP +LOG +SIN +TAN +XOR +AT +CO +CP +DO +GT +ID +IF +NS +OR +BT +CA +CS +GE +NA +NB +EQ +IN +LT +NE +NO +OF +ON +PF +TO +AS +BY +CN +IS +LE +NP +UP +E +I +M +O +Z +C +X + +---------------------------------------------------- + +[ + ["keyword", "SCIENTIFIC_WITH_LEADING_ZERO"], + ["keyword", "SCALE_PRESERVING_SCIENTIFIC"], + ["keyword", "RMC_COMMUNICATION_FAILURE"], + ["keyword", "END-ENHANCEMENT-SECTION"], + ["keyword", "MULTIPLY-CORRESPONDING"], + ["keyword", "SUBTRACT-CORRESPONDING"], + ["keyword", "VERIFICATION-MESSAGE"], + ["keyword", "DIVIDE-CORRESPONDING"], + ["keyword", "ENHANCEMENT-SECTION"], + ["keyword", "CURRENCY_CONVERSION"], + ["keyword", "RMC_SYSTEM_FAILURE"], + ["keyword", "START-OF-SELECTION"], + ["keyword", "MOVE-CORRESPONDING"], + ["keyword", "RMC_INVALID_STATUS"], + ["keyword", "CUSTOMER-FUNCTION"], + ["keyword", "END-OF-DEFINITION"], + ["keyword", "ENHANCEMENT-POINT"], + ["keyword", "SYSTEM-EXCEPTIONS"], + ["keyword", "ADD-CORRESPONDING"], + ["keyword", "SCALE_PRESERVING"], + ["keyword", "SELECTION-SCREEN"], + ["keyword", "CURSOR-SELECTION"], + ["keyword", "END-OF-SELECTION"], + ["keyword", "LOAD-OF-PROGRAM"], + ["keyword", "SCROLL-BOUNDARY"], + ["keyword", "SELECTION-TABLE"], + ["keyword", "EXCEPTION-TABLE"], + ["keyword", "IMPLEMENTATIONS"], + ["keyword", "PARAMETER-TABLE"], + ["keyword", "RIGHT-JUSTIFIED"], + ["keyword", "UNIT_CONVERSION"], + ["keyword", "AUTHORITY-CHECK"], + ["keyword", "LIST-PROCESSING"], + ["keyword", "SIGN_AS_POSTFIX"], + ["keyword", "COL_BACKGROUND"], + ["keyword", "IMPLEMENTATION"], + ["keyword", "INTERFACE-POOL"], + ["keyword", "TRANSFORMATION"], + ["keyword", "IDENTIFICATION"], + ["keyword", "ENDENHANCEMENT"], + ["keyword", "LINE-SELECTION"], + ["keyword", "INITIALIZATION"], + ["keyword", "LEFT-JUSTIFIED"], + ["keyword", "SELECT-OPTIONS"], + ["keyword", "SELECTION-SETS"], + ["keyword", "COMMUNICATION"], + ["keyword", "CORRESPONDING"], + ["keyword", "DECIMAL_SHIFT"], + ["keyword", "PRINT-CONTROL"], + ["keyword", "VALUE-REQUEST"], + ["keyword", "CHAIN-REQUEST"], + ["keyword", "FUNCTION-POOL"], + ["keyword", "FIELD-SYMBOLS"], + ["keyword", "FUNCTIONALITY"], + ["keyword", "INVERTED-DATE"], + ["keyword", "SELECTION-SET"], + ["keyword", "CLASS-METHODS"], + ["keyword", "OUTPUT-LENGTH"], + ["keyword", "CLASS-CODING"], + ["keyword", "COL_NEGATIVE"], + ["keyword", "ERRORMESSAGE"], + ["keyword", "FIELD-GROUPS"], + ["keyword", "HELP-REQUEST"], + ["keyword", "NO-EXTENSION"], + ["keyword", "NO-TOPOFPAGE"], + ["keyword", "REDEFINITION"], + ["keyword", "DISPLAY-MODE"], + ["keyword", "ENDINTERFACE"], + ["keyword", "EXIT-COMMAND"], + ["keyword", "FIELD-SYMBOL"], + ["keyword", "NO-SCROLLING"], + ["keyword", "SHORTDUMP-ID"], + ["keyword", "ACCESSPOLICY"], + ["keyword", "CLASS-EVENTS"], + ["keyword", "COL_POSITIVE"], + ["keyword", "DECLARATIONS"], + ["keyword", "ENHANCEMENTS"], + ["keyword", "FILTER-TABLE"], + ["keyword", "SWITCHSTATES"], + ["keyword", "SYNTAX-CHECK"], + ["keyword", "TRANSPORTING"], + ["keyword", "ASYNCHRONOUS"], + ["keyword", "SYNTAX-TRACE"], + ["keyword", "TOKENIZATION"], + ["keyword", "USER-COMMAND"], + ["keyword", "WITH-HEADING"], + ["keyword", "ABAP-SOURCE"], + ["keyword", "BREAK-POINT"], + ["keyword", "CHAIN-INPUT"], + ["keyword", "COMPRESSION"], + ["keyword", "FIXED-POINT"], + ["keyword", "NEW-SECTION"], + ["keyword", "NON-UNICODE"], + ["keyword", "OCCURRENCES"], + ["keyword", "RESPONSIBLE"], + ["keyword", "SYSTEM-CALL"], + ["keyword", "TRACE-TABLE"], + ["keyword", "ABBREVIATED"], + ["keyword", "CHAR-TO-HEX"], + ["keyword", "END-OF-FILE"], + ["keyword", "ENDFUNCTION"], + ["keyword", "ENVIRONMENT"], + ["keyword", "ASSOCIATION"], + ["keyword", "COL_HEADING"], + ["keyword", "EDITOR-CALL"], + ["keyword", "END-OF-PAGE"], + ["keyword", "ENGINEERING"], + ["keyword", "IMPLEMENTED"], + ["keyword", "INTENSIFIED"], + ["keyword", "RADIOBUTTON"], + ["keyword", "SYSTEM-EXIT"], + ["keyword", "TOP-OF-PAGE"], + ["keyword", "TRANSACTION"], + ["keyword", "APPLICATION"], + ["keyword", "CONCATENATE"], + ["keyword", "DESTINATION"], + ["keyword", "ENHANCEMENT"], + ["keyword", "IMMEDIATELY"], + ["keyword", "NO-GROUPING"], + ["keyword", "PRECOMPILED"], + ["keyword", "REPLACEMENT"], + ["keyword", "TITLE-LINES"], + ["keyword", "ACTIVATION"], + ["keyword", "BYTE-ORDER"], + ["keyword", "CLASS-POOL"], + ["keyword", "CONNECTION"], + ["keyword", "CONVERSION"], + ["keyword", "DEFINITION"], + ["keyword", "DEPARTMENT"], + ["keyword", "EXPIRATION"], + ["keyword", "INHERITING"], + ["keyword", "MESSAGE-ID"], + ["keyword", "NO-HEADING"], + ["keyword", "PERFORMING"], + ["keyword", "QUEUE-ONLY"], + ["keyword", "RIGHTSPACE"], + ["keyword", "SCIENTIFIC"], + ["keyword", "STATUSINFO"], + ["keyword", "STRUCTURES"], + ["keyword", "SYNCPOINTS"], + ["keyword", "WITH-TITLE"], + ["keyword", "ATTRIBUTES"], + ["keyword", "BOUNDARIES"], + ["keyword", "CLASS-DATA"], + ["keyword", "COL_NORMAL"], + ["keyword", "DD/MM/YYYY"], + ["keyword", "DESCENDING"], + ["keyword", "INTERFACES"], + ["keyword", "LINE-COUNT"], + ["keyword", "MM/DD/YYYY"], + ["keyword", "NON-UNIQUE"], + ["keyword", "PRESERVING"], + ["keyword", "SELECTIONS"], + ["keyword", "STATEMENTS"], + ["keyword", "SUBROUTINE"], + ["keyword", "TRUNCATION"], + ["keyword", "TYPE-POOLS"], + ["keyword", "ARITHMETIC"], + ["keyword", "BACKGROUND"], + ["keyword", "ENDPROVIDE"], + ["keyword", "EXCEPTIONS"], + ["keyword", "IDENTIFIER"], + ["keyword", "INDEX-LINE"], + ["keyword", "OBLIGATORY"], + ["keyword", "PARAMETERS"], + ["keyword", "PERCENTAGE"], + ["keyword", "PUSHBUTTON"], + ["keyword", "RESOLUTION"], + ["keyword", "COMPONENTS"], + ["keyword", "DEALLOCATE"], + ["keyword", "DISCONNECT"], + ["keyword", "DUPLICATES"], + ["keyword", "FIRST-LINE"], + ["keyword", "HEAD-LINES"], + ["keyword", "NO-DISPLAY"], + ["keyword", "OCCURRENCE"], + ["keyword", "RESPECTING"], + ["keyword", "RETURNCODE"], + ["keyword", "SUBMATCHES"], + ["keyword", "TRACE-FILE"], + ["keyword", "ASCENDING"], + ["keyword", "BYPASSING"], + ["keyword", "ENDMODULE"], + ["keyword", "EXCEPTION"], + ["keyword", "EXCLUDING"], + ["keyword", "EXPORTING"], + ["keyword", "INCREMENT"], + ["keyword", "MATCHCODE"], + ["keyword", "PARAMETER"], + ["keyword", "PARTIALLY"], + ["keyword", "PREFERRED"], + ["keyword", "REFERENCE"], + ["keyword", "REPLACING"], + ["keyword", "RETURNING"], + ["keyword", "SELECTION"], + ["keyword", "SEPARATED"], + ["keyword", "SPECIFIED"], + ["keyword", "STATEMENT"], + ["keyword", "TIMESTAMP"], + ["keyword", "TYPE-POOL"], + ["keyword", "ACCEPTING"], + ["keyword", "APPENDAGE"], + ["keyword", "ASSIGNING"], + ["keyword", "COL_GROUP"], + ["keyword", "COMPARING"], + ["keyword", "CONSTANTS"], + ["keyword", "DANGEROUS"], + ["keyword", "IMPORTING"], + ["keyword", "INSTANCES"], + ["keyword", "LEFTSPACE"], + ["keyword", "LOG-POINT"], + ["keyword", "QUICKINFO"], + ["keyword", "READ-ONLY"], + ["keyword", "SCROLLING"], + ["keyword", "SQLSCRIPT"], + ["keyword", "STEP-LOOP"], + ["keyword", "TOP-LINES"], + ["keyword", "TRANSLATE"], + ["keyword", "APPENDING"], + ["keyword", "AUTHORITY"], + ["keyword", "CHARACTER"], + ["keyword", "COMPONENT"], + ["keyword", "CONDITION"], + ["keyword", "DIRECTORY"], + ["keyword", "DUPLICATE"], + ["keyword", "MESSAGING"], + ["keyword", "RECEIVING"], + ["keyword", "SUBSCREEN"], + ["keyword", "ACCORDING"], + ["keyword", "COL_TOTAL"], + ["keyword", "END-LINES"], + ["keyword", "ENDMETHOD"], + ["keyword", "ENDSELECT"], + ["keyword", "EXPANDING"], + ["keyword", "EXTENSION"], + ["keyword", "INCLUDING"], + ["keyword", "INFOTYPES"], + ["keyword", "INTERFACE"], + ["keyword", "INTERVALS"], + ["keyword", "LINE-SIZE"], + ["keyword", "PF-STATUS"], + ["keyword", "PROCEDURE"], + ["keyword", "PROTECTED"], + ["keyword", "REQUESTED"], + ["keyword", "RESUMABLE"], + ["keyword", "RIGHTPLUS"], + ["keyword", "SAP-SPOOL"], + ["keyword", "SECONDARY"], + ["keyword", "STRUCTURE"], + ["keyword", "SUBSTRING"], + ["keyword", "TABLEVIEW"], + ["keyword", "NUMOFCHAR"], + ["keyword", "ADJACENT"], + ["keyword", "ANALYSIS"], + ["keyword", "ASSIGNED"], + ["keyword", "BACKWARD"], + ["keyword", "CHANNELS"], + ["keyword", "CHECKBOX"], + ["keyword", "CONTINUE"], + ["keyword", "CRITICAL"], + ["keyword", "DATAINFO"], + ["keyword", "DD/MM/YY"], + ["keyword", "DURATION"], + ["keyword", "ENCODING"], + ["keyword", "ENDCLASS"], + ["keyword", "FUNCTION"], + ["keyword", "LEFTPLUS"], + ["keyword", "LINEFEED"], + ["keyword", "MM/DD/YY"], + ["keyword", "OVERFLOW"], + ["keyword", "RECEIVED"], + ["keyword", "SKIPPING"], + ["keyword", "SORTABLE"], + ["keyword", "STANDARD"], + ["keyword", "SUBTRACT"], + ["keyword", "SUPPRESS"], + ["keyword", "TABSTRIP"], + ["keyword", "TITLEBAR"], + ["keyword", "TRUNCATE"], + ["keyword", "UNASSIGN"], + ["keyword", "WHENEVER"], + ["keyword", "ANALYZER"], + ["keyword", "COALESCE"], + ["keyword", "COMMENTS"], + ["keyword", "CONDENSE"], + ["keyword", "DECIMALS"], + ["keyword", "DEFERRED"], + ["keyword", "ENDWHILE"], + ["keyword", "EXPLICIT"], + ["keyword", "KEYWORDS"], + ["keyword", "MESSAGES"], + ["keyword", "POSITION"], + ["keyword", "PRIORITY"], + ["keyword", "RECEIVER"], + ["keyword", "RENAMING"], + ["keyword", "TIMEZONE"], + ["keyword", "TRAILING"], + ["keyword", "ALLOCATE"], + ["keyword", "CENTERED"], + ["keyword", "CIRCULAR"], + ["keyword", "CONTROLS"], + ["keyword", "CURRENCY"], + ["keyword", "DELETING"], + ["keyword", "DESCRIBE"], + ["keyword", "DISTANCE"], + ["keyword", "ENDCATCH"], + ["keyword", "EXPONENT"], + ["keyword", "EXTENDED"], + ["keyword", "GENERATE"], + ["keyword", "IGNORING"], + ["keyword", "INCLUDES"], + ["keyword", "INTERNAL"], + ["keyword", "MAJOR-ID"], + ["keyword", "MODIFIER"], + ["keyword", "NEW-LINE"], + ["keyword", "OPTIONAL"], + ["keyword", "PROPERTY"], + ["keyword", "ROLLBACK"], + ["keyword", "STARTING"], + ["keyword", "SUPPLIED"], + ["keyword", "ABSTRACT"], + ["keyword", "CHANGING"], + ["keyword", "CONTEXTS"], + ["keyword", "CREATING"], + ["keyword", "CUSTOMER"], + ["keyword", "DATABASE"], + ["keyword", "DAYLIGHT"], + ["keyword", "DEFINING"], + ["keyword", "DISTINCT"], + ["keyword", "DIVISION"], + ["keyword", "ENABLING"], + ["keyword", "ENDCHAIN"], + ["keyword", "ESCAPING"], + ["keyword", "HARMLESS"], + ["keyword", "IMPLICIT"], + ["keyword", "INACTIVE"], + ["keyword", "LANGUAGE"], + ["keyword", "MINOR-ID"], + ["keyword", "MULTIPLY"], + ["keyword", "NEW-PAGE"], + ["keyword", "NO-TITLE"], + ["keyword", "POS_HIGH"], + ["keyword", "SEPARATE"], + ["keyword", "TEXTPOOL"], + ["keyword", "TRANSFER"], + ["keyword", "SELECTOR"], + ["keyword", "DBMAXLEN"], + ["keyword", "ITERATOR"], + ["keyword", "SELECTOR"], + ["keyword", "ARCHIVE"], + ["keyword", "BIT-XOR"], + ["keyword", "BYTE-CO"], + ["keyword", "COLLECT"], + ["keyword", "COMMENT"], + ["keyword", "CURRENT"], + ["keyword", "DEFAULT"], + ["keyword", "DISPLAY"], + ["keyword", "ENDFORM"], + ["keyword", "EXTRACT"], + ["keyword", "LEADING"], + ["keyword", "LISTBOX"], + ["keyword", "LOCATOR"], + ["keyword", "MEMBERS"], + ["keyword", "METHODS"], + ["keyword", "NESTING"], + ["keyword", "POS_LOW"], + ["keyword", "PROCESS"], + ["keyword", "PROVIDE"], + ["keyword", "RAISING"], + ["keyword", "RESERVE"], + ["keyword", "SECONDS"], + ["keyword", "SUMMARY"], + ["keyword", "VISIBLE"], + ["keyword", "BETWEEN"], + ["keyword", "BIT-AND"], + ["keyword", "BYTE-CS"], + ["keyword", "CLEANUP"], + ["keyword", "COMPUTE"], + ["keyword", "CONTROL"], + ["keyword", "CONVERT"], + ["keyword", "DATASET"], + ["keyword", "ENDCASE"], + ["keyword", "FORWARD"], + ["keyword", "HEADERS"], + ["keyword", "HOTSPOT"], + ["keyword", "INCLUDE"], + ["keyword", "INVERSE"], + ["keyword", "KEEPING"], + ["keyword", "NO-ZERO"], + ["keyword", "OBJECTS"], + ["keyword", "OVERLAY"], + ["keyword", "PADDING"], + ["keyword", "PATTERN"], + ["keyword", "PROGRAM"], + ["keyword", "REFRESH"], + ["keyword", "SECTION"], + ["keyword", "SUMMING"], + ["keyword", "TESTING"], + ["keyword", "VERSION"], + ["keyword", "WINDOWS"], + ["keyword", "WITHOUT"], + ["keyword", "BIT-NOT"], + ["keyword", "BYTE-CA"], + ["keyword", "BYTE-NA"], + ["keyword", "CASTING"], + ["keyword", "CONTEXT"], + ["keyword", "COUNTRY"], + ["keyword", "DYNAMIC"], + ["keyword", "ENABLED"], + ["keyword", "ENDLOOP"], + ["keyword", "EXECUTE"], + ["keyword", "FRIENDS"], + ["keyword", "HANDLER"], + ["keyword", "HEADING"], + ["keyword", "INITIAL"], + ["keyword", "*-INPUT"], + ["keyword", "LOGFILE"], + ["keyword", "MAXIMUM"], + ["keyword", "MINIMUM"], + ["keyword", "NO-GAPS"], + ["keyword", "NO-SIGN"], + ["keyword", "PRAGMAS"], + ["keyword", "PRIMARY"], + ["keyword", "PRIVATE"], + ["keyword", "REDUCED"], + ["keyword", "REPLACE"], + ["keyword", "REQUEST"], + ["keyword", "RESULTS"], + ["keyword", "UNICODE"], + ["keyword", "WARNING"], + ["keyword", "ALIASES"], + ["keyword", "BYTE-CN"], + ["keyword", "BYTE-NS"], + ["keyword", "CALLING"], + ["keyword", "COL_KEY"], + ["keyword", "COLUMNS"], + ["keyword", "CONNECT"], + ["keyword", "ENDEXEC"], + ["keyword", "ENTRIES"], + ["keyword", "EXCLUDE"], + ["keyword", "FILTERS"], + ["keyword", "FURTHER"], + ["keyword", "HELP-ID"], + ["keyword", "LOGICAL"], + ["keyword", "MAPPING"], + ["keyword", "MESSAGE"], + ["keyword", "NAMETAB"], + ["keyword", "OPTIONS"], + ["keyword", "PACKAGE"], + ["keyword", "PERFORM"], + ["keyword", "RECEIVE"], + ["keyword", "STATICS"], + ["keyword", "VARYING"], + ["keyword", "BINDING"], + ["keyword", "CHARLEN"], + ["keyword", "GREATER"], + ["keyword", "XSTRLEN"], + ["keyword", "ACCEPT"], + ["keyword", "APPEND"], + ["keyword", "DETAIL"], + ["keyword", "ELSEIF"], + ["keyword", "ENDING"], + ["keyword", "ENDTRY"], + ["keyword", "FORMAT"], + ["keyword", "FRAMES"], + ["keyword", "GIVING"], + ["keyword", "HASHED"], + ["keyword", "HEADER"], + ["keyword", "IMPORT"], + ["keyword", "INSERT"], + ["keyword", "MARGIN"], + ["keyword", "MODULE"], + ["keyword", "NATIVE"], + ["keyword", "OBJECT"], + ["keyword", "OFFSET"], + ["keyword", "REMOTE"], + ["keyword", "RESUME"], + ["keyword", "SAVING"], + ["keyword", "SIMPLE"], + ["keyword", "SUBMIT"], + ["keyword", "TABBED"], + ["keyword", "TOKENS"], + ["keyword", "UNIQUE"], + ["keyword", "UNPACK"], + ["keyword", "UPDATE"], + ["keyword", "WINDOW"], + ["keyword", "YELLOW"], + ["keyword", "ACTUAL"], + ["keyword", "ASPECT"], + ["keyword", "CENTER"], + ["keyword", "CURSOR"], + ["keyword", "DELETE"], + ["keyword", "DIALOG"], + ["keyword", "DIVIDE"], + ["keyword", "DURING"], + ["keyword", "ERRORS"], + ["keyword", "EVENTS"], + ["keyword", "EXTEND"], + ["keyword", "FILTER"], + ["keyword", "HANDLE"], + ["keyword", "HAVING"], + ["keyword", "IGNORE"], + ["keyword", "LITTLE"], + ["keyword", "MEMORY"], + ["keyword", "NO-GAP"], + ["keyword", "OCCURS"], + ["keyword", "OPTION"], + ["keyword", "PERSON"], + ["keyword", "PLACES"], + ["keyword", "PUBLIC"], + ["keyword", "REDUCE"], + ["keyword", "REPORT"], + ["keyword", "RESULT"], + ["keyword", "SINGLE"], + ["keyword", "SORTED"], + ["keyword", "SWITCH"], + ["keyword", "SYNTAX"], + ["keyword", "TARGET"], + ["keyword", "VALUES"], + ["keyword", "WRITER"], + ["keyword", "ASSERT"], + ["keyword", "BLOCKS"], + ["keyword", "BOUNDS"], + ["keyword", "BUFFER"], + ["keyword", "CHANGE"], + ["keyword", "COLUMN"], + ["keyword", "COMMIT"], + ["keyword", "CONCAT"], + ["keyword", "COPIES"], + ["keyword", "CREATE"], + ["keyword", "DDMMYY"], + ["keyword", "DEFINE"], + ["keyword", "ENDIAN"], + ["keyword", "ESCAPE"], + ["keyword", "EXPAND"], + ["keyword", "KERNEL"], + ["keyword", "LAYOUT"], + ["keyword", "LEGACY"], + ["keyword", "LEVELS"], + ["keyword", "MMDDYY"], + ["keyword", "NUMBER"], + ["keyword", "OUTPUT"], + ["keyword", "RANGES"], + ["keyword", "READER"], + ["keyword", "RETURN"], + ["keyword", "SCREEN"], + ["keyword", "SEARCH"], + ["keyword", "SELECT"], + ["keyword", "SHARED"], + ["keyword", "SOURCE"], + ["keyword", "STABLE"], + ["keyword", "STATIC"], + ["keyword", "SUBKEY"], + ["keyword", "SUFFIX"], + ["keyword", "TABLES"], + ["keyword", "UNWIND"], + ["keyword", "YYMMDD"], + ["keyword", "ASSIGN"], + ["keyword", "BACKUP"], + ["keyword", "BEFORE"], + ["keyword", "BINARY"], + ["keyword", "BIT-OR"], + ["keyword", "BLANKS"], + ["keyword", "CLIENT"], + ["keyword", "CODING"], + ["keyword", "COMMON"], + ["keyword", "DEMAND"], + ["keyword", "DYNPRO"], + ["keyword", "EXCEPT"], + ["keyword", "EXISTS"], + ["keyword", "EXPORT"], + ["keyword", "FIELDS"], + ["keyword", "GLOBAL"], + ["keyword", "GROUPS"], + ["keyword", "LENGTH"], + ["keyword", "LOCALE"], + ["keyword", "MEDIUM"], + ["keyword", "METHOD"], + ["keyword", "MODIFY"], + ["keyword", "NESTED"], + ["keyword", "OTHERS"], + ["keyword", "REJECT"], + ["keyword", "SCROLL"], + ["keyword", "SUPPLY"], + ["keyword", "SYMBOL"], + ["keyword", "ENDFOR"], + ["keyword", "STRLEN"], + ["keyword", "ALIGN"], + ["keyword", "BEGIN"], + ["keyword", "BOUND"], + ["keyword", "ENDAT"], + ["keyword", "ENTRY"], + ["keyword", "EVENT"], + ["keyword", "FINAL"], + ["keyword", "FLUSH"], + ["keyword", "GRANT"], + ["keyword", "INNER"], + ["keyword", "SHORT"], + ["keyword", "USING"], + ["keyword", "WRITE"], + ["keyword", "AFTER"], + ["keyword", "BLACK"], + ["keyword", "BLOCK"], + ["keyword", "CLOCK"], + ["keyword", "COLOR"], + ["keyword", "COUNT"], + ["keyword", "DUMMY"], + ["keyword", "EMPTY"], + ["keyword", "ENDDO"], + ["keyword", "ENDON"], + ["keyword", "GREEN"], + ["keyword", "INDEX"], + ["keyword", "INOUT"], + ["keyword", "LEAVE"], + ["keyword", "LEVEL"], + ["keyword", "LINES"], + ["keyword", "MODIF"], + ["keyword", "ORDER"], + ["keyword", "OUTER"], + ["keyword", "RANGE"], + ["keyword", "RESET"], + ["keyword", "RETRY"], + ["keyword", "RIGHT"], + ["keyword", "SMART"], + ["keyword", "SPLIT"], + ["keyword", "STYLE"], + ["keyword", "TABLE"], + ["keyword", "THROW"], + ["keyword", "UNDER"], + ["keyword", "UNTIL"], + ["keyword", "UPPER"], + ["keyword", "UTF-8"], + ["keyword", "WHERE"], + ["keyword", "ALIAS"], + ["keyword", "BLANK"], + ["keyword", "CLEAR"], + ["keyword", "CLOSE"], + ["keyword", "EXACT"], + ["keyword", "FETCH"], + ["keyword", "FIRST"], + ["keyword", "FOUND"], + ["keyword", "GROUP"], + ["keyword", "LLANG"], + ["keyword", "LOCAL"], + ["keyword", "OTHER"], + ["keyword", "REGEX"], + ["keyword", "SPOOL"], + ["keyword", "TITLE"], + ["keyword", "TYPES"], + ["keyword", "VALID"], + ["keyword", "WHILE"], + ["keyword", "ALPHA"], + ["keyword", "BOXED"], + ["keyword", "CATCH"], + ["keyword", "CHAIN"], + ["keyword", "CHECK"], + ["keyword", "CLASS"], + ["keyword", "COVER"], + ["keyword", "ENDIF"], + ["keyword", "EQUIV"], + ["keyword", "FIELD"], + ["keyword", "FLOOR"], + ["keyword", "FRAME"], + ["keyword", "INPUT"], + ["keyword", "LOWER"], + ["keyword", "MATCH"], + ["keyword", "NODES"], + ["keyword", "PAGES"], + ["keyword", "PRINT"], + ["keyword", "RAISE"], + ["keyword", "ROUND"], + ["keyword", "SHIFT"], + ["keyword", "SPACE"], + ["keyword", "SPOTS"], + ["keyword", "STAMP"], + ["keyword", "STATE"], + ["keyword", "TASKS"], + ["keyword", "TIMES"], + ["keyword", "TRMAC"], + ["keyword", "ULINE"], + ["keyword", "UNION"], + ["keyword", "VALUE"], + ["keyword", "WIDTH"], + ["keyword", "EQUAL"], + ["keyword", "LOG10"], + ["keyword", "TRUNC"], + ["keyword", "BLOB"], + ["keyword", "CASE"], + ["keyword", "CEIL"], + ["keyword", "CLOB"], + ["keyword", "COND"], + ["keyword", "EXIT"], + ["keyword", "FILE"], + ["keyword", "GAPS"], + ["keyword", "HOLD"], + ["keyword", "INCL"], + ["keyword", "INTO"], + ["keyword", "KEEP"], + ["keyword", "KEYS"], + ["keyword", "LAST"], + ["keyword", "LINE"], + ["keyword", "LONG"], + ["keyword", "LPAD"], + ["keyword", "MAIL"], + ["keyword", "MODE"], + ["keyword", "OPEN"], + ["keyword", "PINK"], + ["keyword", "READ"], + ["keyword", "ROWS"], + ["keyword", "TEST"], + ["keyword", "THEN"], + ["keyword", "ZERO"], + ["keyword", "AREA"], + ["keyword", "BACK"], + ["keyword", "BADI"], + ["keyword", "BYTE"], + ["keyword", "CAST"], + ["keyword", "EDIT"], + ["keyword", "EXEC"], + ["keyword", "FAIL"], + ["keyword", "FIND"], + ["keyword", "FKEQ"], + ["keyword", "FONT"], + ["keyword", "FREE"], + ["keyword", "GKEQ"], + ["keyword", "HIDE"], + ["keyword", "INIT"], + ["keyword", "ITNO"], + ["keyword", "LATE"], + ["keyword", "LOOP"], + ["keyword", "MAIN"], + ["keyword", "MARK"], + ["keyword", "MOVE"], + ["keyword", "NEXT"], + ["keyword", "NULL"], + ["keyword", "RISK"], + ["keyword", "ROLE"], + ["keyword", "UNIT"], + ["keyword", "WAIT"], + ["keyword", "ZONE"], + ["keyword", "BASE"], + ["keyword", "CALL"], + ["keyword", "CODE"], + ["keyword", "DATA"], + ["keyword", "DATE"], + ["keyword", "FKGE"], + ["keyword", "GKGE"], + ["keyword", "HIGH"], + ["keyword", "KIND"], + ["keyword", "LEFT"], + ["keyword", "LIST"], + ["keyword", "MASK"], + ["keyword", "MESH"], + ["keyword", "NAME"], + ["keyword", "NODE"], + ["keyword", "PACK"], + ["keyword", "PAGE"], + ["keyword", "POOL"], + ["keyword", "SEND"], + ["keyword", "SIGN"], + ["keyword", "SIZE"], + ["keyword", "SOME"], + ["keyword", "STOP"], + ["keyword", "TASK"], + ["keyword", "TEXT"], + ["keyword", "TIME"], + ["keyword", "USER"], + ["keyword", "VARY"], + ["keyword", "WITH"], + ["keyword", "WORD"], + ["keyword", "BLUE"], + ["keyword", "CONV"], + ["keyword", "COPY"], + ["keyword", "DEEP"], + ["keyword", "ELSE"], + ["keyword", "FORM"], + ["keyword", "FROM"], + ["keyword", "HINT"], + ["keyword", "ICON"], + ["keyword", "JOIN"], + ["keyword", "LIKE"], + ["keyword", "LOAD"], + ["keyword", "ONLY"], + ["keyword", "PART"], + ["keyword", "SCAN"], + ["keyword", "SKIP"], + ["keyword", "SORT"], + ["keyword", "TYPE"], + ["keyword", "UNIX"], + ["keyword", "VIEW"], + ["keyword", "WHEN"], + ["keyword", "WORK"], + ["keyword", "ACOS"], + ["keyword", "ASIN"], + ["keyword", "ATAN"], + ["keyword", "COSH"], + ["keyword", "EACH"], + ["keyword", "FRAC"], + ["keyword", "LESS"], + ["keyword", "RTTI"], + ["keyword", "SINH"], + ["keyword", "SQRT"], + ["keyword", "TANH"], + ["keyword", "AVG"], + ["keyword", "BIT"], + ["keyword", "DIV"], + ["keyword", "ISO"], + ["keyword", "LET"], + ["keyword", "OUT"], + ["keyword", "PAD"], + ["keyword", "SQL"], + ["keyword", "ALL"], + ["keyword", "CI_"], + ["keyword", "CPI"], + ["keyword", "END"], + ["keyword", "LOB"], + ["keyword", "LPI"], + ["keyword", "MAX"], + ["keyword", "MIN"], + ["keyword", "NEW"], + ["keyword", "OLE"], + ["keyword", "RUN"], + ["keyword", "SET"], + ["keyword", "?TO"], + ["keyword", "YES"], + ["keyword", "ABS"], + ["keyword", "ADD"], + ["keyword", "AND"], + ["keyword", "BIG"], + ["keyword", "FOR"], + ["keyword", "HDB"], + ["keyword", "JOB"], + ["keyword", "LOW"], + ["keyword", "NOT"], + ["keyword", "SAP"], + ["keyword", "TRY"], + ["keyword", "VIA"], + ["keyword", "XML"], + ["keyword", "ANY"], + ["keyword", "GET"], + ["keyword", "IDS"], + ["keyword", "KEY"], + ["keyword", "MOD"], + ["keyword", "OFF"], + ["keyword", "PUT"], + ["keyword", "RAW"], + ["keyword", "RED"], + ["keyword", "REF"], + ["keyword", "SUM"], + ["keyword", "TAB"], + ["keyword", "XSD"], + ["keyword", "CNT"], + ["keyword", "COS"], + ["keyword", "EXP"], + ["keyword", "LOG"], + ["keyword", "SIN"], + ["keyword", "TAN"], + ["keyword", "XOR"], + ["keyword", "AT"], + ["keyword", "CO"], + ["keyword", "CP"], + ["keyword", "DO"], + ["keyword", "GT"], + ["keyword", "ID"], + ["keyword", "IF"], + ["keyword", "NS"], + ["keyword", "OR"], + ["keyword", "BT"], + ["keyword", "CA"], + ["keyword", "CS"], + ["keyword", "GE"], + ["keyword", "NA"], + ["keyword", "NB"], + ["keyword", "EQ"], + ["keyword", "IN"], + ["keyword", "LT"], + ["keyword", "NE"], + ["keyword", "NO"], + ["keyword", "OF"], + ["keyword", "ON"], + ["keyword", "PF"], + ["keyword", "TO"], + ["keyword", "AS"], + ["keyword", "BY"], + ["keyword", "CN"], + ["keyword", "IS"], + ["keyword", "LE"], + ["keyword", "NP"], + ["keyword", "UP"], + ["keyword", "E"], + ["keyword", "I"], + ["keyword", "M"], + ["keyword", "O"], + ["keyword", "Z"], + ["keyword", "C"], + ["keyword", "X"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/number_feature.test b/docs/_style/prism-master/tests/languages/abap/number_feature.test new file mode 100644 index 0000000000..0c9556e708 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/number_feature.test @@ -0,0 +1,15 @@ +0 +42 +123456789 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "42"], + ["number", "123456789"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/operator_feature.test b/docs/_style/prism-master/tests/languages/abap/operator_feature.test new file mode 100644 index 0000000000..23cb4a0492 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/operator_feature.test @@ -0,0 +1,38 @@ +. ++ - +/ * ** +< > <= >= += ?= <> + +& && + +a-b +a~b +a->b +a=>b +a|b +a{b}c + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["operator", "+"], ["operator", "-"], + ["operator", "/"], ["operator", "*"], ["operator", "**"], + ["operator", "<"], ["operator", ">"], ["operator", "<="], ["operator", ">="], + ["operator", "="], ["operator", "?="], ["operator", "<>"], + + ["string-operator", "&"], ["string-operator", "&&"], + + "\r\n\r\na", ["token-operator", "-"], + "b\r\na", ["token-operator", "~"], + "b\r\na", ["token-operator", "->"], + "b\r\na", ["token-operator", "=>"], + "b\r\na", ["token-operator", "|"], + "b\r\na", ["token-operator", "{"], "b", ["token-operator", "}"], "c" +] + +---------------------------------------------------- + +Checks for operators, string-operators and token-operators. +The leading dot serves only because tests are trimmed. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/string-template_feature.test b/docs/_style/prism-master/tests/languages/abap/string-template_feature.test new file mode 100644 index 0000000000..7979fbefa0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/string-template_feature.test @@ -0,0 +1,17 @@ +|foobar| +|foo\|b\{a}r| +|foo { bar } baz| + +---------------------------------------------------- + +[ + ["token-operator", "|"], ["string-template", "foobar"], ["token-operator", "|"], + ["token-operator", "|"], ["string-template", "foo\\|b\\{a}r"], ["token-operator", "|"], + ["token-operator", "|"], ["string-template", "foo "], ["token-operator", "{"], + " bar ", + ["token-operator", "}"], ["string-template", " baz"], ["token-operator", "|"] +] + +---------------------------------------------------- + +Checks for string templates. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/abap/string_feature.test b/docs/_style/prism-master/tests/languages/abap/string_feature.test new file mode 100644 index 0000000000..808b02715c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/abap/string_feature.test @@ -0,0 +1,21 @@ +'' +'foo' +'foo\'bar' +`` +`foo` +`foo\`bar` + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "'foo'"], + ["string", "'foo\\'bar'"], + ["string", "``"], + ["string", "`foo`"], + ["string", "`foo\\`bar`"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/actionscript/keyword_feature.test b/docs/_style/prism-master/tests/languages/actionscript/keyword_feature.test new file mode 100644 index 0000000000..c41a8524e5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/actionscript/keyword_feature.test @@ -0,0 +1,71 @@ +as; break; case; catch; class; +const; default; delete; do; else; +extends; finally; for; function; if; +implements; import; in; instanceof; interface; +internal; is; native; new; null; +package; private; protected; public; return; +super; switch; this; throw; try; +typeof; use; var; void; while; +with; dynamic; each; final; get; +include; namespace; native; override; set; +static; + +---------------------------------------------------- + +[ + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "delete"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "finally"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "internal"], ["punctuation", ";"], + ["keyword", "is"], ["punctuation", ";"], + ["keyword", "native"], ["punctuation", ";"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "package"], ["punctuation", ";"], + ["keyword", "private"], ["punctuation", ";"], + ["keyword", "protected"], ["punctuation", ";"], + ["keyword", "public"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "super"], ["punctuation", ";"], + ["keyword", "switch"], ["punctuation", ";"], + ["keyword", "this"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "typeof"], ["punctuation", ";"], + ["keyword", "use"], ["punctuation", ";"], + ["keyword", "var"], ["punctuation", ";"], + ["keyword", "void"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "with"], ["punctuation", ";"], + ["keyword", "dynamic"], ["punctuation", ";"], + ["keyword", "each"], ["punctuation", ";"], + ["keyword", "final"], ["punctuation", ";"], + ["keyword", "get"], ["punctuation", ";"], + ["keyword", "include"], ["punctuation", ";"], + ["keyword", "namespace"], ["punctuation", ";"], + ["keyword", "native"], ["punctuation", ";"], + ["keyword", "override"], ["punctuation", ";"], + ["keyword", "set"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/actionscript/operator_feature.test b/docs/_style/prism-master/tests/languages/actionscript/operator_feature.test new file mode 100644 index 0000000000..14c007c75b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/actionscript/operator_feature.test @@ -0,0 +1,29 @@ ++ - * / % ^ ++= -= *= /= %= ^= +& && | || +&= &&= |= ||= +< << > >> >>> +<= <<= >= >>= >>>= +! != = == +!== === +~ ? @ +++ -- + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "^"], + ["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="], ["operator", "%="], ["operator", "^="], + ["operator", "&"], ["operator", "&&"], ["operator", "|"], ["operator", "||"], + ["operator", "&="], ["operator", "&&="], ["operator", "|="], ["operator", "||="], + ["operator", "<"], ["operator", "<<"], ["operator", ">"], ["operator", ">>"], ["operator", ">>>"], + ["operator", "<="], ["operator", "<<="], ["operator", ">="], ["operator", ">>="], ["operator", ">>>="], + ["operator", "!"], ["operator", "!="], ["operator", "="], ["operator", "=="], + ["operator", "!=="], ["operator", "==="], + ["operator", "~"], ["operator", "?"], ["operator", "@"], + ["operator", "++"], ["operator", "--"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/attr-name_feature.test b/docs/_style/prism-master/tests/languages/ada/attr-name_feature.test new file mode 100644 index 0000000000..c30a2f57d2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/attr-name_feature.test @@ -0,0 +1,13 @@ +Integer'Size +Character'Val + +---------------------------------------------------- + +[ + ["variable", "Integer"], ["attr-name", "'Size"], + ["variable", "Character"], ["attr-name", "'Val"] +] + +---------------------------------------------------- + +Checks for attributes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/boolean_feature.test b/docs/_style/prism-master/tests/languages/ada/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/char_feature.test b/docs/_style/prism-master/tests/languages/ada/char_feature.test new file mode 100644 index 0000000000..145f2cee8b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/char_feature.test @@ -0,0 +1,13 @@ +'f' +'A' + +---------------------------------------------------- + +[ + ["char", "'f'"], + ["char", "'A'"] +] + +---------------------------------------------------- + +Checks for chars. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/comment_feature.test b/docs/_style/prism-master/tests/languages/ada/comment_feature.test new file mode 100644 index 0000000000..adf3e0ce8c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/comment_feature.test @@ -0,0 +1,13 @@ +-- +-- Foo bar + +---------------------------------------------------- + +[ + ["comment", "--"], + ["comment", "-- Foo bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/keyword_feature.test b/docs/_style/prism-master/tests/languages/ada/keyword_feature.test new file mode 100644 index 0000000000..e5c815f22f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/keyword_feature.test @@ -0,0 +1,153 @@ +abort +abs +abstract +accept +access +aliased +all +and +array +at +begin +body +case +constant +declare +delay +delta +digits +do +else +new +return +elsif +end +entry +exception +exit +for +function +generic +goto +if +in +interface +is +limited +loop +mod +not +null +of +others +out +overriding +package +pragma +private +procedure +protected +raise +range +record +rem +renames +requeue +reverse +select +separate +some +subtype +synchronized +tagged +task +terminate +then +type +until +use +when +while +with +xor + +---------------------------------------------------- + +[ + ["keyword", "abort"], + ["keyword", "abs"], + ["keyword", "abstract"], + ["keyword", "accept"], + ["keyword", "access"], + ["keyword", "aliased"], + ["keyword", "all"], + ["keyword", "and"], + ["keyword", "array"], + ["keyword", "at"], + ["keyword", "begin"], + ["keyword", "body"], + ["keyword", "case"], + ["keyword", "constant"], + ["keyword", "declare"], + ["keyword", "delay"], + ["keyword", "delta"], + ["keyword", "digits"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "new"], + ["keyword", "return"], + ["keyword", "elsif"], + ["keyword", "end"], + ["keyword", "entry"], + ["keyword", "exception"], + ["keyword", "exit"], + ["keyword", "for"], + ["keyword", "function"], + ["keyword", "generic"], + ["keyword", "goto"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "interface"], + ["keyword", "is"], + ["keyword", "limited"], + ["keyword", "loop"], + ["keyword", "mod"], + ["keyword", "not"], + ["keyword", "null"], + ["keyword", "of"], + ["keyword", "others"], + ["keyword", "out"], + ["keyword", "overriding"], + ["keyword", "package"], + ["keyword", "pragma"], + ["keyword", "private"], + ["keyword", "procedure"], + ["keyword", "protected"], + ["keyword", "raise"], + ["keyword", "range"], + ["keyword", "record"], + ["keyword", "rem"], + ["keyword", "renames"], + ["keyword", "requeue"], + ["keyword", "reverse"], + ["keyword", "select"], + ["keyword", "separate"], + ["keyword", "some"], + ["keyword", "subtype"], + ["keyword", "synchronized"], + ["keyword", "tagged"], + ["keyword", "task"], + ["keyword", "terminate"], + ["keyword", "then"], + ["keyword", "type"], + ["keyword", "until"], + ["keyword", "use"], + ["keyword", "when"], + ["keyword", "while"], + ["keyword", "with"], + ["keyword", "xor"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/number_feature.test b/docs/_style/prism-master/tests/languages/ada/number_feature.test new file mode 100644 index 0000000000..a27f1af82c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/number_feature.test @@ -0,0 +1,21 @@ +42 +42_000 +3.14_15_9 +0.4E+123_456 +3.7e-7 +1_6#Bad_Face#E-32_1 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "42_000"], + ["number", "3.14_15_9"], + ["number", "0.4E+123_456"], + ["number", "3.7e-7"], + ["number", "1_6#Bad_Face#E-32_1"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/operator_feature.test b/docs/_style/prism-master/tests/languages/ada/operator_feature.test new file mode 100644 index 0000000000..21a313746d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/operator_feature.test @@ -0,0 +1,23 @@ +<> +=> := +< <= +> >= += /= +& + - +* ** / + +---------------------------------------------------- + +[ + ["operator", "<>"], + ["operator", "=>"], ["operator", ":="], + ["operator", "<"], ["operator", "<="], + ["operator", ">"], ["operator", ">="], + ["operator", "="], ["operator", "/="], + ["operator", "&"], ["operator", "+"], ["operator", "-"], + ["operator", "*"], ["operator", "**"], ["operator", "/"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/string_feature.test b/docs/_style/prism-master/tests/languages/ada/string_feature.test new file mode 100644 index 0000000000..c44e9cd017 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/string_feature.test @@ -0,0 +1,13 @@ +"" +"Foo""bar""" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"Foo\"\"bar\"\"\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ada/variable_feature.test b/docs/_style/prism-master/tests/languages/ada/variable_feature.test new file mode 100644 index 0000000000..f47a4fc494 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ada/variable_feature.test @@ -0,0 +1,13 @@ +Byte +foo_bar42 + +---------------------------------------------------- + +[ + ["variable", "Byte"], + ["variable", "foo_bar42"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/comment_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/comment_feature.test new file mode 100644 index 0000000000..bde22880ad --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/comment_feature.test @@ -0,0 +1,15 @@ +#foo +# bar +# Redirect 301 /2006/oldfile.html http://subdomain.domain.tld/newfile.html + +---------------------------------------------------- + +[ + ["comment", "#foo"], + ["comment", "# bar"], + ["comment", "# Redirect 301 /2006/oldfile.html http://subdomain.domain.tld/newfile.html"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/directive-block_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/directive-block_feature.test new file mode 100644 index 0000000000..1af6addd42 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/directive-block_feature.test @@ -0,0 +1,469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +---------------------------------------------------- + +[ + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "AuthnProviderAlias" + ]], + ["directive-block-parameter", [ + " file file2" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "AuthzProviderAlias" + ]], + ["directive-block-parameter", [ + " ldap-group ldap-group-alias1 ", + ["string", [ + "\"cn=my-group,o=ctx\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Directory" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"/webpages/secure\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "DirectoryMatch" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"^/www/(.+/)?[0-9]{3}\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Else" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "ElseIf" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"-R '10.0.0.0/8'\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Files" + ]], + ["directive-block-parameter", [ + " ~ ", + ["string", [ + "\"\\.(gif|jpe?g|png)$\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "FilesMatch" + ]], + ["directive-block-parameter", [ + ["string", [ + "\".+\\.(gif|jpe?g|png)$\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "If" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"-z req('Host')\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "IfDefine" + ]], + ["directive-block-parameter", [ + " !MemCache" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "IfModule" + ]], + ["directive-block-parameter", [ + " mod_rewrite.c" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "IfVersion" + ]], + ["directive-block-parameter", [ + " 2.1.0" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Limit" + ]], + ["directive-block-parameter", [ + " POST PUT DELETE" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "LimitExcept" + ]], + ["directive-block-parameter", [ + " POST GET" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Location" + ]], + ["directive-block-parameter", [ + " /private1" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "LocationMatch" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"/(extra|special)/data\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Macro" + ]], + ["directive-block-parameter", [ + " LocalAccessPolicy" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "Proxy" + ]], + ["directive-block-parameter", [ + ["string", [ + "\"*\"" + ]] + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "RequireAll" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "RequireAny" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "RequireNone" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]], + + ["directive-block", [ + ["directive-block", [ + ["punctuation", "<"], + "VirtualHost" + ]], + ["directive-block-parameter", [ + " [2001", + ["punctuation", ":"], + "db8", + ["punctuation", ":"], + ["punctuation", ":"], + "a00", + ["punctuation", ":"], + "20ff", + ["punctuation", ":"], + "fea7", + ["punctuation", ":"], + "ccea]", + ["punctuation", ":"], + "80" + ]], + ["punctuation", ">"] + ]], + ["directive-block", [ + ["directive-block", [ + ["punctuation", ""] + ]] +] + +---------------------------------------------------- + +Checks for directive blocks. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/directive-flags_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/directive-flags_feature.test new file mode 100644 index 0000000000..0bb206ecba --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/directive-flags_feature.test @@ -0,0 +1,13 @@ +[OR] +[L,QSA] + +---------------------------------------------------- + +[ + ["directive-flags", "[OR]"], + ["directive-flags", "[L,QSA]"] +] + +---------------------------------------------------- + +Checks for directive flags. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/directive-inline_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/directive-inline_feature.test new file mode 100644 index 0000000000..6b4df43b26 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/directive-inline_feature.test @@ -0,0 +1,1163 @@ +AcceptFilter +AcceptPathInfo +AccessFileName +Action +AddAlt +AddAltByEncoding +AddAltByType +AddCharset +AddDefaultCharset +AddDescription +AddEncoding +AddHandler +AddIcon +AddIconByEncoding +AddIconByType +AddInputFilter +AddLanguage +AddModuleInfo +AddOutputFilter +AddOutputFilterByType +AddType +Alias +AliasMatch +Allow +AllowCONNECT +AllowEncodedSlashes +AllowMethods +AllowOverride +AllowOverrideList +Anonymous +Anonymous_LogEmail +Anonymous_MustGiveEmail +Anonymous_NoUserID +Anonymous_VerifyEmail +AsyncRequestWorkerFactor +AuthBasicAuthoritative +AuthBasicFake +AuthBasicProvider +AuthBasicUseDigestAlgorithm +AuthDBDUserPWQuery +AuthDBDUserRealmQuery +AuthDBMGroupFile +AuthDBMType +AuthDBMUserFile +AuthDigestAlgorithm +AuthDigestDomain +AuthDigestNonceLifetime +AuthDigestProvider +AuthDigestQop +AuthDigestShmemSize +AuthFormAuthoritative +AuthFormBody +AuthFormDisableNoStore +AuthFormFakeBasicAuth +AuthFormLocation +AuthFormLoginRequiredLocation +AuthFormLoginSuccessLocation +AuthFormLogoutLocation +AuthFormMethod +AuthFormMimetype +AuthFormPassword +AuthFormProvider +AuthFormSitePassphrase +AuthFormSize +AuthFormUsername +AuthGroupFile +AuthLDAPAuthorizePrefix +AuthLDAPBindAuthoritative +AuthLDAPBindDN +AuthLDAPBindPassword +AuthLDAPCharsetConfig +AuthLDAPCompareAsUser +AuthLDAPCompareDNOnServer +AuthLDAPDereferenceAliases +AuthLDAPGroupAttribute +AuthLDAPGroupAttributeIsDN +AuthLDAPInitialBindAsUser +AuthLDAPInitialBindPattern +AuthLDAPMaxSubGroupDepth +AuthLDAPRemoteUserAttribute +AuthLDAPRemoteUserIsDN +AuthLDAPSearchAsUser +AuthLDAPSubGroupAttribute +AuthLDAPSubGroupClass +AuthLDAPUrl +AuthMerging +AuthName +AuthnCacheContext +AuthnCacheEnable +AuthnCacheProvideFor +AuthnCacheSOCache +AuthnCacheTimeout +AuthnzFcgiCheckAuthnProvider +AuthnzFcgiDefineProvider +AuthType +AuthUserFile +AuthzDBDLoginToReferer +AuthzDBDQuery +AuthzDBDRedirectQuery +AuthzDBMType +AuthzSendForbiddenOnFailure +BalancerGrowth +BalancerInherit +BalancerMember +BalancerPersist +BrowserMatch +BrowserMatchNoCase +BufferedLogs +BufferSize +CacheDefaultExpire +CacheDetailHeader +CacheDirLength +CacheDirLevels +CacheDisable +CacheEnable +CacheFile +CacheHeader +CacheIgnoreCacheControl +CacheIgnoreHeaders +CacheIgnoreNoLastMod +CacheIgnoreQueryString +CacheIgnoreURLSessionIdentifiers +CacheKeyBaseURL +CacheLastModifiedFactor +CacheLock +CacheLockMaxAge +CacheLockPath +CacheMaxExpire +CacheMaxFileSize +CacheMinExpire +CacheMinFileSize +CacheNegotiatedDocs +CacheQuickHandler +CacheReadSize +CacheReadTime +CacheRoot +CacheSocache +CacheSocacheMaxSize +CacheSocacheMaxTime +CacheSocacheMinTime +CacheSocacheReadSize +CacheSocacheReadTime +CacheStaleOnError +CacheStoreExpired +CacheStoreNoStore +CacheStorePrivate +CGIDScriptTimeout +CGIMapExtension +CharsetDefault +CharsetOptions +CharsetSourceEnc +CheckCaseOnly +CheckSpelling +ChrootDir +ContentDigest +CookieDomain +CookieExpires +CookieName +CookieStyle +CookieTracking +CoreDumpDirectory +CustomLog +Dav +DavDepthInfinity +DavGenericLockDB +DavLockDB +DavMinTimeout +DBDExptime +DBDInitSQL +DBDKeep +DBDMax +DBDMin +DBDParams +DBDPersist +DBDPrepareSQL +DBDriver +DefaultIcon +DefaultLanguage +DefaultRuntimeDir +DefaultType +Define +DeflateBufferSize +DeflateCompressionLevel +DeflateFilterNote +DeflateInflateLimitRequestBody +DeflateInflateRatioBurst +DeflateInflateRatioLimit +DeflateMemLevel +DeflateWindowSize +Deny +DirectoryCheckHandler +DirectoryIndex +DirectoryIndexRedirect +DirectorySlash +DocumentRoot +DTracePrivileges +DumpIOInput +DumpIOOutput +EnableExceptionHook +EnableMMAP +EnableSendfile +Error +ErrorDocument +ErrorLog +ErrorLogFormat +Example +ExpiresActive +ExpiresByType +ExpiresDefault +ExtendedStatus +ExtFilterDefine +ExtFilterOptions +FallbackResource +FileETag +FilterChain +FilterDeclare +FilterProtocol +FilterProvider +FilterTrace +ForceLanguagePriority +ForceType +ForensicLog +GprofDir +GracefulShutdownTimeout +Group +Header +HeaderName +HeartbeatAddress +HeartbeatListen +HeartbeatMaxServers +HeartbeatStorage +HeartbeatStorage +HostnameLookups +IdentityCheck +IdentityCheckTimeout +ImapBase +ImapDefault +ImapMenu +Include +IncludeOptional +IndexHeadInsert +IndexIgnore +IndexIgnoreReset +IndexOptions +IndexOrderDefault +IndexStyleSheet +InputSed +ISAPIAppendLogToErrors +ISAPIAppendLogToQuery +ISAPICacheFile +ISAPIFakeAsync +ISAPILogNotSupported +ISAPIReadAheadBuffer +KeepAlive +KeepAliveTimeout +KeptBodySize +LanguagePriority +LDAPCacheEntries +LDAPCacheTTL +LDAPConnectionPoolTTL +LDAPConnectionTimeout +LDAPLibraryDebug +LDAPOpCacheEntries +LDAPOpCacheTTL +LDAPReferralHopLimit +LDAPReferrals +LDAPRetries +LDAPRetryDelay +LDAPSharedCacheFile +LDAPSharedCacheSize +LDAPTimeout +LDAPTrustedClientCert +LDAPTrustedGlobalCert +LDAPTrustedMode +LDAPVerifyServerCert +LimitInternalRecursion +LimitRequestBody +LimitRequestFields +LimitRequestFieldSize +LimitRequestLine +LimitXMLRequestBody +Listen +ListenBackLog +LoadFile +LoadModule +LogFormat +LogLevel +LogMessage +LuaAuthzProvider +LuaCodeCache +LuaHookAccessChecker +LuaHookAuthChecker +LuaHookCheckUserID +LuaHookFixups +LuaHookInsertFilter +LuaHookLog +LuaHookMapToStorage +LuaHookTranslateName +LuaHookTypeChecker +LuaInherit +LuaInputFilter +LuaMapHandler +LuaOutputFilter +LuaPackageCPath +LuaPackagePath +LuaQuickHandler +LuaRoot +LuaScope +MaxConnectionsPerChild +MaxKeepAliveRequests +MaxMemFree +MaxRangeOverlaps +MaxRangeReversals +MaxRanges +MaxRequestWorkers +MaxSpareServers +MaxSpareThreads +MaxThreads +MergeTrailers +MetaDir +MetaFiles +MetaSuffix +MimeMagicFile +MinSpareServers +MinSpareThreads +MMapFile +ModemStandard +ModMimeUsePathInfo +MultiviewsMatch +Mutex +NameVirtualHost +NoProxy +NWSSLTrustedCerts +NWSSLUpgradeable +Options +Order +OutputSed +PassEnv +PidFile +PrivilegesMode +Protocol +ProtocolEcho +ProxyAddHeaders +ProxyBadHeader +ProxyBlock +ProxyDomain +ProxyErrorOverride +ProxyExpressDBMFile +ProxyExpressDBMType +ProxyExpressEnable +ProxyFtpDirCharset +ProxyFtpEscapeWildcards +ProxyFtpListOnWildcard +ProxyHTMLBufSize +ProxyHTMLCharsetOut +ProxyHTMLDocType +ProxyHTMLEnable +ProxyHTMLEvents +ProxyHTMLExtended +ProxyHTMLFixups +ProxyHTMLInterp +ProxyHTMLLinks +ProxyHTMLMeta +ProxyHTMLStripComments +ProxyHTMLURLMap +ProxyIOBufferSize +ProxyMaxForwards +ProxyPass +ProxyPassInherit +ProxyPassInterpolateEnv +ProxyPassMatch +ProxyPassReverse +ProxyPassReverseCookieDomain +ProxyPassReverseCookiePath +ProxyPreserveHost +ProxyReceiveBufferSize +ProxyRemote +ProxyRemoteMatch +ProxyRequests +ProxySCGIInternalRedirect +ProxySCGISendfile +ProxySet +ProxySourceAddress +ProxyStatus +ProxyTimeout +ProxyVia +ReadmeName +ReceiveBufferSize +Redirect +RedirectMatch +RedirectPermanent +RedirectTemp +ReflectorHeader +RemoteIPHeader +RemoteIPInternalProxy +RemoteIPInternalProxyList +RemoteIPProxiesHeader +RemoteIPTrustedProxy +RemoteIPTrustedProxyList +RemoveCharset +RemoveEncoding +RemoveHandler +RemoveInputFilter +RemoveLanguage +RemoveOutputFilter +RemoveType +RequestHeader +RequestReadTimeout +Require +RewriteBase +RewriteCond +RewriteEngine +RewriteMap +RewriteOptions +RewriteRule +RLimitCPU +RLimitMEM +RLimitNPROC +Satisfy +ScoreBoardFile +Script +ScriptAlias +ScriptAliasMatch +ScriptInterpreterSource +ScriptLog +ScriptLogBuffer +ScriptLogLength +ScriptSock +SecureListen +SeeRequestTail +SendBufferSize +ServerAdmin +ServerAlias +ServerLimit +ServerName +ServerPath +ServerRoot +ServerSignature +ServerTokens +Session +SessionCookieName +SessionCookieName2 +SessionCookieRemove +SessionCryptoCipher +SessionCryptoDriver +SessionCryptoPassphrase +SessionCryptoPassphraseFile +SessionDBDCookieName +SessionDBDCookieName2 +SessionDBDCookieRemove +SessionDBDDeleteLabel +SessionDBDInsertLabel +SessionDBDPerUser +SessionDBDSelectLabel +SessionDBDUpdateLabel +SessionEnv +SessionExclude +SessionHeader +SessionInclude +SessionMaxAge +SetEnv +SetEnvIf +SetEnvIfExpr +SetEnvIfNoCase +SetHandler +SetInputFilter +SetOutputFilter +SSIEndTag +SSIErrorMsg +SSIETag +SSILastModified +SSILegacyExprParser +SSIStartTag +SSITimeFormat +SSIUndefinedEcho +SSLCACertificateFile +SSLCACertificatePath +SSLCADNRequestFile +SSLCADNRequestPath +SSLCARevocationCheck +SSLCARevocationFile +SSLCARevocationPath +SSLCertificateChainFile +SSLCertificateFile +SSLCertificateKeyFile +SSLCipherSuite +SSLCompression +SSLCryptoDevice +SSLEngine +SSLFIPS +SSLHonorCipherOrder +SSLInsecureRenegotiation +SSLOCSPDefaultResponder +SSLOCSPEnable +SSLOCSPOverrideResponder +SSLOCSPResponderTimeout +SSLOCSPResponseMaxAge +SSLOCSPResponseTimeSkew +SSLOCSPUseRequestNonce +SSLOpenSSLConfCmd +SSLOptions +SSLPassPhraseDialog +SSLProtocol +SSLProxyCACertificateFile +SSLProxyCACertificatePath +SSLProxyCARevocationCheck +SSLProxyCARevocationFile +SSLProxyCARevocationPath +SSLProxyCheckPeerCN +SSLProxyCheckPeerExpire +SSLProxyCheckPeerName +SSLProxyCipherSuite +SSLProxyEngine +SSLProxyMachineCertificateChainFile +SSLProxyMachineCertificateFile +SSLProxyMachineCertificatePath +SSLProxyProtocol +SSLProxyVerify +SSLProxyVerifyDepth +SSLRandomSeed +SSLRenegBufferSize +SSLRequire +SSLRequireSSL +SSLSessionCache +SSLSessionCacheTimeout +SSLSessionTicketKeyFile +SSLSRPUnknownUserSeed +SSLSRPVerifierFile +SSLStaplingCache +SSLStaplingErrorCacheTimeout +SSLStaplingFakeTryLater +SSLStaplingForceURL +SSLStaplingResponderTimeout +SSLStaplingResponseMaxAge +SSLStaplingResponseTimeSkew +SSLStaplingReturnResponderErrors +SSLStaplingStandardCacheTimeout +SSLStrictSNIVHostCheck +SSLUserName +SSLUseStapling +SSLVerifyClient +SSLVerifyDepth +StartServers +StartThreads +Substitute +Suexec +SuexecUserGroup +ThreadLimit +ThreadsPerChild +ThreadStackSize +TimeOut +TraceEnable +TransferLog +TypesConfig +UnDefine +UndefMacro +UnsetEnv +Use +UseCanonicalName +UseCanonicalPhysicalPort +User +UserDir +VHostCGIMode +VHostCGIPrivs +VHostGroup +VHostPrivs +VHostSecure +VHostUser +VirtualDocumentRoot +VirtualDocumentRootIP +VirtualScriptAlias +VirtualScriptAliasIP +WatchdogInterval +XBitHack +xml2EncAlias +xml2EncDefault +xml2StartParse + +---------------------------------------------------- + +[ + ["directive-inline", "AcceptFilter"], + ["directive-inline", "AcceptPathInfo"], + ["directive-inline", "AccessFileName"], + ["directive-inline", "Action"], + ["directive-inline", "AddAlt"], + ["directive-inline", "AddAltByEncoding"], + ["directive-inline", "AddAltByType"], + ["directive-inline", "AddCharset"], + ["directive-inline", "AddDefaultCharset"], + ["directive-inline", "AddDescription"], + ["directive-inline", "AddEncoding"], + ["directive-inline", "AddHandler"], + ["directive-inline", "AddIcon"], + ["directive-inline", "AddIconByEncoding"], + ["directive-inline", "AddIconByType"], + ["directive-inline", "AddInputFilter"], + ["directive-inline", "AddLanguage"], + ["directive-inline", "AddModuleInfo"], + ["directive-inline", "AddOutputFilter"], + ["directive-inline", "AddOutputFilterByType"], + ["directive-inline", "AddType"], + ["directive-inline", "Alias"], + ["directive-inline", "AliasMatch"], + ["directive-inline", "Allow"], + ["directive-inline", "AllowCONNECT"], + ["directive-inline", "AllowEncodedSlashes"], + ["directive-inline", "AllowMethods"], + ["directive-inline", "AllowOverride"], + ["directive-inline", "AllowOverrideList"], + ["directive-inline", "Anonymous"], + ["directive-inline", "Anonymous_LogEmail"], + ["directive-inline", "Anonymous_MustGiveEmail"], + ["directive-inline", "Anonymous_NoUserID"], + ["directive-inline", "Anonymous_VerifyEmail"], + ["directive-inline", "AsyncRequestWorkerFactor"], + ["directive-inline", "AuthBasicAuthoritative"], + ["directive-inline", "AuthBasicFake"], + ["directive-inline", "AuthBasicProvider"], + ["directive-inline", "AuthBasicUseDigestAlgorithm"], + ["directive-inline", "AuthDBDUserPWQuery"], + ["directive-inline", "AuthDBDUserRealmQuery"], + ["directive-inline", "AuthDBMGroupFile"], + ["directive-inline", "AuthDBMType"], + ["directive-inline", "AuthDBMUserFile"], + ["directive-inline", "AuthDigestAlgorithm"], + ["directive-inline", "AuthDigestDomain"], + ["directive-inline", "AuthDigestNonceLifetime"], + ["directive-inline", "AuthDigestProvider"], + ["directive-inline", "AuthDigestQop"], + ["directive-inline", "AuthDigestShmemSize"], + ["directive-inline", "AuthFormAuthoritative"], + ["directive-inline", "AuthFormBody"], + ["directive-inline", "AuthFormDisableNoStore"], + ["directive-inline", "AuthFormFakeBasicAuth"], + ["directive-inline", "AuthFormLocation"], + ["directive-inline", "AuthFormLoginRequiredLocation"], + ["directive-inline", "AuthFormLoginSuccessLocation"], + ["directive-inline", "AuthFormLogoutLocation"], + ["directive-inline", "AuthFormMethod"], + ["directive-inline", "AuthFormMimetype"], + ["directive-inline", "AuthFormPassword"], + ["directive-inline", "AuthFormProvider"], + ["directive-inline", "AuthFormSitePassphrase"], + ["directive-inline", "AuthFormSize"], + ["directive-inline", "AuthFormUsername"], + ["directive-inline", "AuthGroupFile"], + ["directive-inline", "AuthLDAPAuthorizePrefix"], + ["directive-inline", "AuthLDAPBindAuthoritative"], + ["directive-inline", "AuthLDAPBindDN"], + ["directive-inline", "AuthLDAPBindPassword"], + ["directive-inline", "AuthLDAPCharsetConfig"], + ["directive-inline", "AuthLDAPCompareAsUser"], + ["directive-inline", "AuthLDAPCompareDNOnServer"], + ["directive-inline", "AuthLDAPDereferenceAliases"], + ["directive-inline", "AuthLDAPGroupAttribute"], + ["directive-inline", "AuthLDAPGroupAttributeIsDN"], + ["directive-inline", "AuthLDAPInitialBindAsUser"], + ["directive-inline", "AuthLDAPInitialBindPattern"], + ["directive-inline", "AuthLDAPMaxSubGroupDepth"], + ["directive-inline", "AuthLDAPRemoteUserAttribute"], + ["directive-inline", "AuthLDAPRemoteUserIsDN"], + ["directive-inline", "AuthLDAPSearchAsUser"], + ["directive-inline", "AuthLDAPSubGroupAttribute"], + ["directive-inline", "AuthLDAPSubGroupClass"], + ["directive-inline", "AuthLDAPUrl"], + ["directive-inline", "AuthMerging"], + ["directive-inline", "AuthName"], + ["directive-inline", "AuthnCacheContext"], + ["directive-inline", "AuthnCacheEnable"], + ["directive-inline", "AuthnCacheProvideFor"], + ["directive-inline", "AuthnCacheSOCache"], + ["directive-inline", "AuthnCacheTimeout"], + ["directive-inline", "AuthnzFcgiCheckAuthnProvider"], + ["directive-inline", "AuthnzFcgiDefineProvider"], + ["directive-inline", "AuthType"], + ["directive-inline", "AuthUserFile"], + ["directive-inline", "AuthzDBDLoginToReferer"], + ["directive-inline", "AuthzDBDQuery"], + ["directive-inline", "AuthzDBDRedirectQuery"], + ["directive-inline", "AuthzDBMType"], + ["directive-inline", "AuthzSendForbiddenOnFailure"], + ["directive-inline", "BalancerGrowth"], + ["directive-inline", "BalancerInherit"], + ["directive-inline", "BalancerMember"], + ["directive-inline", "BalancerPersist"], + ["directive-inline", "BrowserMatch"], + ["directive-inline", "BrowserMatchNoCase"], + ["directive-inline", "BufferedLogs"], + ["directive-inline", "BufferSize"], + ["directive-inline", "CacheDefaultExpire"], + ["directive-inline", "CacheDetailHeader"], + ["directive-inline", "CacheDirLength"], + ["directive-inline", "CacheDirLevels"], + ["directive-inline", "CacheDisable"], + ["directive-inline", "CacheEnable"], + ["directive-inline", "CacheFile"], + ["directive-inline", "CacheHeader"], + ["directive-inline", "CacheIgnoreCacheControl"], + ["directive-inline", "CacheIgnoreHeaders"], + ["directive-inline", "CacheIgnoreNoLastMod"], + ["directive-inline", "CacheIgnoreQueryString"], + ["directive-inline", "CacheIgnoreURLSessionIdentifiers"], + ["directive-inline", "CacheKeyBaseURL"], + ["directive-inline", "CacheLastModifiedFactor"], + ["directive-inline", "CacheLock"], + ["directive-inline", "CacheLockMaxAge"], + ["directive-inline", "CacheLockPath"], + ["directive-inline", "CacheMaxExpire"], + ["directive-inline", "CacheMaxFileSize"], + ["directive-inline", "CacheMinExpire"], + ["directive-inline", "CacheMinFileSize"], + ["directive-inline", "CacheNegotiatedDocs"], + ["directive-inline", "CacheQuickHandler"], + ["directive-inline", "CacheReadSize"], + ["directive-inline", "CacheReadTime"], + ["directive-inline", "CacheRoot"], + ["directive-inline", "CacheSocache"], + ["directive-inline", "CacheSocacheMaxSize"], + ["directive-inline", "CacheSocacheMaxTime"], + ["directive-inline", "CacheSocacheMinTime"], + ["directive-inline", "CacheSocacheReadSize"], + ["directive-inline", "CacheSocacheReadTime"], + ["directive-inline", "CacheStaleOnError"], + ["directive-inline", "CacheStoreExpired"], + ["directive-inline", "CacheStoreNoStore"], + ["directive-inline", "CacheStorePrivate"], + ["directive-inline", "CGIDScriptTimeout"], + ["directive-inline", "CGIMapExtension"], + ["directive-inline", "CharsetDefault"], + ["directive-inline", "CharsetOptions"], + ["directive-inline", "CharsetSourceEnc"], + ["directive-inline", "CheckCaseOnly"], + ["directive-inline", "CheckSpelling"], + ["directive-inline", "ChrootDir"], + ["directive-inline", "ContentDigest"], + ["directive-inline", "CookieDomain"], + ["directive-inline", "CookieExpires"], + ["directive-inline", "CookieName"], + ["directive-inline", "CookieStyle"], + ["directive-inline", "CookieTracking"], + ["directive-inline", "CoreDumpDirectory"], + ["directive-inline", "CustomLog"], + ["directive-inline", "Dav"], + ["directive-inline", "DavDepthInfinity"], + ["directive-inline", "DavGenericLockDB"], + ["directive-inline", "DavLockDB"], + ["directive-inline", "DavMinTimeout"], + ["directive-inline", "DBDExptime"], + ["directive-inline", "DBDInitSQL"], + ["directive-inline", "DBDKeep"], + ["directive-inline", "DBDMax"], + ["directive-inline", "DBDMin"], + ["directive-inline", "DBDParams"], + ["directive-inline", "DBDPersist"], + ["directive-inline", "DBDPrepareSQL"], + ["directive-inline", "DBDriver"], + ["directive-inline", "DefaultIcon"], + ["directive-inline", "DefaultLanguage"], + ["directive-inline", "DefaultRuntimeDir"], + ["directive-inline", "DefaultType"], + ["directive-inline", "Define"], + ["directive-inline", "DeflateBufferSize"], + ["directive-inline", "DeflateCompressionLevel"], + ["directive-inline", "DeflateFilterNote"], + ["directive-inline", "DeflateInflateLimitRequestBody"], + ["directive-inline", "DeflateInflateRatioBurst"], + ["directive-inline", "DeflateInflateRatioLimit"], + ["directive-inline", "DeflateMemLevel"], + ["directive-inline", "DeflateWindowSize"], + ["directive-inline", "Deny"], + ["directive-inline", "DirectoryCheckHandler"], + ["directive-inline", "DirectoryIndex"], + ["directive-inline", "DirectoryIndexRedirect"], + ["directive-inline", "DirectorySlash"], + ["directive-inline", "DocumentRoot"], + ["directive-inline", "DTracePrivileges"], + ["directive-inline", "DumpIOInput"], + ["directive-inline", "DumpIOOutput"], + ["directive-inline", "EnableExceptionHook"], + ["directive-inline", "EnableMMAP"], + ["directive-inline", "EnableSendfile"], + ["directive-inline", "Error"], + ["directive-inline", "ErrorDocument"], + ["directive-inline", "ErrorLog"], + ["directive-inline", "ErrorLogFormat"], + ["directive-inline", "Example"], + ["directive-inline", "ExpiresActive"], + ["directive-inline", "ExpiresByType"], + ["directive-inline", "ExpiresDefault"], + ["directive-inline", "ExtendedStatus"], + ["directive-inline", "ExtFilterDefine"], + ["directive-inline", "ExtFilterOptions"], + ["directive-inline", "FallbackResource"], + ["directive-inline", "FileETag"], + ["directive-inline", "FilterChain"], + ["directive-inline", "FilterDeclare"], + ["directive-inline", "FilterProtocol"], + ["directive-inline", "FilterProvider"], + ["directive-inline", "FilterTrace"], + ["directive-inline", "ForceLanguagePriority"], + ["directive-inline", "ForceType"], + ["directive-inline", "ForensicLog"], + ["directive-inline", "GprofDir"], + ["directive-inline", "GracefulShutdownTimeout"], + ["directive-inline", "Group"], + ["directive-inline", "Header"], + ["directive-inline", "HeaderName"], + ["directive-inline", "HeartbeatAddress"], + ["directive-inline", "HeartbeatListen"], + ["directive-inline", "HeartbeatMaxServers"], + ["directive-inline", "HeartbeatStorage"], + ["directive-inline", "HeartbeatStorage"], + ["directive-inline", "HostnameLookups"], + ["directive-inline", "IdentityCheck"], + ["directive-inline", "IdentityCheckTimeout"], + ["directive-inline", "ImapBase"], + ["directive-inline", "ImapDefault"], + ["directive-inline", "ImapMenu"], + ["directive-inline", "Include"], + ["directive-inline", "IncludeOptional"], + ["directive-inline", "IndexHeadInsert"], + ["directive-inline", "IndexIgnore"], + ["directive-inline", "IndexIgnoreReset"], + ["directive-inline", "IndexOptions"], + ["directive-inline", "IndexOrderDefault"], + ["directive-inline", "IndexStyleSheet"], + ["directive-inline", "InputSed"], + ["directive-inline", "ISAPIAppendLogToErrors"], + ["directive-inline", "ISAPIAppendLogToQuery"], + ["directive-inline", "ISAPICacheFile"], + ["directive-inline", "ISAPIFakeAsync"], + ["directive-inline", "ISAPILogNotSupported"], + ["directive-inline", "ISAPIReadAheadBuffer"], + ["directive-inline", "KeepAlive"], + ["directive-inline", "KeepAliveTimeout"], + ["directive-inline", "KeptBodySize"], + ["directive-inline", "LanguagePriority"], + ["directive-inline", "LDAPCacheEntries"], + ["directive-inline", "LDAPCacheTTL"], + ["directive-inline", "LDAPConnectionPoolTTL"], + ["directive-inline", "LDAPConnectionTimeout"], + ["directive-inline", "LDAPLibraryDebug"], + ["directive-inline", "LDAPOpCacheEntries"], + ["directive-inline", "LDAPOpCacheTTL"], + ["directive-inline", "LDAPReferralHopLimit"], + ["directive-inline", "LDAPReferrals"], + ["directive-inline", "LDAPRetries"], + ["directive-inline", "LDAPRetryDelay"], + ["directive-inline", "LDAPSharedCacheFile"], + ["directive-inline", "LDAPSharedCacheSize"], + ["directive-inline", "LDAPTimeout"], + ["directive-inline", "LDAPTrustedClientCert"], + ["directive-inline", "LDAPTrustedGlobalCert"], + ["directive-inline", "LDAPTrustedMode"], + ["directive-inline", "LDAPVerifyServerCert"], + ["directive-inline", "LimitInternalRecursion"], + ["directive-inline", "LimitRequestBody"], + ["directive-inline", "LimitRequestFields"], + ["directive-inline", "LimitRequestFieldSize"], + ["directive-inline", "LimitRequestLine"], + ["directive-inline", "LimitXMLRequestBody"], + ["directive-inline", "Listen"], + ["directive-inline", "ListenBackLog"], + ["directive-inline", "LoadFile"], + ["directive-inline", "LoadModule"], + ["directive-inline", "LogFormat"], + ["directive-inline", "LogLevel"], + ["directive-inline", "LogMessage"], + ["directive-inline", "LuaAuthzProvider"], + ["directive-inline", "LuaCodeCache"], + ["directive-inline", "LuaHookAccessChecker"], + ["directive-inline", "LuaHookAuthChecker"], + ["directive-inline", "LuaHookCheckUserID"], + ["directive-inline", "LuaHookFixups"], + ["directive-inline", "LuaHookInsertFilter"], + ["directive-inline", "LuaHookLog"], + ["directive-inline", "LuaHookMapToStorage"], + ["directive-inline", "LuaHookTranslateName"], + ["directive-inline", "LuaHookTypeChecker"], + ["directive-inline", "LuaInherit"], + ["directive-inline", "LuaInputFilter"], + ["directive-inline", "LuaMapHandler"], + ["directive-inline", "LuaOutputFilter"], + ["directive-inline", "LuaPackageCPath"], + ["directive-inline", "LuaPackagePath"], + ["directive-inline", "LuaQuickHandler"], + ["directive-inline", "LuaRoot"], + ["directive-inline", "LuaScope"], + ["directive-inline", "MaxConnectionsPerChild"], + ["directive-inline", "MaxKeepAliveRequests"], + ["directive-inline", "MaxMemFree"], + ["directive-inline", "MaxRangeOverlaps"], + ["directive-inline", "MaxRangeReversals"], + ["directive-inline", "MaxRanges"], + ["directive-inline", "MaxRequestWorkers"], + ["directive-inline", "MaxSpareServers"], + ["directive-inline", "MaxSpareThreads"], + ["directive-inline", "MaxThreads"], + ["directive-inline", "MergeTrailers"], + ["directive-inline", "MetaDir"], + ["directive-inline", "MetaFiles"], + ["directive-inline", "MetaSuffix"], + ["directive-inline", "MimeMagicFile"], + ["directive-inline", "MinSpareServers"], + ["directive-inline", "MinSpareThreads"], + ["directive-inline", "MMapFile"], + ["directive-inline", "ModemStandard"], + ["directive-inline", "ModMimeUsePathInfo"], + ["directive-inline", "MultiviewsMatch"], + ["directive-inline", "Mutex"], + ["directive-inline", "NameVirtualHost"], + ["directive-inline", "NoProxy"], + ["directive-inline", "NWSSLTrustedCerts"], + ["directive-inline", "NWSSLUpgradeable"], + ["directive-inline", "Options"], + ["directive-inline", "Order"], + ["directive-inline", "OutputSed"], + ["directive-inline", "PassEnv"], + ["directive-inline", "PidFile"], + ["directive-inline", "PrivilegesMode"], + ["directive-inline", "Protocol"], + ["directive-inline", "ProtocolEcho"], + ["directive-inline", "ProxyAddHeaders"], + ["directive-inline", "ProxyBadHeader"], + ["directive-inline", "ProxyBlock"], + ["directive-inline", "ProxyDomain"], + ["directive-inline", "ProxyErrorOverride"], + ["directive-inline", "ProxyExpressDBMFile"], + ["directive-inline", "ProxyExpressDBMType"], + ["directive-inline", "ProxyExpressEnable"], + ["directive-inline", "ProxyFtpDirCharset"], + ["directive-inline", "ProxyFtpEscapeWildcards"], + ["directive-inline", "ProxyFtpListOnWildcard"], + ["directive-inline", "ProxyHTMLBufSize"], + ["directive-inline", "ProxyHTMLCharsetOut"], + ["directive-inline", "ProxyHTMLDocType"], + ["directive-inline", "ProxyHTMLEnable"], + ["directive-inline", "ProxyHTMLEvents"], + ["directive-inline", "ProxyHTMLExtended"], + ["directive-inline", "ProxyHTMLFixups"], + ["directive-inline", "ProxyHTMLInterp"], + ["directive-inline", "ProxyHTMLLinks"], + ["directive-inline", "ProxyHTMLMeta"], + ["directive-inline", "ProxyHTMLStripComments"], + ["directive-inline", "ProxyHTMLURLMap"], + ["directive-inline", "ProxyIOBufferSize"], + ["directive-inline", "ProxyMaxForwards"], + ["directive-inline", "ProxyPass"], + ["directive-inline", "ProxyPassInherit"], + ["directive-inline", "ProxyPassInterpolateEnv"], + ["directive-inline", "ProxyPassMatch"], + ["directive-inline", "ProxyPassReverse"], + ["directive-inline", "ProxyPassReverseCookieDomain"], + ["directive-inline", "ProxyPassReverseCookiePath"], + ["directive-inline", "ProxyPreserveHost"], + ["directive-inline", "ProxyReceiveBufferSize"], + ["directive-inline", "ProxyRemote"], + ["directive-inline", "ProxyRemoteMatch"], + ["directive-inline", "ProxyRequests"], + ["directive-inline", "ProxySCGIInternalRedirect"], + ["directive-inline", "ProxySCGISendfile"], + ["directive-inline", "ProxySet"], + ["directive-inline", "ProxySourceAddress"], + ["directive-inline", "ProxyStatus"], + ["directive-inline", "ProxyTimeout"], + ["directive-inline", "ProxyVia"], + ["directive-inline", "ReadmeName"], + ["directive-inline", "ReceiveBufferSize"], + ["directive-inline", "Redirect"], + ["directive-inline", "RedirectMatch"], + ["directive-inline", "RedirectPermanent"], + ["directive-inline", "RedirectTemp"], + ["directive-inline", "ReflectorHeader"], + ["directive-inline", "RemoteIPHeader"], + ["directive-inline", "RemoteIPInternalProxy"], + ["directive-inline", "RemoteIPInternalProxyList"], + ["directive-inline", "RemoteIPProxiesHeader"], + ["directive-inline", "RemoteIPTrustedProxy"], + ["directive-inline", "RemoteIPTrustedProxyList"], + ["directive-inline", "RemoveCharset"], + ["directive-inline", "RemoveEncoding"], + ["directive-inline", "RemoveHandler"], + ["directive-inline", "RemoveInputFilter"], + ["directive-inline", "RemoveLanguage"], + ["directive-inline", "RemoveOutputFilter"], + ["directive-inline", "RemoveType"], + ["directive-inline", "RequestHeader"], + ["directive-inline", "RequestReadTimeout"], + ["directive-inline", "Require"], + ["directive-inline", "RewriteBase"], + ["directive-inline", "RewriteCond"], + ["directive-inline", "RewriteEngine"], + ["directive-inline", "RewriteMap"], + ["directive-inline", "RewriteOptions"], + ["directive-inline", "RewriteRule"], + ["directive-inline", "RLimitCPU"], + ["directive-inline", "RLimitMEM"], + ["directive-inline", "RLimitNPROC"], + ["directive-inline", "Satisfy"], + ["directive-inline", "ScoreBoardFile"], + ["directive-inline", "Script"], + ["directive-inline", "ScriptAlias"], + ["directive-inline", "ScriptAliasMatch"], + ["directive-inline", "ScriptInterpreterSource"], + ["directive-inline", "ScriptLog"], + ["directive-inline", "ScriptLogBuffer"], + ["directive-inline", "ScriptLogLength"], + ["directive-inline", "ScriptSock"], + ["directive-inline", "SecureListen"], + ["directive-inline", "SeeRequestTail"], + ["directive-inline", "SendBufferSize"], + ["directive-inline", "ServerAdmin"], + ["directive-inline", "ServerAlias"], + ["directive-inline", "ServerLimit"], + ["directive-inline", "ServerName"], + ["directive-inline", "ServerPath"], + ["directive-inline", "ServerRoot"], + ["directive-inline", "ServerSignature"], + ["directive-inline", "ServerTokens"], + ["directive-inline", "Session"], + ["directive-inline", "SessionCookieName"], + ["directive-inline", "SessionCookieName2"], + ["directive-inline", "SessionCookieRemove"], + ["directive-inline", "SessionCryptoCipher"], + ["directive-inline", "SessionCryptoDriver"], + ["directive-inline", "SessionCryptoPassphrase"], + ["directive-inline", "SessionCryptoPassphraseFile"], + ["directive-inline", "SessionDBDCookieName"], + ["directive-inline", "SessionDBDCookieName2"], + ["directive-inline", "SessionDBDCookieRemove"], + ["directive-inline", "SessionDBDDeleteLabel"], + ["directive-inline", "SessionDBDInsertLabel"], + ["directive-inline", "SessionDBDPerUser"], + ["directive-inline", "SessionDBDSelectLabel"], + ["directive-inline", "SessionDBDUpdateLabel"], + ["directive-inline", "SessionEnv"], + ["directive-inline", "SessionExclude"], + ["directive-inline", "SessionHeader"], + ["directive-inline", "SessionInclude"], + ["directive-inline", "SessionMaxAge"], + ["directive-inline", "SetEnv"], + ["directive-inline", "SetEnvIf"], + ["directive-inline", "SetEnvIfExpr"], + ["directive-inline", "SetEnvIfNoCase"], + ["directive-inline", "SetHandler"], + ["directive-inline", "SetInputFilter"], + ["directive-inline", "SetOutputFilter"], + ["directive-inline", "SSIEndTag"], + ["directive-inline", "SSIErrorMsg"], + ["directive-inline", "SSIETag"], + ["directive-inline", "SSILastModified"], + ["directive-inline", "SSILegacyExprParser"], + ["directive-inline", "SSIStartTag"], + ["directive-inline", "SSITimeFormat"], + ["directive-inline", "SSIUndefinedEcho"], + ["directive-inline", "SSLCACertificateFile"], + ["directive-inline", "SSLCACertificatePath"], + ["directive-inline", "SSLCADNRequestFile"], + ["directive-inline", "SSLCADNRequestPath"], + ["directive-inline", "SSLCARevocationCheck"], + ["directive-inline", "SSLCARevocationFile"], + ["directive-inline", "SSLCARevocationPath"], + ["directive-inline", "SSLCertificateChainFile"], + ["directive-inline", "SSLCertificateFile"], + ["directive-inline", "SSLCertificateKeyFile"], + ["directive-inline", "SSLCipherSuite"], + ["directive-inline", "SSLCompression"], + ["directive-inline", "SSLCryptoDevice"], + ["directive-inline", "SSLEngine"], + ["directive-inline", "SSLFIPS"], + ["directive-inline", "SSLHonorCipherOrder"], + ["directive-inline", "SSLInsecureRenegotiation"], + ["directive-inline", "SSLOCSPDefaultResponder"], + ["directive-inline", "SSLOCSPEnable"], + ["directive-inline", "SSLOCSPOverrideResponder"], + ["directive-inline", "SSLOCSPResponderTimeout"], + ["directive-inline", "SSLOCSPResponseMaxAge"], + ["directive-inline", "SSLOCSPResponseTimeSkew"], + ["directive-inline", "SSLOCSPUseRequestNonce"], + ["directive-inline", "SSLOpenSSLConfCmd"], + ["directive-inline", "SSLOptions"], + ["directive-inline", "SSLPassPhraseDialog"], + ["directive-inline", "SSLProtocol"], + ["directive-inline", "SSLProxyCACertificateFile"], + ["directive-inline", "SSLProxyCACertificatePath"], + ["directive-inline", "SSLProxyCARevocationCheck"], + ["directive-inline", "SSLProxyCARevocationFile"], + ["directive-inline", "SSLProxyCARevocationPath"], + ["directive-inline", "SSLProxyCheckPeerCN"], + ["directive-inline", "SSLProxyCheckPeerExpire"], + ["directive-inline", "SSLProxyCheckPeerName"], + ["directive-inline", "SSLProxyCipherSuite"], + ["directive-inline", "SSLProxyEngine"], + ["directive-inline", "SSLProxyMachineCertificateChainFile"], + ["directive-inline", "SSLProxyMachineCertificateFile"], + ["directive-inline", "SSLProxyMachineCertificatePath"], + ["directive-inline", "SSLProxyProtocol"], + ["directive-inline", "SSLProxyVerify"], + ["directive-inline", "SSLProxyVerifyDepth"], + ["directive-inline", "SSLRandomSeed"], + ["directive-inline", "SSLRenegBufferSize"], + ["directive-inline", "SSLRequire"], + ["directive-inline", "SSLRequireSSL"], + ["directive-inline", "SSLSessionCache"], + ["directive-inline", "SSLSessionCacheTimeout"], + ["directive-inline", "SSLSessionTicketKeyFile"], + ["directive-inline", "SSLSRPUnknownUserSeed"], + ["directive-inline", "SSLSRPVerifierFile"], + ["directive-inline", "SSLStaplingCache"], + ["directive-inline", "SSLStaplingErrorCacheTimeout"], + ["directive-inline", "SSLStaplingFakeTryLater"], + ["directive-inline", "SSLStaplingForceURL"], + ["directive-inline", "SSLStaplingResponderTimeout"], + ["directive-inline", "SSLStaplingResponseMaxAge"], + ["directive-inline", "SSLStaplingResponseTimeSkew"], + ["directive-inline", "SSLStaplingReturnResponderErrors"], + ["directive-inline", "SSLStaplingStandardCacheTimeout"], + ["directive-inline", "SSLStrictSNIVHostCheck"], + ["directive-inline", "SSLUserName"], + ["directive-inline", "SSLUseStapling"], + ["directive-inline", "SSLVerifyClient"], + ["directive-inline", "SSLVerifyDepth"], + ["directive-inline", "StartServers"], + ["directive-inline", "StartThreads"], + ["directive-inline", "Substitute"], + ["directive-inline", "Suexec"], + ["directive-inline", "SuexecUserGroup"], + ["directive-inline", "ThreadLimit"], + ["directive-inline", "ThreadsPerChild"], + ["directive-inline", "ThreadStackSize"], + ["directive-inline", "TimeOut"], + ["directive-inline", "TraceEnable"], + ["directive-inline", "TransferLog"], + ["directive-inline", "TypesConfig"], + ["directive-inline", "UnDefine"], + ["directive-inline", "UndefMacro"], + ["directive-inline", "UnsetEnv"], + ["directive-inline", "Use"], + ["directive-inline", "UseCanonicalName"], + ["directive-inline", "UseCanonicalPhysicalPort"], + ["directive-inline", "User"], + ["directive-inline", "UserDir"], + ["directive-inline", "VHostCGIMode"], + ["directive-inline", "VHostCGIPrivs"], + ["directive-inline", "VHostGroup"], + ["directive-inline", "VHostPrivs"], + ["directive-inline", "VHostSecure"], + ["directive-inline", "VHostUser"], + ["directive-inline", "VirtualDocumentRoot"], + ["directive-inline", "VirtualDocumentRootIP"], + ["directive-inline", "VirtualScriptAlias"], + ["directive-inline", "VirtualScriptAliasIP"], + ["directive-inline", "WatchdogInterval"], + ["directive-inline", "XBitHack"], + ["directive-inline", "xml2EncAlias"], + ["directive-inline", "xml2EncDefault"], + ["directive-inline", "xml2StartParse"] +] + +---------------------------------------------------- + +Checks for all inline directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/regex_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/regex_feature.test new file mode 100644 index 0000000000..322e59f543 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/regex_feature.test @@ -0,0 +1,15 @@ +^(.*)$ +^foo +bar$ + +---------------------------------------------------- + +[ + ["regex", "^(.*)$"], + ["regex", "^foo"], + ["regex", "bar$"] +] + +---------------------------------------------------- + +Checks for regex. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/string_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/string_feature.test new file mode 100644 index 0000000000..d2849caf0b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/string_feature.test @@ -0,0 +1,24 @@ +"foo bar" +'foo bar' +"%{REMOTE_HOST}" + +---------------------------------------------------- + +[ + ["string", [ + "\"foo bar\"" + ]], + ["string", [ + "'foo bar'" + ]], + ["string", [ + "\"", + ["variable", "%{REMOTE_HOST}"], + "\"" + ]] +] + +---------------------------------------------------- + +Checks for strings. +Also checks for variables inside strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apacheconf/variable_feature.test b/docs/_style/prism-master/tests/languages/apacheconf/variable_feature.test new file mode 100644 index 0000000000..025fe75b7a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apacheconf/variable_feature.test @@ -0,0 +1,15 @@ +$port +${docroot} +%{REMOTE_HOST} + +---------------------------------------------------- + +[ + ["variable", "$port"], + ["variable", "${docroot}"], + ["variable", "%{REMOTE_HOST}"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/assignment_feature.test b/docs/_style/prism-master/tests/languages/apl/assignment_feature.test new file mode 100644 index 0000000000..b06cb39b2b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/assignment_feature.test @@ -0,0 +1,13 @@ +a←1 2 3 + +---------------------------------------------------- + +[ + "a", + ["assignment", "←"], + ["number", "1"], ["number", "2"], ["number", "3"] +] + +---------------------------------------------------- + +Checks for assignment. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/comment_feature.test b/docs/_style/prism-master/tests/languages/apl/comment_feature.test new file mode 100644 index 0000000000..a308451082 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/comment_feature.test @@ -0,0 +1,15 @@ +⍝ +⍝ Foobar +#!/usr/bin/env runapl + +---------------------------------------------------- + +[ + ["comment", "⍝"], + ["comment", "⍝ Foobar"], + ["comment", "#!/usr/bin/env runapl"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/constant_feature.test b/docs/_style/prism-master/tests/languages/apl/constant_feature.test new file mode 100644 index 0000000000..9f63162626 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/constant_feature.test @@ -0,0 +1,19 @@ +⍬ +⌾ +# +⎕ +⍞ + +---------------------------------------------------- + +[ + ["constant", "⍬"], + ["constant", "⌾"], + ["constant", "#"], + ["constant", "⎕"], + ["constant", "⍞"] +] + +---------------------------------------------------- + +Checks for constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/dfn_feature.test b/docs/_style/prism-master/tests/languages/apl/dfn_feature.test new file mode 100644 index 0000000000..ef4be35c77 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/dfn_feature.test @@ -0,0 +1,23 @@ +{0=⍴⍴⍺:'hello' ⋄ ∇¨⍵} + +---------------------------------------------------- + +[ + ["dfn", "{"], + ["number", "0"], + ["function", "="], + ["function", "⍴"], + ["function", "⍴"], + ["dfn", "⍺"], + ["dfn", ":"], + ["string", "'hello'"], + ["punctuation", "⋄"], + ["dfn", "∇"], + ["monadic-operator", "¨"], + ["dfn", "⍵"], + ["dfn", "}"] +] + +---------------------------------------------------- + +Checks for Dfns. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/dyadic-operator_feature.test b/docs/_style/prism-master/tests/languages/apl/dyadic-operator_feature.test new file mode 100644 index 0000000000..bd141edef6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/dyadic-operator_feature.test @@ -0,0 +1,15 @@ +. ⍣ ⍠ +⍤ ∘ ⌸ +@ ⌺ + +---------------------------------------------------- + +[ + ["dyadic-operator", "."], ["dyadic-operator", "⍣"], ["dyadic-operator", "⍠"], + ["dyadic-operator", "⍤"], ["dyadic-operator", "∘"], ["dyadic-operator", "⌸"], + ["dyadic-operator", "@"], ["dyadic-operator", "⌺"] +] + +---------------------------------------------------- + +Checks for dyadic operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/function_feature.test b/docs/_style/prism-master/tests/languages/apl/function_feature.test new file mode 100644 index 0000000000..b926e51ef6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/function_feature.test @@ -0,0 +1,43 @@ +- + × ÷ +⌈ ⌊ ∣ | +⍳ ⍸ ? * +⍟ ○ ! ⌹ +< ≤ = > +≥ ≠ ≡ ≢ +∊ ⍷ ∪ ∩ +~ ∨ ∧ ⍱ +⍲ ⍴ , ⍪ +⌽ ⊖ ⍉ +↑ ↓ ⊂ ⊃ +⊆ ⊇ +⌷ ⍋ ⍒ +⊤ ⊥ ⍕ ⍎ +⊣ ⊢ ⍁ ⍂ +≈ ⍯ +↗ ¤ → + +---------------------------------------------------- + +[ + ["function", "-"], ["function", "+"], ["function", "×"], ["function", "÷"], + ["function", "⌈"], ["function", "⌊"], ["function", "∣"], ["function", "|"], + ["function", "⍳"], ["function", "⍸"], ["function", "?"], ["function", "*"], + ["function", "⍟"], ["function", "○"], ["function", "!"], ["function", "⌹"], + ["function", "<"], ["function", "≤"], ["function", "="], ["function", ">"], + ["function", "≥"], ["function", "≠"], ["function", "≡"], ["function", "≢"], + ["function", "∊"], ["function", "⍷"], ["function", "∪"], ["function", "∩"], + ["function", "~"], ["function", "∨"], ["function", "∧"], ["function", "⍱"], + ["function", "⍲"], ["function", "⍴"], ["function", ","], ["function", "⍪"], + ["function", "⌽"], ["function", "⊖"], ["function", "⍉"], + ["function", "↑"], ["function", "↓"], ["function", "⊂"], ["function", "⊃"], + ["function", "⊆"], ["function", "⊇"], + ["function", "⌷"], ["function", "⍋"], ["function", "⍒"], + ["function", "⊤"], ["function", "⊥"], ["function", "⍕"], ["function", "⍎"], + ["function", "⊣"], ["function", "⊢"], ["function", "⍁"], ["function", "⍂"], + ["function", "≈"], ["function", "⍯"], + ["function", "↗"], ["function", "¤"], ["function", "→"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/monadic-operator_feature.test b/docs/_style/prism-master/tests/languages/apl/monadic-operator_feature.test new file mode 100644 index 0000000000..0dcc9b088c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/monadic-operator_feature.test @@ -0,0 +1,15 @@ +\ / ⌿ ⍀ +¨ ⍨ ⌶ +& ∥ + +---------------------------------------------------- + +[ + ["monadic-operator", "\\"], ["monadic-operator", "/"], ["monadic-operator", "⌿"], ["monadic-operator", "⍀"], + ["monadic-operator", "¨"], ["monadic-operator", "⍨"], ["monadic-operator", "⌶"], + ["monadic-operator", "&"], ["monadic-operator", "∥"] +] + +---------------------------------------------------- + +Checks for monadic operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/number_feature.test b/docs/_style/prism-master/tests/languages/apl/number_feature.test new file mode 100644 index 0000000000..815d1ca8b0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/number_feature.test @@ -0,0 +1,27 @@ +42 +3.14159 +¯2 +∞ +3E12 +2.8e¯4 +0.1e+7 +2j3 +¯4.3e2J1.9e¯4 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "¯2"], + ["number", "∞"], + ["number", "3E12"], + ["number", "2.8e¯4"], + ["number", "0.1e+7"], + ["number", "2j3"], + ["number", "¯4.3e2J1.9e¯4"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/statement_feature.test b/docs/_style/prism-master/tests/languages/apl/statement_feature.test new file mode 100644 index 0000000000..24c68744e1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/statement_feature.test @@ -0,0 +1,13 @@ +:Ab +:FooBar + +---------------------------------------------------- + +[ + ["statement", ":Ab"], + ["statement", ":FooBar"] +] + +---------------------------------------------------- + +Checks for statements. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/string_feature.test b/docs/_style/prism-master/tests/languages/apl/string_feature.test new file mode 100644 index 0000000000..8bc8dd1bbf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/string_feature.test @@ -0,0 +1,15 @@ +'' +'foobar' +'fo''obar' + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "'foobar'"], + ["string", "'fo''obar'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/apl/system-function_feature.test b/docs/_style/prism-master/tests/languages/apl/system-function_feature.test new file mode 100644 index 0000000000..81cbcaa111 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/apl/system-function_feature.test @@ -0,0 +1,17 @@ +⎕IO +⎕WA +⎕CR +⎕TCNL + +---------------------------------------------------- + +[ + ["system-function", "⎕IO"], + ["system-function", "⎕WA"], + ["system-function", "⎕CR"], + ["system-function", "⎕TCNL"] +] + +---------------------------------------------------- + +Checks for system functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/class_feature.test b/docs/_style/prism-master/tests/languages/applescript/class_feature.test new file mode 100644 index 0000000000..547906deab --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/class_feature.test @@ -0,0 +1,39 @@ +alias application boolean class constant +date file integer list number +POSIX file +real record reference +RGB color +script text centimetres centimeters feet +inches kilometres kilometers metres meters +miles yards +square feet square kilometres square kilometers square metres +square meters square miles square yards +cubic centimetres cubic centimeters cubic feet cubic inches +cubic metres cubic meters cubic yards +gallons litres liters quarts grams +kilograms ounces pounds +degrees Celsius degrees Fahrenheit degrees Kelvin + +---------------------------------------------------- + +[ + ["class", "alias"], ["class", "application"], ["class", "boolean"], ["class", "class"], ["class", "constant"], + ["class", "date"], ["class", "file"], ["class", "integer"], ["class", "list"], ["class", "number"], + ["class", "POSIX file"], + ["class", "real"], ["class", "record"], ["class", "reference"], + ["class", "RGB color"], + ["class", "script"], ["class", "text"], ["class", "centimetres"], ["class", "centimeters"], ["class", "feet"], + ["class", "inches"], ["class", "kilometres"], ["class", "kilometers"], ["class", "metres"], ["class", "meters"], + ["class", "miles"], ["class", "yards"], + ["class", "square feet"], ["class", "square kilometres"], ["class", "square kilometers"], ["class", "square metres"], + ["class", "square meters"], ["class", "square miles"], ["class", "square yards"], + ["class", "cubic centimetres"], ["class", "cubic centimeters"], ["class", "cubic feet"], ["class", "cubic inches"], + ["class", "cubic metres"], ["class", "cubic meters"], ["class", "cubic yards"], + ["class", "gallons"], ["class", "litres"], ["class", "liters"], ["class", "quarts"], ["class", "grams"], + ["class", "kilograms"], ["class", "ounces"], ["class", "pounds"], + ["class", "degrees Celsius"], ["class", "degrees Fahrenheit"], ["class", "degrees Kelvin"] +] + +---------------------------------------------------- + +Checks for all classes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/comment_feature.test b/docs/_style/prism-master/tests/languages/applescript/comment_feature.test new file mode 100644 index 0000000000..d823ba429a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/comment_feature.test @@ -0,0 +1,21 @@ +-- foo bar +# foo bar +(* foo +bar *) +(* foo +(* bar *) +*) + +---------------------------------------------------- + +[ + ["comment", "-- foo bar"], + ["comment", "# foo bar"], + ["comment", "(* foo\r\nbar *)"], + ["comment", "(* foo\r\n(* bar *)\r\n*)"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. +Also checks for one level of nesting. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/keyword_feature.test b/docs/_style/prism-master/tests/languages/applescript/keyword_feature.test new file mode 100644 index 0000000000..bde63a16c1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/keyword_feature.test @@ -0,0 +1,59 @@ +about above after against +apart from +around +aside from +at back before beginning behind below +beneath beside between but by +considering continue copy +does eighth else end +equal error every exit +false fifth first for fourth +from front get given global +if ignoring in +instead of +into is it its last +local me middle my +ninth of on onto +out of +over prop property put +repeat return returning +second set seventh since sixth +some tell tenth that the +then third through thru timeout +times to transaction true try +until where while whose with +without + +---------------------------------------------------- + +[ + ["keyword", "about"], ["keyword", "above"], ["keyword", "after"], ["keyword", "against"], + ["keyword", "apart from"], + ["keyword", "around"], + ["keyword", "aside from"], + ["keyword", "at"], ["keyword", "back"], ["keyword", "before"], ["keyword", "beginning"], ["keyword", "behind"], ["keyword", "below"], + ["keyword", "beneath"], ["keyword", "beside"], ["keyword", "between"], ["keyword", "but"], ["keyword", "by"], + ["keyword", "considering"], ["keyword", "continue"], ["keyword", "copy"], + ["keyword", "does"], ["keyword", "eighth"], ["keyword", "else"], ["keyword", "end"], + ["keyword", "equal"], ["keyword", "error"], ["keyword", "every"], ["keyword", "exit"], + ["keyword", "false"], ["keyword", "fifth"], ["keyword", "first"], ["keyword", "for"], ["keyword", "fourth"], + ["keyword", "from"], ["keyword", "front"], ["keyword", "get"], ["keyword", "given"], ["keyword", "global"], + ["keyword", "if"], ["keyword", "ignoring"], ["keyword", "in"], + ["keyword", "instead of"], + ["keyword", "into"], ["keyword", "is"], ["keyword", "it"], ["keyword", "its"], ["keyword", "last"], + ["keyword", "local"], ["keyword", "me"], ["keyword", "middle"], ["keyword", "my"], + ["keyword", "ninth"], ["keyword", "of"], ["keyword", "on"], ["keyword", "onto"], + ["keyword", "out of"], + ["keyword", "over"], ["keyword", "prop"], ["keyword", "property"], ["keyword", "put"], + ["keyword", "repeat"], ["keyword", "return"], ["keyword", "returning"], + ["keyword", "second"], ["keyword", "set"], ["keyword", "seventh"], ["keyword", "since"], ["keyword", "sixth"], + ["keyword", "some"], ["keyword", "tell"], ["keyword", "tenth"], ["keyword", "that"], ["keyword", "the"], + ["keyword", "then"], ["keyword", "third"], ["keyword", "through"], ["keyword", "thru"], ["keyword", "timeout"], + ["keyword", "times"], ["keyword", "to"], ["keyword", "transaction"], ["keyword", "true"], ["keyword", "try"], + ["keyword", "until"], ["keyword", "where"], ["keyword", "while"], ["keyword", "whose"], ["keyword", "with"], + ["keyword", "without"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/number_feature.test b/docs/_style/prism-master/tests/languages/applescript/number_feature.test new file mode 100644 index 0000000000..96eb6f2862 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/number_feature.test @@ -0,0 +1,17 @@ +42 +3.14159 +3e10 +4.2E-5 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "3e10"], + ["number", "4.2E-5"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/operator_feature.test b/docs/_style/prism-master/tests/languages/applescript/operator_feature.test new file mode 100644 index 0000000000..fb4acf4dbe --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/operator_feature.test @@ -0,0 +1,48 @@ +& = ≠ ≤ ≥ +* + - / ÷ ^ +< <= > >= + +start with begin with end with +starts with begins with ends with +does not contain doesn't contain +contain contains +is in isn't in is not in +is contained by isn't contained by is not contained by +greater than greater than or equal greater than or equal to +less than less than or equal less than or equal to +does not come before doesn't come before comes before +does not come after doesn't come after comes after +is equal isn't equal is not equal +is equal to isn't equal to is not equal to +does not equal doesn't equal equals +isn't is not +ref a ref to a reference to +and or div mod as not + +---------------------------------------------------- + +[ + ["operator", "&"], ["operator", "="], ["operator", "≠"], ["operator", "≤"], ["operator", "≥"], + ["operator", "*"], ["operator", "+"], ["operator", "-"], ["operator", "/"], ["operator", "÷"], ["operator", "^"], + ["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="], + ["operator", "start with"], ["operator", "begin with"], ["operator", "end with"], + ["operator", "starts with"], ["operator", "begins with"], ["operator", "ends with"], + ["operator", "does not contain"], ["operator", "doesn't contain"], + ["operator", "contain"], ["operator", "contains"], + ["operator", "is in"], ["operator", "isn't in"], ["operator", "is not in"], + ["operator", "is contained by"], ["operator", "isn't contained by"], ["operator", "is not contained by"], + ["operator", "greater than"], ["operator", "greater than or equal"], ["operator", "greater than or equal to"], + ["operator", "less than"], ["operator", "less than or equal"], ["operator", "less than or equal to"], + ["operator", "does not come before"], ["operator", "doesn't come before"], ["operator", "comes before"], + ["operator", "does not come after"], ["operator", "doesn't come after"], ["operator", "comes after"], + ["operator", "is equal"], ["operator", "isn't equal"], ["operator", "is not equal"], + ["operator", "is equal to"], ["operator", "isn't equal to"], ["operator", "is not equal to"], + ["operator", "does not equal"], ["operator", "doesn't equal"], ["operator", "equals"], + ["operator", "isn't"], ["operator", "is not"], + ["operator", "ref"], ["operator", "a ref to"], ["operator", "a reference to"], + ["operator", "and"], ["operator", "or"], ["operator", "div"], ["operator", "mod"], ["operator", "as"], ["operator", "not"] +] + +---------------------------------------------------- + +Checks for most of the operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/applescript/string_feature.test b/docs/_style/prism-master/tests/languages/applescript/string_feature.test new file mode 100644 index 0000000000..42770f6156 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/applescript/string_feature.test @@ -0,0 +1,13 @@ +"" +"foo bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/arff/comment_feature.test b/docs/_style/prism-master/tests/languages/arff/comment_feature.test new file mode 100644 index 0000000000..4d53a8e1b9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/arff/comment_feature.test @@ -0,0 +1,15 @@ +% +% Some comment +% Comment " with ' quotes + +---------------------------------------------------- + +[ + ["comment", "%"], + ["comment", "% Some comment"], + ["comment", "% Comment \" with ' quotes"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/arff/keyword_feature.test b/docs/_style/prism-master/tests/languages/arff/keyword_feature.test new file mode 100644 index 0000000000..b1c98169ef --- /dev/null +++ b/docs/_style/prism-master/tests/languages/arff/keyword_feature.test @@ -0,0 +1,17 @@ +@attribute +@data +@end +@relation + +---------------------------------------------------- + +[ + ["keyword", "@attribute"], + ["keyword", "@data"], + ["keyword", "@end"], + ["keyword", "@relation"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/arff/number_feature.test b/docs/_style/prism-master/tests/languages/arff/number_feature.test new file mode 100644 index 0000000000..99969b4de9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/arff/number_feature.test @@ -0,0 +1,13 @@ +42 +0.14 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0.14"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/arff/string_feature.test b/docs/_style/prism-master/tests/languages/arff/string_feature.test new file mode 100644 index 0000000000..c3178f17b1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/arff/string_feature.test @@ -0,0 +1,13 @@ +"double quoted\"' % string" +'single quoted"\' % string' + +---------------------------------------------------- + +[ + ["string", "\"double quoted\\\"' % string\""], + ["string", "'single quoted\"\\' % string'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/admonition_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/admonition_feature.test new file mode 100644 index 0000000000..6b1688f59b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/admonition_feature.test @@ -0,0 +1,19 @@ +TIP: Foobar +NOTE: Foo bar baz +IMPORTANT: Foobar +WARNING: Foo bar baz +CAUTION: Foobar + +---------------------------------------------------- + +[ + ["admonition", "TIP:"], " Foobar\r\n", + ["admonition", "NOTE:"], " Foo bar baz\r\n", + ["admonition", "IMPORTANT:"], " Foobar\r\n", + ["admonition", "WARNING:"], " Foo bar baz\r\n", + ["admonition", "CAUTION:"], " Foobar" +] + +---------------------------------------------------- + +Checks for admonitions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/attribute-entry_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/attribute-entry_feature.test new file mode 100644 index 0000000000..a12299ab88 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/attribute-entry_feature.test @@ -0,0 +1,58 @@ +:Foo bar: baz + +:Foobar: Foo + +bar + +baz + +:Foo bar!: +:Foobar!: + +===== +:Foo bar: baz + +:Foobar: Foo + +bar + +baz + +:Foo bar!: +:Foobar!: +===== + +|===== +| +:Foo bar: baz + +:Foobar: Foo + +bar + +baz +|===== + +---------------------------------------------------- + +[ + ["attribute-entry", ":Foo bar: baz"], + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], + ["attribute-entry", ":Foo bar!:"], + ["attribute-entry", ":Foobar!:"], + + ["other-block", [ + ["punctuation", "====="], + ["attribute-entry", ":Foo bar: baz"], + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], + ["attribute-entry", ":Foo bar!:"], + ["attribute-entry", ":Foobar!:"], + ["punctuation", "====="] + ]], + + ["table", [ + ["punctuation", "|====="], + ["punctuation", "|"], + ["attribute-entry", ":Foo bar: baz"], + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], + ["punctuation", "|====="] + ]] +] + +---------------------------------------------------- + +Checks for attribute entries. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/attributes_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/attributes_feature.test new file mode 100644 index 0000000000..a4eb9e25f9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/attributes_feature.test @@ -0,0 +1,403 @@ +Foo [big red yellow-background]#obvious# + +[float] +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +[quote,'"with *an* image" image:foo.png[] (TM)'] + +[NOTE] +[icon="./images/icons/wink.png"] +[icons=None, caption="My Special Note"] +[start=7] + +[cols="e,m,^,>s",width="25%"] + +===== +Foo [big red yellow-background]#obvious# + +[float] +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +[quote,'"with *an* image" image:foo.png[] (TM)'] + +[NOTE] +[icon="./images/icons/wink.png"] +[icons=None, caption="My Special Note"] +[start=7] + +[cols="e,m,^,>s",width="25%"] +===== + +|===== +| +Foo [big red yellow-background]#obvious# + +[float] +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +[quote,'"with *an* image" image:foo.png[] (TM)'] + +[NOTE] +[icon="./images/icons/wink.png"] +[icons=None, caption="My Special Note"] +[start=7] + +[cols="e,m,^,>s",width="25%"] +|===== + + +latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] +asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`] +latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$] + +---------------------------------------------------- + +[ + "Foo ", + ["inline", [ + ["attributes", [ + ["punctuation", "["], + ["attr-value", "big red yellow-background"], + ["punctuation", "]"] + ]], + ["punctuation", "#"], "obvious", ["punctuation", "#"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//en.wikipedia.org/wiki/Samuel_Johnson", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Samuel Johnson"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["entity", """], + "with ", + ["inline", [ + ["bold", [ + ["punctuation", "*"], "an", ["punctuation", "*"] + ]] + ]], + " image", + ["entity", """], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "foo.png", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["replacement", "(TM)"], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icon"], + ["operator", "="], + ["string", "\"./images/icons/wink.png\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icons"], + ["operator", "="], + ["attr-value", "None"], + ["punctuation", ","], + ["variable", "caption"], + ["operator", "="], + ["string", "\"My Special Note\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "start"], + ["operator", "="], + ["attr-value", "7"], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], + ["variable", "cols"], + ["operator", "="], + ["string", "\"e,m,^,>s\""], + ["punctuation", ","], + ["variable", "width"], + ["operator", "="], + ["string", "\"25%\""], + ["punctuation", "]"] + ]], + + ["other-block", [ + ["punctuation", "====="], + + "\r\nFoo ", + ["inline", [ + ["attributes", [ + ["punctuation", "["], + ["attr-value", "big red yellow-background"], + ["punctuation", "]"] + ]], + ["punctuation", "#"], "obvious", ["punctuation", "#"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//en.wikipedia.org/wiki/Samuel_Johnson", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Samuel Johnson"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["entity", """], + "with ", + ["inline", [ + ["bold", [ + ["punctuation", "*"], "an", ["punctuation", "*"] + ]] + ]], + " image", + ["entity", """], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "foo.png", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["replacement", "(TM)"], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icon"], + ["operator", "="], + ["string", "\"./images/icons/wink.png\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icons"], + ["operator", "="], + ["attr-value", "None"], + ["punctuation", ","], + ["variable", "caption"], + ["operator", "="], + ["string", "\"My Special Note\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "start"], + ["operator", "="], + ["attr-value", "7"], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], + ["variable", "cols"], + ["operator", "="], + ["string", "\"e,m,^,>s\""], + ["punctuation", ","], + ["variable", "width"], + ["operator", "="], + ["string", "\"25%\""], + ["punctuation", "]"] + ]], + + ["punctuation", "====="] + ]], + + ["table", [ + ["punctuation", "|====="], + ["punctuation", "|"], + + "\r\nFoo ", + ["inline", [ + ["attributes", [ + ["punctuation", "["], + ["attr-value", "big red yellow-background"], + ["punctuation", "]"] + ]], + ["punctuation", "#"], "obvious", ["punctuation", "#"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//en.wikipedia.org/wiki/Samuel_Johnson", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Samuel Johnson"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "quote"], ["punctuation", ","], + ["interpreted", [ + ["punctuation", "'"], + ["entity", """], + "with ", + ["inline", [ + ["bold", [ + ["punctuation", "*"], "an", ["punctuation", "*"] + ]] + ]], + " image", + ["entity", """], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "foo.png", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["replacement", "(TM)"], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icon"], + ["operator", "="], + ["string", "\"./images/icons/wink.png\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "icons"], + ["operator", "="], + ["attr-value", "None"], + ["punctuation", ","], + ["variable", "caption"], + ["operator", "="], + ["string", "\"My Special Note\""], + ["punctuation", "]"] + ]], + ["attributes", [ + ["punctuation", "["], + ["variable", "start"], + ["operator", "="], + ["attr-value", "7"], + ["punctuation", "]"] + ]], + + ["attributes", [ + ["punctuation", "["], + ["variable", "cols"], + ["operator", "="], + ["string", "\"e,m,^,>s\""], + ["punctuation", ","], + ["variable", "width"], + ["operator", "="], + ["string", "\"25%\""], + ["punctuation", "]"] + ]], + + ["punctuation", "|====="] + ]], + + ["macro", [ + ["function", "latexmath"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["quoted", [ + ["punctuation", "$"], + "C = \\alpha + \\beta Y^{\\gamma} + \\epsilon", + ["punctuation", "$"] + ]], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "asciimath"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["quoted", [ + ["punctuation", "`"], + "x/x={(1,if x!=0),(text{undefined},if x=0):}", + ["punctuation", "`"] + ]], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "latexmath"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["quoted", [ + ["punctuation", "$"], + "\\sum_{n=1}^\\infty \\frac{1}{2^n}", + ["punctuation", "$"] + ]], + ["punctuation", "]"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for attributes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/callout_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/callout_feature.test new file mode 100644 index 0000000000..b7de9b1bcb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/callout_feature.test @@ -0,0 +1,34 @@ +Foobar <1> +<1> Foo +1> Bar +> Baz + +|==== +| Foobar <1> +<1> Foo +1> Bar +> Baz +|==== + +---------------------------------------------------- + +[ + "Foobar ", ["callout", "<1>"], + ["callout", "<1>"], " Foo\r\n", + ["callout", "1>"], " Bar\r\n", + ["callout", ">"], " Baz\r\n\r\n", + + ["table", [ + ["punctuation", "|===="], + ["punctuation", "|"], + " Foobar ", ["callout", "<1>"], + ["callout", "<1>"], " Foo\r\n", + ["callout", "1>"], " Bar\r\n", + ["callout", ">"], " Baz\r\n", + ["punctuation", "|===="] + ]] +] + +---------------------------------------------------- + +Checks for callouts. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/comment-block_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/comment-block_feature.test new file mode 100644 index 0000000000..4c4248edf5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/comment-block_feature.test @@ -0,0 +1,19 @@ +//// +//// + +//// +Foobar + +Baz +//// + +---------------------------------------------------- + +[ + ["comment-block", "////\r\n////"], + ["comment-block", "////\r\nFoobar\r\n\r\nBaz\r\n////"] +] + +---------------------------------------------------- + +Checks for comment blocks. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/comment_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/comment_feature.test new file mode 100644 index 0000000000..c2ccc51b50 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/comment_feature.test @@ -0,0 +1,41 @@ +// +// Foobar + +****** +// +// Foobar +****** + +|====== +| +// +| +// Foobar +|====== + +---------------------------------------------------- + +[ + ["comment", "//"], + ["comment", "// Foobar"], + + ["other-block", [ + ["punctuation", "******"], + ["comment", "//"], + ["comment", "// Foobar"], + ["punctuation", "******"] + ]], + + ["table", [ + ["punctuation", "|======"], + ["punctuation", "|"], + ["comment", "//"], + ["punctuation", "|"], + ["comment", "// Foobar"], + ["punctuation", "|======"] + ]] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.js b/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.js new file mode 100644 index 0000000000..2e99cd10ef --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.js @@ -0,0 +1,4 @@ +module.exports = { + '➊': '&#x278a;', + '¶': '&#182;' +}; \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.test new file mode 100644 index 0000000000..a3d5ce8175 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/entity_feature.test @@ -0,0 +1,48 @@ +➊ ¶ + +➊ ¶ +============ + +['➊ ¶'] + +-- +➊ ¶ +-- + +|====== +| ➊ ¶ +|====== + +---------------------------------------------------- + +[ + ["entity", "➊"], ["entity", "¶"], + ["title", [ + ["entity", "➊"], ["entity", "¶"], + ["punctuation", "============"] + ]], + ["attributes", [ + ["punctuation", "["], + ["interpreted", [ + ["punctuation", "'"], + ["entity", "➊"], ["entity", "¶"], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + ["other-block", [ + ["punctuation", "--"], + ["entity", "➊"], ["entity", "¶"], + ["punctuation", "--"] + ]], + ["table", [ + ["punctuation", "|======"], + ["punctuation", "|"], + ["entity", "➊"], ["entity", "¶"], + ["punctuation", "|======"] + ]] +] + +---------------------------------------------------- + +Checks for entities. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/hr_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/hr_feature.test new file mode 100644 index 0000000000..822a7dbb45 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/hr_feature.test @@ -0,0 +1,14 @@ +''' + +'''''''''' + +---------------------------------------------------- + +[ + ["hr", "'''"], + ["hr", "''''''''''"] +] + +---------------------------------------------------- + +Checks for hr. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/indented-block_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/indented-block_feature.test new file mode 100644 index 0000000000..c6d665754a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/indented-block_feature.test @@ -0,0 +1,28 @@ +. + + (TM) __foobar__ + :bar: baz + + Foo *bar* baz + // Foobar + == Foobar == + + Title + ~~~~~ + ..... + ..... + +---------------------------------------------------- + +[ + ".\r\n\r\n", + ["indented-block", "\t(TM) __foobar__\r\n\t:bar: baz"], + ["indented-block", " Foo *bar* baz\r\n // Foobar\r\n == Foobar =="], + ["indented-block", " Title\r\n ~~~~~\r\n .....\r\n ....."] +] + +---------------------------------------------------- + +Checks for indented blocks. +Also checks that nothing gets highlighted inside. +The initial dot is required because tests are trimmed. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/inline_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/inline_feature.test new file mode 100644 index 0000000000..d88a57080c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/inline_feature.test @@ -0,0 +1,521 @@ +_emphasis_ +``double quotes'' +`single quotes' +`monospace` +'emphasis' +*strong* ++monospace+ +#unquoted# + +_foo _ bar baz_ +`foo ' bar baz' +`foo ` bar baz` +'foo ' bar baz' +*foo * bar baz* ++foo + bar baz+ +#foo # bar baz# + +_foo +bar_ +``foo +bar'' +`foo +bar' +`foo +bar` +'foo +bar' +*foo +bar* ++foo +bar+ +#foo +bar# + +foo__emphasis__bar +foo**strong**bar +foo++monospace++bar +foo+++passthrough+++bar +foo##unquoted##bar +foo$$passthrough$$bar +foo~subscript~bar +foo^superscript^bar +foo{attribute-reference}bar +foo[[anchor]]bar +foo[[[bibliography anchor]]]bar +foo<>bar +foo(((indexes)))bar +foo((indexes))bar + +==== +_emphasis_ +``double quotes'' +`single quotes' +`monospace` +'emphasis' +*strong* ++monospace+ +#unquoted# +__emphasis__ +**strong** +++monospace++ ++++passthrough+++ +##unquoted## +$$passthrough$$ +~subscript~ +^superscript^ +{attribute-reference} +[[anchor]] +[[[bibliography anchor]]] +<> +(((indexes))) +((indexes)) +==== + +|==== +| +_emphasis_ +``double quotes'' +`single quotes' +`monospace` +'emphasis' +*strong* ++monospace+ +#unquoted# +__emphasis__ +**strong** +++monospace++ ++++passthrough+++ +##unquoted## +$$passthrough$$ +~subscript~ +^superscript^ +{attribute-reference} +[[anchor]] +[[[bibliography anchor]]] +<> +(((indexes))) +((indexes)) +|==== + +['foo *bar* baz'] + +== foo *bar* baz == + +{names=value} +{names?value} +{names!value} +{names#value} +{names%value} +{names@regexp:value1:value2} +{names$regexp:value1:value2} +{names$regexp::value} +{foo,bar=foobar} +{foo+bar=foobar} +{counter:attrname} + +---------------------------------------------------- + +[ + ["inline", [ + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] + ]], + ["inline", [ + ["punctuation", "``"], "double quotes", ["punctuation", "''"] + ]], + ["inline", [ + ["punctuation", "`"], "single quotes", ["punctuation", "'"] + ]], + ["inline", [ + ["punctuation", "`"], "monospace", ["punctuation", "`"] + ]], + ["inline", [ + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] + ]], + ["inline", [ + ["punctuation", "+"], "monospace", ["punctuation", "+"] + ]], + ["inline", [ + ["punctuation", "#"], "unquoted", ["punctuation", "#"] + ]], + + ["inline", [ + ["italic", [["punctuation", "_"], "foo _ bar baz", ["punctuation", "_"]]] + ]], + ["inline", [ + ["punctuation", "`"], "foo ' bar baz", ["punctuation", "'"] + ]], + ["inline", [ + ["punctuation", "`"], "foo ` bar baz", ["punctuation", "`"] + ]], + ["inline", [ + ["italic", [["punctuation", "'"], "foo ' bar baz", ["punctuation", "'"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "*"], "foo * bar baz", ["punctuation", "*"]]] + ]], + ["inline", [ + ["punctuation", "+"], "foo + bar baz", ["punctuation", "+"] + ]], + ["inline", [ + ["punctuation", "#"], "foo # bar baz", ["punctuation", "#"] + ]], + + ["inline", [ + ["italic", [["punctuation", "_"], "foo\r\nbar", ["punctuation", "_"]]] + ]], + ["inline", [ + ["punctuation", "``"], "foo\r\nbar", ["punctuation", "''"] + ]], + ["inline", [ + ["punctuation", "`"], "foo\r\nbar", ["punctuation", "'"] + ]], + ["inline", [ + ["punctuation", "`"], "foo\r\nbar", ["punctuation", "`"] + ]], + ["inline", [ + ["italic", [["punctuation", "'"], "foo\r\nbar", ["punctuation", "'"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "*"], "foo\r\nbar", ["punctuation", "*"]]] + ]], + ["inline", [ + ["punctuation", "+"], "foo\r\nbar", ["punctuation", "+"] + ]], + ["inline", [ + ["punctuation", "#"], "foo\r\nbar", ["punctuation", "#"] + ]], + + "\r\n\r\nfoo", + ["inline", [ + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "++"], "monospace", ["punctuation", "++"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "##"], "unquoted", ["punctuation", "##"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "~"], "subscript", ["punctuation", "~"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "^"], "superscript", ["punctuation", "^"] + ]], + "bar\r\nfoo", + ["inline", [ + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "((("], "indexes", ["punctuation", ")))"] + ]], + "bar\r\nfoo", + ["inline", [ + ["punctuation", "(("], "indexes", ["punctuation", "))"] + ]], + "bar\r\n\r\n", + + ["other-block", [ + ["punctuation", "===="], + + ["inline", [ + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] + ]], + ["inline", [ + ["punctuation", "``"], "double quotes", ["punctuation", "''"] + ]], + ["inline", [ + ["punctuation", "`"], "single quotes", ["punctuation", "'"] + ]], + ["inline", [ + ["punctuation", "`"], "monospace", ["punctuation", "`"] + ]], + ["inline", [ + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] + ]], + ["inline", [ + ["punctuation", "+"], "monospace", ["punctuation", "+"] + ]], + ["inline", [ + ["punctuation", "#"], "unquoted", ["punctuation", "#"] + ]], + ["inline", [ + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] + ]], + ["inline", [ + ["punctuation", "++"], "monospace", ["punctuation", "++"] + ]], + ["inline", [ + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] + ]], + ["inline", [ + ["punctuation", "##"], "unquoted", ["punctuation", "##"] + ]], + ["inline", [ + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] + ]], + ["inline", [ + ["punctuation", "~"], "subscript", ["punctuation", "~"] + ]], + ["inline", [ + ["punctuation", "^"], "superscript", ["punctuation", "^"] + ]], + ["inline", [ + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] + ]], + ["inline", [ + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] + ]], + ["inline", [ + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] + ]], + ["inline", [ + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] + ]], + ["inline", [ + ["punctuation", "((("], "indexes", ["punctuation", ")))"] + ]], + ["inline", [ + ["punctuation", "(("], "indexes", ["punctuation", "))"] + ]], + + ["punctuation", "===="] + ]], + + ["table", [ + ["punctuation", "|===="], + ["punctuation", "|"], + + ["inline", [ + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] + ]], + ["inline", [ + ["punctuation", "``"], "double quotes", ["punctuation", "''"] + ]], + ["inline", [ + ["punctuation", "`"], "single quotes", ["punctuation", "'"] + ]], + ["inline", [ + ["punctuation", "`"], "monospace", ["punctuation", "`"] + ]], + ["inline", [ + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] + ]], + ["inline", [ + ["punctuation", "+"], "monospace", ["punctuation", "+"] + ]], + ["inline", [ + ["punctuation", "#"], "unquoted", ["punctuation", "#"] + ]], + ["inline", [ + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] + ]], + ["inline", [ + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] + ]], + ["inline", [ + ["punctuation", "++"], "monospace", ["punctuation", "++"] + ]], + ["inline", [ + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] + ]], + ["inline", [ + ["punctuation", "##"], "unquoted", ["punctuation", "##"] + ]], + ["inline", [ + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] + ]], + ["inline", [ + ["punctuation", "~"], "subscript", ["punctuation", "~"] + ]], + ["inline", [ + ["punctuation", "^"], "superscript", ["punctuation", "^"] + ]], + ["inline", [ + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] + ]], + ["inline", [ + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] + ]], + ["inline", [ + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] + ]], + ["inline", [ + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] + ]], + ["inline", [ + ["punctuation", "((("], "indexes", ["punctuation", ")))"] + ]], + ["inline", [ + ["punctuation", "(("], "indexes", ["punctuation", "))"] + ]], + + ["punctuation", "|===="] + ]], + + ["attributes", [ + ["punctuation", "["], + ["interpreted", [ + ["punctuation", "'"], + "foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz", + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + + ["title", [ + ["punctuation", "=="], + " foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz ", + ["punctuation", "=="] + ]], + + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "="], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "?"], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "!"], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "#"], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "%"], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "@"], + "regexp", ["punctuation", ":"], + "value1", ["punctuation", ":"], + "value2", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "$"], + "regexp", ["punctuation", ":"], + "value1", ["punctuation", ":"], + "value2", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "names"], + ["operator", "$"], + "regexp", ["punctuation", "::"], + "value", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "foo,bar"], + ["operator", "="], + "foobar", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "foo+bar"], + ["operator", "="], + "foobar", + ["punctuation", "}"] + ]] + ]], + ["inline", [ + ["attribute-ref", [ + ["punctuation", "{"], + ["variable", "counter"], + ["punctuation", ":"], + "attrname", + ["punctuation", "}"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for all kinds of inline quoted text. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/line-continuation_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/line-continuation_feature.test new file mode 100644 index 0000000000..651fa81fa3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/line-continuation_feature.test @@ -0,0 +1,18 @@ +Foo + +bar + +* Foo ++ +bar + +---------------------------------------------------- + +[ + "Foo ", ["line-continuation", "+"], "\r\nbar\r\n\r\n", + ["list-punctuation", "*"], " Foo\r\n", + ["line-continuation", "+"], "\r\nbar" +] + +---------------------------------------------------- + +Checks for line continuations. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/list-label_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/list-label_feature.test new file mode 100644 index 0000000000..3e95bb6ac4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/list-label_feature.test @@ -0,0 +1,73 @@ +In:: +Lorem:: + Foo bar baz +Dolor::: + Ipsum:::: + Donec;; + Foobar + +____ +In:: +Lorem:: + Foo bar baz +Dolor::: + Ipsum:::: + Donec;; + Foobar +____ + +|======== +| +In:: +Lorem:: + Foo bar baz +Dolor::: + Ipsum:::: + Donec;; + Foobar +|======== + +---------------------------------------------------- + +[ + ["list-label", "In::"], + ["list-label", "Lorem::"], + "\r\n Foo bar baz\r\n", + ["list-label", "Dolor:::"], + ["list-label", "Ipsum::::"], + ["list-label", "Donec;;"], + "\r\n Foobar\r\n\r\n", + + ["other-block", [ + ["punctuation", "____"], + + ["list-label", "In::"], + ["list-label", "Lorem::"], + "\r\n Foo bar baz\r\n", + ["list-label", "Dolor:::"], + ["list-label", "Ipsum::::"], + ["list-label", "Donec;;"], + "\r\n Foobar\r\n", + + ["punctuation", "____"] + ]], + + ["table", [ + ["punctuation", "|========"], + ["punctuation", "|"], + + ["list-label", "In::"], + ["list-label", "Lorem::"], + "\r\n Foo bar baz\r\n", + ["list-label", "Dolor:::"], + ["list-label", "Ipsum::::"], + ["list-label", "Donec;;"], + "\r\n Foobar\r\n", + + ["punctuation", "|========"] + ]] +] + +---------------------------------------------------- + +Checks for list labels. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/list-punctuation_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/list-punctuation_feature.test new file mode 100644 index 0000000000..60dbf13cb5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/list-punctuation_feature.test @@ -0,0 +1,77 @@ +- Foo +* Foo +** Foo bar +*** Foo + 1. Foo + 2. Foo bar + 42. Foo +**** Foo +***** Foo bar + +. Foo +.. Foo + a. Foo + b. Foo + z. Foo +... Foo bar +.... Foo + i) Foo + vi) Bar + xxvii) Baz +..... Foo + +____ +. 1 +.. 2 +____ + +|=== +| +xi) a +xii) b +|=== + +---------------------------------------------------- + +[ + ["list-punctuation", "-"], " Foo\r\n", + ["list-punctuation", "*"], " Foo\r\n", + ["list-punctuation", "**"], " Foo bar\r\n", + ["list-punctuation", "***"], " Foo\r\n\t", + ["list-punctuation", "1."], " Foo\r\n\t", + ["list-punctuation", "2."], " Foo bar\r\n\t", + ["list-punctuation", "42."], " Foo\r\n", + ["list-punctuation", "****"], " Foo\r\n", + ["list-punctuation", "*****"], " Foo bar\r\n\r\n", + + ["list-punctuation", "."], " Foo\r\n", + ["list-punctuation", ".."], " Foo\r\n ", + ["list-punctuation", "a."], " Foo\r\n ", + ["list-punctuation", "b."], " Foo\r\n ", + ["list-punctuation", "z."], " Foo\r\n", + ["list-punctuation", "..."], " Foo bar\r\n", + ["list-punctuation", "...."], " Foo\r\n\t", + ["list-punctuation", "i)"], " Foo\r\n\t", + ["list-punctuation", "vi)"], " Bar\r\n\t", + ["list-punctuation", "xxvii)"], " Baz\r\n", + ["list-punctuation", "....."], " Foo\r\n\r\n", + + ["other-block", [ + ["punctuation", "____"], + ["list-punctuation", "."], " 1\r\n", + ["list-punctuation", ".."], " 2\r\n", + ["punctuation", "____"] + ]], + + ["table", [ + ["punctuation", "|==="], + ["punctuation", "|"], + ["list-punctuation", "xi)"], " a\r\n", + ["list-punctuation", "xii)"], " b\r\n", + ["punctuation", "|==="] + ]] +] + +---------------------------------------------------- + +Checks for list punctuation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/literal-block_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/literal-block_feature.test new file mode 100644 index 0000000000..9449ca06d1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/literal-block_feature.test @@ -0,0 +1,46 @@ +---- +== Foobar == +Bar _baz_ (TM) <1> +* Foo <2> +<1> Foobar +2> Baz +---- + +....... +.Foo +. Foobar <1> +include::addendum.txt <2> +> Foo +> Bar +__Foo__**bar**{baz} +....... + +---------------------------------------------------- + +[ + ["literal-block", [ + ["punctuation", "----"], + "\r\n== Foobar ==\r\nBar _baz_ (TM) ", + ["callout", "<1>"], + "\r\n* Foo ", + ["callout", "<2>"], + ["callout", "<1>"], " Foobar\r\n", + ["callout", "2>"], " Baz\r\n", + ["punctuation", "----"] + ]], + ["literal-block", [ + ["punctuation", "......."], + "\r\n.Foo\r\n. Foobar ", + ["callout", "<1>"], + "\r\ninclude::addendum.txt ", + ["callout", "<2>"], + ["callout", ">"], " Foo\r\n", + ["callout", ">"], " Bar\r\n__Foo__**bar**{baz}\r\n", + ["punctuation", "......."] + ]] +] + +---------------------------------------------------- + +Checks for literal blocks and listing blocks. +Also checks that nothing gets highlighted inside expect callouts. diff --git a/docs/_style/prism-master/tests/languages/asciidoc/macro_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/macro_feature.test new file mode 100644 index 0000000000..50ee161609 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/macro_feature.test @@ -0,0 +1,250 @@ +footnote:[An example footnote.] +indexterm:[Tigers,Big cats] + +http://www.docbook.org/[DocBook.org] +include::chapt1.txt[tabsize=2] +mailto:srackham@gmail.com[] + +image:screen-thumbnail.png[height=32,link="screen.png"] + +== Foo image:foo.jpg[] == + +-- +footnote:[An example footnote.] +indexterm:[Tigers,Big cats] + +http://www.docbook.org/[DocBook.org] +include::chapt1.txt[tabsize=2] +mailto:srackham@gmail.com[] + +image:screen-thumbnail.png[height=32,link="screen.png"] +-- + +|==== +| +footnote:[An example footnote.] +indexterm:[Tigers,Big cats] + +http://www.docbook.org/[DocBook.org] +include::chapt1.txt[tabsize=2] +mailto:srackham@gmail.com[] + +image:screen-thumbnail.png[height=32,link="screen.png"] +|==== + +---------------------------------------------------- + +[ + ["macro", [ + ["function", "footnote"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "An example footnote."], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "indexterm"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Tigers"], + ["punctuation", ","], + ["attr-value", "Big cats"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//www.docbook.org/", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "DocBook.org"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "include"], ["punctuation", "::"], + "chapt1.txt", + ["attributes", [ + ["punctuation", "["], + ["variable", "tabsize"], + ["operator", "="], + ["attr-value", "2"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "mailto"], ["punctuation", ":"], + "srackham@gmail.com", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "screen-thumbnail.png", + ["attributes", [ + ["punctuation", "["], + ["variable", "height"], + ["operator", "="], + ["attr-value", "32"], + ["punctuation", ","], + ["variable", "link"], + ["operator", "="], + ["string", "\"screen.png\""], + ["punctuation", "]"] + ]] + ]], + + ["title", [ + ["punctuation", "=="], + " Foo ", + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "foo.jpg", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["punctuation", "=="] + ]], + + ["other-block", [ + ["punctuation", "--"], + + ["macro", [ + ["function", "footnote"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "An example footnote."], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "indexterm"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Tigers"], + ["punctuation", ","], + ["attr-value", "Big cats"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//www.docbook.org/", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "DocBook.org"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "include"], ["punctuation", "::"], + "chapt1.txt", + ["attributes", [ + ["punctuation", "["], + ["variable", "tabsize"], + ["operator", "="], + ["attr-value", "2"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "mailto"], ["punctuation", ":"], + "srackham@gmail.com", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "screen-thumbnail.png", + ["attributes", [ + ["punctuation", "["], + ["variable", "height"], + ["operator", "="], + ["attr-value", "32"], + ["punctuation", ","], + ["variable", "link"], + ["operator", "="], + ["string", "\"screen.png\""], + ["punctuation", "]"] + ]] + ]], + + ["punctuation", "--"] + ]], + + ["table", [ + ["punctuation", "|===="], + ["punctuation", "|"], + + ["macro", [ + ["function", "footnote"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "An example footnote."], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "indexterm"], ["punctuation", ":"], + ["attributes", [ + ["punctuation", "["], + ["attr-value", "Tigers"], + ["punctuation", ","], + ["attr-value", "Big cats"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "http"], ["punctuation", ":"], + "//www.docbook.org/", + ["attributes", [ + ["punctuation", "["], + ["attr-value", "DocBook.org"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "include"], ["punctuation", "::"], + "chapt1.txt", + ["attributes", [ + ["punctuation", "["], + ["variable", "tabsize"], + ["operator", "="], + ["attr-value", "2"], + ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "mailto"], ["punctuation", ":"], + "srackham@gmail.com", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["macro", [ + ["function", "image"], ["punctuation", ":"], + "screen-thumbnail.png", + ["attributes", [ + ["punctuation", "["], + ["variable", "height"], + ["operator", "="], + ["attr-value", "32"], + ["punctuation", ","], + ["variable", "link"], + ["operator", "="], + ["string", "\"screen.png\""], + ["punctuation", "]"] + ]] + ]], + + ["punctuation", "|===="] + ]] +] + +---------------------------------------------------- + +Checks for macros. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/other-block_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/other-block_feature.test new file mode 100644 index 0000000000..fb33c207f6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/other-block_feature.test @@ -0,0 +1,45 @@ +**** +Sidebar block <1> +**** + +______ +Quote block <2> +______ + +======== +Example block <3> +======== + +-- +Open block <4> +-- + +---------------------------------------------------- + +[ + ["other-block", [ + ["punctuation", "****"], + "\r\nSidebar block <1>\r\n", + ["punctuation", "****"] + ]], + ["other-block", [ + ["punctuation", "______"], + "\r\nQuote block <2>\r\n", + ["punctuation", "______"] + ]], + ["other-block", [ + ["punctuation", "========"], + "\r\nExample block <3>\r\n", + ["punctuation", "========"] + ]], + ["other-block", [ + ["punctuation", "--"], + "\r\nOpen block <4>\r\n", + ["punctuation", "--"] + ]] +] + +---------------------------------------------------- + +Checks for sidebar blocks, quote blocks, example blocks and open blocks. +Also checks that callouts are not highlighted. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/page-break_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/page-break_feature.test new file mode 100644 index 0000000000..010a590133 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/page-break_feature.test @@ -0,0 +1,14 @@ +<<< + +<<<<<<<<<<<<< + +---------------------------------------------------- + +[ + ["page-break", "<<<"], + ["page-break", "<<<<<<<<<<<<<"] +] + +---------------------------------------------------- + +Checks for page breaks. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/passthrough-block_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/passthrough-block_feature.test new file mode 100644 index 0000000000..a5bb08b43c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/passthrough-block_feature.test @@ -0,0 +1,29 @@ +++++ +.Fo__o__bar *baz* +Fo(((o)))bar baz +* Foobar baz +include::addendum.txt[] +++++ + +---------------------------------------------------- + +[ + ["passthrough-block", [ + ["punctuation", "++++"], + "\r\n.Fo__o__bar *baz*\r\nFo(((o)))bar baz\r\n* Foobar baz\r\n", + ["macro", [ + ["function", "include"], + ["punctuation", "::"], + "addendum.txt", + ["attributes", [ + ["punctuation", "["], ["punctuation", "]"] + ]] + ]], + ["punctuation", "++++"] + ]] +] + +---------------------------------------------------- + +Checks for passthrough blocks. +Also checks that nothing gets highlighted inside expect macros. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/replacement_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/replacement_feature.test new file mode 100644 index 0000000000..ca27610e21 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/replacement_feature.test @@ -0,0 +1,48 @@ +(C) (TM) (R) + +(C) (TM) (R) +============ + +['(C) (TM) (R)'] + +-- +(C) (TM) (R) +-- + +|====== +| (C) (TM) (R) +|====== + +---------------------------------------------------- + +[ + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], + ["title", [ + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], + ["punctuation", "============"] + ]], + ["attributes", [ + ["punctuation", "["], + ["interpreted", [ + ["punctuation", "'"], + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], + ["punctuation", "'"] + ]], + ["punctuation", "]"] + ]], + ["other-block", [ + ["punctuation", "--"], + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], + ["punctuation", "--"] + ]], + ["table", [ + ["punctuation", "|======"], + ["punctuation", "|"], + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], + ["punctuation", "|======"] + ]] +] + +---------------------------------------------------- + +Checks for replacements. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/table_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/table_feature.test new file mode 100644 index 0000000000..0b4bd3c69a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/table_feature.test @@ -0,0 +1,61 @@ +|=== +|1 +|=== + +|============================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +2*^|8 +|9 2+>|10 +|============================ + +|============================================== +|Normal cell + +|Cell with nested table + +!============================================== +!Nested table cell 1 !Nested table cell 2 +!============================================== + +|============================================== + +---------------------------------------------------- + +[ + ["table", [ + ["punctuation", "|==="], + ["punctuation", "|"], "1\r\n", + ["punctuation", "|==="] + ]], + + ["table", [ + ["punctuation", "|============================"], + ["punctuation", "|"], "1 ", + ["specifiers", ">s"], ["punctuation", "|"], "2 ", + ["punctuation", "|"], "3 ", + ["punctuation", "|"], "4\r\n", + ["specifiers", "^"], ["punctuation", "|"], "5 ", + ["specifiers", "2.2+^.^"], ["punctuation", "|"], "6 ", + ["specifiers", ".3+<.>m"], ["punctuation", "|"], "7\r\n", + ["specifiers", "2*^"], ["punctuation", "|"], "8\r\n", + ["punctuation", "|"], "9 ", + ["specifiers", "2+>"], ["punctuation", "|"], "10\r\n", + ["punctuation", "|============================"] + ]], + + ["table", [ + ["punctuation", "|=============================================="], + ["punctuation", "|"], "Normal cell\r\n\r\n", + ["punctuation", "|"], "Cell with nested table\r\n\r\n", + ["punctuation", "!=============================================="], + ["punctuation", "!"], "Nested table cell 1 ", + ["punctuation", "!"], "Nested table cell 2\r\n", + ["punctuation", "!=============================================="], + ["punctuation", "|=============================================="] + ]] +] + +---------------------------------------------------- + +Checks for tables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asciidoc/title_feature.test b/docs/_style/prism-master/tests/languages/asciidoc/title_feature.test new file mode 100644 index 0000000000..a9d4047428 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asciidoc/title_feature.test @@ -0,0 +1,80 @@ +Foobar +====== + +Foobar +------ + +Foobar +~~~~~~ + +Foobar +^^^^^^ + +Foo ++++ + += Foo bar baz = +== Foo bar baz +=== Foo bar baz === +==== Foo bar baz +===== Foo bar baz ===== + +.Foo bar baz + +---------------------------------------------------- + +[ + ["title", [ + "Foobar\r\n", + ["punctuation", "======"] + ]], + ["title", [ + "Foobar\r\n", + ["punctuation", "------"] + ]], + ["title", [ + "Foobar\r\n", + ["punctuation", "~~~~~~"] + ]], + ["title", [ + "Foobar\r\n", + ["punctuation", "^^^^^^"] + ]], + ["title", [ + "Foo\r\n", + ["punctuation", "+++"] + ]], + + ["title", [ + ["punctuation", "="], + " Foo bar baz ", + ["punctuation", "="] + ]], + ["title", [ + ["punctuation", "=="], + " Foo bar baz" + ]], + ["title", [ + ["punctuation", "==="], + " Foo bar baz ", + ["punctuation", "==="] + ]], + ["title", [ + ["punctuation", "===="], + " Foo bar baz" + ]], + ["title", [ + ["punctuation", "====="], + " Foo bar baz ", + ["punctuation", "====="] + ]], + + ["title", [ + ["punctuation", "."], + "Foo bar baz" + ]] +] + +---------------------------------------------------- + +Checks for titles. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/asm6502/comment_feature.test b/docs/_style/prism-master/tests/languages/asm6502/comment_feature.test new file mode 100644 index 0000000000..d4b860167a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/comment_feature.test @@ -0,0 +1,13 @@ +; +; foo bar baz + +------------------------- + +[ + ["comment", ";"], + ["comment", "; foo bar baz"] +] + +------------------------- + +Check for comments diff --git a/docs/_style/prism-master/tests/languages/asm6502/directive_feature.test b/docs/_style/prism-master/tests/languages/asm6502/directive_feature.test new file mode 100644 index 0000000000..1cf42c81d2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/directive_feature.test @@ -0,0 +1,12 @@ +.segment CODE + +------------------------- + +[ + ["directive", ".segment"], + " CODE" +] + +------------------------- + +Check for directives diff --git a/docs/_style/prism-master/tests/languages/asm6502/number_feature.test b/docs/_style/prism-master/tests/languages/asm6502/number_feature.test new file mode 100644 index 0000000000..55262f67bd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/number_feature.test @@ -0,0 +1,18 @@ +LDA #127 +STA $8000 +LDX #%10001010 + +------------------------- + +[ + ["opcode", "LDA"], + ["decimalnumber", "#127"], + ["opcode", "STA"], + ["hexnumber", "$8000"], + ["opcode", "LDX"], + ["binarynumber", "#%10001010"] +] + +------------------------- + +Check for numbers diff --git a/docs/_style/prism-master/tests/languages/asm6502/opcode_feature.test b/docs/_style/prism-master/tests/languages/asm6502/opcode_feature.test new file mode 100644 index 0000000000..75e7b42806 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/opcode_feature.test @@ -0,0 +1,17 @@ +LDA +BNE +inx +clc + +------------------------------------- + +[ + ["opcode", "LDA"], + ["opcode", "BNE"], + ["opcode", "inx"], + ["opcode", "clc"] +] + +------------------------------------- + +Check for opcodes diff --git a/docs/_style/prism-master/tests/languages/asm6502/register_feature.test b/docs/_style/prism-master/tests/languages/asm6502/register_feature.test new file mode 100644 index 0000000000..91ec7c42be --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/register_feature.test @@ -0,0 +1,17 @@ +LDA $8000,x +ASL A + +------------------------- + +[ + ["opcode", "LDA"], + ["hexnumber", "$8000"], + ",", + ["register", "x"], + ["opcode", "ASL"], + ["register", "A"] +] + +------------------------- + +Check for registers diff --git a/docs/_style/prism-master/tests/languages/asm6502/string_feature.test b/docs/_style/prism-master/tests/languages/asm6502/string_feature.test new file mode 100644 index 0000000000..0205074449 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/asm6502/string_feature.test @@ -0,0 +1,12 @@ +.include "header.asm" + +------------------------- + +[ + ["directive", ".include"], + ["string", "\"header.asm\""] +] + +------------------------- + +Check for strings diff --git a/docs/_style/prism-master/tests/languages/aspnet/comment_feature.test b/docs/_style/prism-master/tests/languages/aspnet/comment_feature.test new file mode 100644 index 0000000000..da388e5f76 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/aspnet/comment_feature.test @@ -0,0 +1,16 @@ +<%----%> +<%--foo--%> +<%-- foo +bar --%> + +---------------------------------------------------- + +[ + ["asp comment", "<%----%>"], + ["asp comment", "<%--foo--%>"], + ["asp comment", "<%-- foo\r\nbar --%>"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/aspnet/page-directive_feature.test b/docs/_style/prism-master/tests/languages/aspnet/page-directive_feature.test new file mode 100644 index 0000000000..3d79dae938 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/aspnet/page-directive_feature.test @@ -0,0 +1,92 @@ +<%@Assembly foo="bar"%> +<% @Control foo="bar" %> +<%@ Implements%> +<%@Import%> +<%@Master%> +<%@MasterType%> +<%@OutputCache%> +<%@Page%> +<%@PreviousPageType%> +<%@Reference%> +<%@Register%> + +---------------------------------------------------- + +[ + ["page-directive tag", [ + ["page-directive tag", "<%@Assembly"], + ["attr-name", [ + "foo" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "bar", + ["punctuation", "\""] + ]], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<% @Control"], + ["attr-name", [ + "foo" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "bar", + ["punctuation", "\""] + ]], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@ Implements"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@Import"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@Master"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@MasterType"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@OutputCache"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@Page"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@PreviousPageType"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@Reference"], + ["page-directive tag", "%>"] + ]], + + ["page-directive tag", [ + ["page-directive tag", "<%@Register"], + ["page-directive tag", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for all page directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/boolean_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/boolean_feature.test new file mode 100644 index 0000000000..6d97d4bffa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/builtin_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/builtin_feature.test new file mode 100644 index 0000000000..afbe8d3325 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/builtin_feature.test @@ -0,0 +1,147 @@ +abs +acos +asc +asin +atan +ceil +chr +class +cos +dllcall +exp +fileexist +Fileopen +floor +il_add +il_create +il_destroy +instr +substr +isfunc +islabel +IsObject +ln +log +lv_add +lv_delete +lv_deletecol +lv_getcount +lv_getnext +lv_gettext +lv_insert +lv_insertcol +lv_modify +lv_modifycol +lv_setimagelist +mod +onmessage +numget +numput +registercallback +regexmatch +regexreplace +round +sin +tan +sqrt +strlen +sb_seticon +sb_setparts +sb_settext +strsplit +tv_add +tv_delete +tv_getchild +tv_getcount +tv_getnext +tv_get +tv_getparent +tv_getprev +tv_getselection +tv_gettext +tv_modify +varsetcapacity +winactive +winexist +__New +__Call +__Get +__Set + +---------------------------------------------------- + +[ + ["builtin", "abs"], + ["builtin", "acos"], + ["builtin", "asc"], + ["builtin", "asin"], + ["builtin", "atan"], + ["builtin", "ceil"], + ["builtin", "chr"], + ["builtin", "class"], + ["builtin", "cos"], + ["builtin", "dllcall"], + ["builtin", "exp"], + ["builtin", "fileexist"], + ["builtin", "Fileopen"], + ["builtin", "floor"], + ["builtin", "il_add"], + ["builtin", "il_create"], + ["builtin", "il_destroy"], + ["builtin", "instr"], + ["builtin", "substr"], + ["builtin", "isfunc"], + ["builtin", "islabel"], + ["builtin", "IsObject"], + ["builtin", "ln"], + ["builtin", "log"], + ["builtin", "lv_add"], + ["builtin", "lv_delete"], + ["builtin", "lv_deletecol"], + ["builtin", "lv_getcount"], + ["builtin", "lv_getnext"], + ["builtin", "lv_gettext"], + ["builtin", "lv_insert"], + ["builtin", "lv_insertcol"], + ["builtin", "lv_modify"], + ["builtin", "lv_modifycol"], + ["builtin", "lv_setimagelist"], + ["builtin", "mod"], + ["builtin", "onmessage"], + ["builtin", "numget"], + ["builtin", "numput"], + ["builtin", "registercallback"], + ["builtin", "regexmatch"], + ["builtin", "regexreplace"], + ["builtin", "round"], + ["builtin", "sin"], + ["builtin", "tan"], + ["builtin", "sqrt"], + ["builtin", "strlen"], + ["builtin", "sb_seticon"], + ["builtin", "sb_setparts"], + ["builtin", "sb_settext"], + ["builtin", "strsplit"], + ["builtin", "tv_add"], + ["builtin", "tv_delete"], + ["builtin", "tv_getchild"], + ["builtin", "tv_getcount"], + ["builtin", "tv_getnext"], + ["builtin", "tv_get"], + ["builtin", "tv_getparent"], + ["builtin", "tv_getprev"], + ["builtin", "tv_getselection"], + ["builtin", "tv_gettext"], + ["builtin", "tv_modify"], + ["builtin", "varsetcapacity"], + ["builtin", "winactive"], + ["builtin", "winexist"], + ["builtin", "__New"], + ["builtin", "__Call"], + ["builtin", "__Get"], + ["builtin", "__Set"] +] + +---------------------------------------------------- + +Checks for all builtins. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/comment_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/comment_feature.test new file mode 100644 index 0000000000..5b00ce20db --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/comment_feature.test @@ -0,0 +1,13 @@ +;foo +; bar + +---------------------------------------------------- + +[ + ["comment", ";foo"], + ["comment", "; bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/constant_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/constant_feature.test new file mode 100644 index 0000000000..ab11673488 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/constant_feature.test @@ -0,0 +1,275 @@ +a_ahkpath +a_ahkversion +a_appdata +a_appdatacommon +a_autotrim +a_batchlines +a_caretx +a_carety +a_computername +a_controldelay +a_cursor +a_dd +a_ddd +a_dddd +a_defaultmousespeed +a_desktop +a_desktopcommon +a_detecthiddentext +a_detecthiddenwindows +a_endchar +a_eventinfo +a_exitreason +a_formatfloat +a_formatinteger +a_gui +a_guievent +a_guicontrol +a_guicontrolevent +a_guiheight +a_guiwidth +a_guix +a_guiy +a_hour +a_iconfile +a_iconhidden +a_iconnumber +a_icontip +a_index +a_ipaddress1 +a_ipaddress2 +a_ipaddress3 +a_ipaddress4 +a_isadmin +a_iscompiled +a_iscritical +a_ispaused +a_issuspended +a_isunicode +a_keydelay +a_language +a_lasterror +a_linefile +a_linenumber +a_loopfield +a_loopfileattrib +a_loopfiledir +a_loopfileext +a_loopfilefullpath +a_loopfilelongpath +a_loopfilename +a_loopfileshortname +a_loopfileshortpath +a_loopfilesize +a_loopfilesizekb +a_loopfilesizemb +a_loopfiletimeaccessed +a_loopfiletimecreated +a_loopfiletimemodified +a_loopreadline +a_loopregkey +a_loopregname +a_loopregsubkey +a_loopregtimemodified +a_loopregtype +a_mday +a_min +a_mm +a_mmm +a_mmmm +a_mon +a_mousedelay +a_msec +a_mydocuments +a_now +a_nowutc +a_numbatchlines +a_ostype +a_osversion +a_priorhotkey +programfiles +a_programfiles +a_programs +a_programscommon +a_screenheight +a_screenwidth +a_scriptdir +a_scriptfullpath +a_scriptname +a_sec +a_space +a_startmenu +a_startmenucommon +a_startup +a_startupcommon +a_stringcasesense +a_tab +a_temp +a_thisfunc +a_thishotkey +a_thislabel +a_thismenu +a_thismenuitem +a_thismenuitempos +a_tickcount +a_timeidle +a_timeidlephysical +a_timesincepriorhotkey +a_timesincethishotkey +a_titlematchmode +a_titlematchmodespeed +a_username +a_wday +a_windelay +a_windir +a_workingdir +a_yday +a_year +a_yweek +a_yyyy +clipboard +clipboardall +comspec +errorlevel + +---------------------------------------------------- + +[ + ["constant", "a_ahkpath"], + ["constant", "a_ahkversion"], + ["constant", "a_appdata"], + ["constant", "a_appdatacommon"], + ["constant", "a_autotrim"], + ["constant", "a_batchlines"], + ["constant", "a_caretx"], + ["constant", "a_carety"], + ["constant", "a_computername"], + ["constant", "a_controldelay"], + ["constant", "a_cursor"], + ["constant", "a_dd"], + ["constant", "a_ddd"], + ["constant", "a_dddd"], + ["constant", "a_defaultmousespeed"], + ["constant", "a_desktop"], + ["constant", "a_desktopcommon"], + ["constant", "a_detecthiddentext"], + ["constant", "a_detecthiddenwindows"], + ["constant", "a_endchar"], + ["constant", "a_eventinfo"], + ["constant", "a_exitreason"], + ["constant", "a_formatfloat"], + ["constant", "a_formatinteger"], + ["constant", "a_gui"], + ["constant", "a_guievent"], + ["constant", "a_guicontrol"], + ["constant", "a_guicontrolevent"], + ["constant", "a_guiheight"], + ["constant", "a_guiwidth"], + ["constant", "a_guix"], + ["constant", "a_guiy"], + ["constant", "a_hour"], + ["constant", "a_iconfile"], + ["constant", "a_iconhidden"], + ["constant", "a_iconnumber"], + ["constant", "a_icontip"], + ["constant", "a_index"], + ["constant", "a_ipaddress1"], + ["constant", "a_ipaddress2"], + ["constant", "a_ipaddress3"], + ["constant", "a_ipaddress4"], + ["constant", "a_isadmin"], + ["constant", "a_iscompiled"], + ["constant", "a_iscritical"], + ["constant", "a_ispaused"], + ["constant", "a_issuspended"], + ["constant", "a_isunicode"], + ["constant", "a_keydelay"], + ["constant", "a_language"], + ["constant", "a_lasterror"], + ["constant", "a_linefile"], + ["constant", "a_linenumber"], + ["constant", "a_loopfield"], + ["constant", "a_loopfileattrib"], + ["constant", "a_loopfiledir"], + ["constant", "a_loopfileext"], + ["constant", "a_loopfilefullpath"], + ["constant", "a_loopfilelongpath"], + ["constant", "a_loopfilename"], + ["constant", "a_loopfileshortname"], + ["constant", "a_loopfileshortpath"], + ["constant", "a_loopfilesize"], + ["constant", "a_loopfilesizekb"], + ["constant", "a_loopfilesizemb"], + ["constant", "a_loopfiletimeaccessed"], + ["constant", "a_loopfiletimecreated"], + ["constant", "a_loopfiletimemodified"], + ["constant", "a_loopreadline"], + ["constant", "a_loopregkey"], + ["constant", "a_loopregname"], + ["constant", "a_loopregsubkey"], + ["constant", "a_loopregtimemodified"], + ["constant", "a_loopregtype"], + ["constant", "a_mday"], + ["constant", "a_min"], + ["constant", "a_mm"], + ["constant", "a_mmm"], + ["constant", "a_mmmm"], + ["constant", "a_mon"], + ["constant", "a_mousedelay"], + ["constant", "a_msec"], + ["constant", "a_mydocuments"], + ["constant", "a_now"], + ["constant", "a_nowutc"], + ["constant", "a_numbatchlines"], + ["constant", "a_ostype"], + ["constant", "a_osversion"], + ["constant", "a_priorhotkey"], + ["constant", "programfiles"], + ["constant", "a_programfiles"], + ["constant", "a_programs"], + ["constant", "a_programscommon"], + ["constant", "a_screenheight"], + ["constant", "a_screenwidth"], + ["constant", "a_scriptdir"], + ["constant", "a_scriptfullpath"], + ["constant", "a_scriptname"], + ["constant", "a_sec"], + ["constant", "a_space"], + ["constant", "a_startmenu"], + ["constant", "a_startmenucommon"], + ["constant", "a_startup"], + ["constant", "a_startupcommon"], + ["constant", "a_stringcasesense"], + ["constant", "a_tab"], + ["constant", "a_temp"], + ["constant", "a_thisfunc"], + ["constant", "a_thishotkey"], + ["constant", "a_thislabel"], + ["constant", "a_thismenu"], + ["constant", "a_thismenuitem"], + ["constant", "a_thismenuitempos"], + ["constant", "a_tickcount"], + ["constant", "a_timeidle"], + ["constant", "a_timeidlephysical"], + ["constant", "a_timesincepriorhotkey"], + ["constant", "a_timesincethishotkey"], + ["constant", "a_titlematchmode"], + ["constant", "a_titlematchmodespeed"], + ["constant", "a_username"], + ["constant", "a_wday"], + ["constant", "a_windelay"], + ["constant", "a_windir"], + ["constant", "a_workingdir"], + ["constant", "a_yday"], + ["constant", "a_year"], + ["constant", "a_yweek"], + ["constant", "a_yyyy"], + ["constant", "clipboard"], + ["constant", "clipboardall"], + ["constant", "comspec"], + ["constant", "errorlevel"] +] + +---------------------------------------------------- + +Checks for all constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/function_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/function_feature.test new file mode 100644 index 0000000000..f38a186f69 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/function_feature.test @@ -0,0 +1,15 @@ +foo( +foo_bar( + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["function", "foo_bar"], + ["punctuation", "("] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/important_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/important_feature.test new file mode 100644 index 0000000000..aa9cbeb5d6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/important_feature.test @@ -0,0 +1,67 @@ +#AllowSameLineComments +#ClipboardTimeout +#CommentFlag +#ErrorStdOut +#EscapeChar +#HotkeyInterval +#HotkeyModifierTimeout +#Hotstring +#IfWinActive +#IfWinExist +#IfWinNotActive +#IfWinNotExist +#Include +#IncludeAgain +#InstallKeybdHook +#InstallMouseHook +#KeyHistory +#LTrim +#MaxHotkeysPerInterval +#MaxMem +#MaxThreads +#MaxThreadsBuffer +#MaxThreadsPerHotkey +#NoEnv +#NoTrayIcon +#Persistent +#SingleInstance +#UseHook +#WinActivateForce + +---------------------------------------------------- + +[ + ["important", "#AllowSameLineComments"], + ["important", "#ClipboardTimeout"], + ["important", "#CommentFlag"], + ["important", "#ErrorStdOut"], + ["important", "#EscapeChar"], + ["important", "#HotkeyInterval"], + ["important", "#HotkeyModifierTimeout"], + ["important", "#Hotstring"], + ["important", "#IfWinActive"], + ["important", "#IfWinExist"], + ["important", "#IfWinNotActive"], + ["important", "#IfWinNotExist"], + ["important", "#Include"], + ["important", "#IncludeAgain"], + ["important", "#InstallKeybdHook"], + ["important", "#InstallMouseHook"], + ["important", "#KeyHistory"], + ["important", "#LTrim"], + ["important", "#MaxHotkeysPerInterval"], + ["important", "#MaxMem"], + ["important", "#MaxThreads"], + ["important", "#MaxThreadsBuffer"], + ["important", "#MaxThreadsPerHotkey"], + ["important", "#NoEnv"], + ["important", "#NoTrayIcon"], + ["important", "#Persistent"], + ["important", "#SingleInstance"], + ["important", "#UseHook"], + ["important", "#WinActivateForce"] +] + +---------------------------------------------------- + +Checks for all important keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/keyword_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/keyword_feature.test new file mode 100644 index 0000000000..91671355fd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/keyword_feature.test @@ -0,0 +1,537 @@ +Abort +AboveNormal +Add +ahk_class +ahk_group +ahk_id +ahk_pid +All +Alnum +Alpha +AltSubmit +AltTab +AltTabAndMenu +AltTabMenu +AltTabMenuDismiss +AlwaysOnTop +AutoSize +Background +BackgroundTrans +BelowNormal +between +BitAnd +BitNot +BitOr +BitShiftLeft +BitShiftRight +BitXOr +Bold +Border +Button +ByRef +Checkbox +Checked +CheckedGray +Choose +ChooseString +Close +Color +ComboBox +Contains +ControlList +Count +Date +DateTime +Days +DDL +Default +DeleteAll +Delimiter +Deref +Destroy +Digit +Disable +Disabled +DropDownList +Edit +Eject +Else +Enable +Enabled +Error +Exist +Expand +ExStyle +FileSystem +First +Flash +Float +FloatFast +Focus +Font +for +global +Grid +Group +GroupBox +GuiClose +GuiContextMenu +GuiDropFiles +GuiEscape +GuiSize +Hdr +Hidden +Hide +High +HKCC +HKCR +HKCU +HKEY_CLASSES_ROOT +HKEY_CURRENT_CONFIG +HKEY_CURRENT_USER +HKEY_LOCAL_MACHINE +HKEY_USERS +HKLM +HKU +Hours +HScroll +Icon +IconSmall +ID +IDLast +If +IfEqual +IfExist +IfGreater +IfGreaterOrEqual +IfInString +IfLess +IfLessOrEqual +IfMsgBox +IfNotEqual +IfNotExist +IfNotInString +IfWinActive +IfWinExist +IfWinNotActive +IfWinNotExist +Ignore +ImageList +in +Integer +IntegerFast +Interrupt +is +italic +Join +Label +LastFound +LastFoundExist +Limit +Lines +List +ListBox +ListView +local +Lock +Logoff +Low +Lower +Lowercase +MainWindow +Margin +Maximize +MaximizeBox +MaxSize +Minimize +MinimizeBox +MinMax +MinSize +Minutes +MonthCal +Mouse +Move +Multi +NA +No +NoActivate +NoDefault +NoHide +NoIcon +NoMainWindow +norm +Normal +NoSort +NoSortHdr +NoStandard +Not +NoTab +NoTimers +Number +Off +Ok +On +OwnDialogs +Owner +Parse +Password +Picture +Pixel +Pos +Pow +Priority +ProcessName +Radio +Range +Read +ReadOnly +Realtime +Redraw +REG_BINARY +REG_DWORD +REG_EXPAND_SZ +REG_MULTI_SZ +REG_SZ +Region +Relative +Rename +Report +Resize +Restore +Retry +RGB +Screen +Seconds +Section +Serial +SetLabel +ShiftAltTab +Show +Single +Slider +SortDesc +Standard +static +Status +StatusBar +StatusCD +strike +Style +Submit +SysMenu +Tab2 +TabStop +Text +Theme +Tile +ToggleCheck +ToggleEnable +ToolWindow +Top +Topmost +TransColor +Transparent +Tray +TreeView +TryAgain +Type +UnCheck +underline +Unicode +Unlock +UpDown +Upper +Uppercase +UseErrorLevel +Vis +VisFirst +Visible +VScroll +Wait +WaitClose +WantCtrlA +WantF2 +WantReturn +While +Wrap +Xdigit +xm +xp +xs +Yes +ym +yp +ys + +---------------------------------------------------- + +[ + ["keyword", "Abort"], + ["keyword", "AboveNormal"], + ["keyword", "Add"], + ["keyword", "ahk_class"], + ["keyword", "ahk_group"], + ["keyword", "ahk_id"], + ["keyword", "ahk_pid"], + ["keyword", "All"], + ["keyword", "Alnum"], + ["keyword", "Alpha"], + ["keyword", "AltSubmit"], + ["keyword", "AltTab"], + ["keyword", "AltTabAndMenu"], + ["keyword", "AltTabMenu"], + ["keyword", "AltTabMenuDismiss"], + ["keyword", "AlwaysOnTop"], + ["keyword", "AutoSize"], + ["keyword", "Background"], + ["keyword", "BackgroundTrans"], + ["keyword", "BelowNormal"], + ["keyword", "between"], + ["keyword", "BitAnd"], + ["keyword", "BitNot"], + ["keyword", "BitOr"], + ["keyword", "BitShiftLeft"], + ["keyword", "BitShiftRight"], + ["keyword", "BitXOr"], + ["keyword", "Bold"], + ["keyword", "Border"], + ["keyword", "Button"], + ["keyword", "ByRef"], + ["keyword", "Checkbox"], + ["keyword", "Checked"], + ["keyword", "CheckedGray"], + ["keyword", "Choose"], + ["keyword", "ChooseString"], + ["keyword", "Close"], + ["keyword", "Color"], + ["keyword", "ComboBox"], + ["keyword", "Contains"], + ["keyword", "ControlList"], + ["keyword", "Count"], + ["keyword", "Date"], + ["keyword", "DateTime"], + ["keyword", "Days"], + ["keyword", "DDL"], + ["keyword", "Default"], + ["keyword", "DeleteAll"], + ["keyword", "Delimiter"], + ["keyword", "Deref"], + ["keyword", "Destroy"], + ["keyword", "Digit"], + ["keyword", "Disable"], + ["keyword", "Disabled"], + ["keyword", "DropDownList"], + ["keyword", "Edit"], + ["keyword", "Eject"], + ["keyword", "Else"], + ["keyword", "Enable"], + ["keyword", "Enabled"], + ["keyword", "Error"], + ["keyword", "Exist"], + ["keyword", "Expand"], + ["keyword", "ExStyle"], + ["keyword", "FileSystem"], + ["keyword", "First"], + ["keyword", "Flash"], + ["keyword", "Float"], + ["keyword", "FloatFast"], + ["keyword", "Focus"], + ["keyword", "Font"], + ["keyword", "for"], + ["keyword", "global"], + ["keyword", "Grid"], + ["keyword", "Group"], + ["keyword", "GroupBox"], + ["keyword", "GuiClose"], + ["keyword", "GuiContextMenu"], + ["keyword", "GuiDropFiles"], + ["keyword", "GuiEscape"], + ["keyword", "GuiSize"], + ["keyword", "Hdr"], + ["keyword", "Hidden"], + ["keyword", "Hide"], + ["keyword", "High"], + ["keyword", "HKCC"], + ["keyword", "HKCR"], + ["keyword", "HKCU"], + ["keyword", "HKEY_CLASSES_ROOT"], + ["keyword", "HKEY_CURRENT_CONFIG"], + ["keyword", "HKEY_CURRENT_USER"], + ["keyword", "HKEY_LOCAL_MACHINE"], + ["keyword", "HKEY_USERS"], + ["keyword", "HKLM"], + ["keyword", "HKU"], + ["keyword", "Hours"], + ["keyword", "HScroll"], + ["keyword", "Icon"], + ["keyword", "IconSmall"], + ["keyword", "ID"], + ["keyword", "IDLast"], + ["keyword", "If"], + ["keyword", "IfEqual"], + ["keyword", "IfExist"], + ["keyword", "IfGreater"], + ["keyword", "IfGreaterOrEqual"], + ["keyword", "IfInString"], + ["keyword", "IfLess"], + ["keyword", "IfLessOrEqual"], + ["keyword", "IfMsgBox"], + ["keyword", "IfNotEqual"], + ["keyword", "IfNotExist"], + ["keyword", "IfNotInString"], + ["keyword", "IfWinActive"], + ["keyword", "IfWinExist"], + ["keyword", "IfWinNotActive"], + ["keyword", "IfWinNotExist"], + ["keyword", "Ignore"], + ["keyword", "ImageList"], + ["keyword", "in"], + ["keyword", "Integer"], + ["keyword", "IntegerFast"], + ["keyword", "Interrupt"], + ["keyword", "is"], + ["keyword", "italic"], + ["keyword", "Join"], + ["keyword", "Label"], + ["keyword", "LastFound"], + ["keyword", "LastFoundExist"], + ["keyword", "Limit"], + ["keyword", "Lines"], + ["keyword", "List"], + ["keyword", "ListBox"], + ["keyword", "ListView"], + ["keyword", "local"], + ["keyword", "Lock"], + ["keyword", "Logoff"], + ["keyword", "Low"], + ["keyword", "Lower"], + ["keyword", "Lowercase"], + ["keyword", "MainWindow"], + ["keyword", "Margin"], + ["keyword", "Maximize"], + ["keyword", "MaximizeBox"], + ["keyword", "MaxSize"], + ["keyword", "Minimize"], + ["keyword", "MinimizeBox"], + ["keyword", "MinMax"], + ["keyword", "MinSize"], + ["keyword", "Minutes"], + ["keyword", "MonthCal"], + ["keyword", "Mouse"], + ["keyword", "Move"], + ["keyword", "Multi"], + ["keyword", "NA"], + ["keyword", "No"], + ["keyword", "NoActivate"], + ["keyword", "NoDefault"], + ["keyword", "NoHide"], + ["keyword", "NoIcon"], + ["keyword", "NoMainWindow"], + ["keyword", "norm"], + ["keyword", "Normal"], + ["keyword", "NoSort"], + ["keyword", "NoSortHdr"], + ["keyword", "NoStandard"], + ["keyword", "Not"], + ["keyword", "NoTab"], + ["keyword", "NoTimers"], + ["keyword", "Number"], + ["keyword", "Off"], + ["keyword", "Ok"], + ["keyword", "On"], + ["keyword", "OwnDialogs"], + ["keyword", "Owner"], + ["keyword", "Parse"], + ["keyword", "Password"], + ["keyword", "Picture"], + ["keyword", "Pixel"], + ["keyword", "Pos"], + ["keyword", "Pow"], + ["keyword", "Priority"], + ["keyword", "ProcessName"], + ["keyword", "Radio"], + ["keyword", "Range"], + ["keyword", "Read"], + ["keyword", "ReadOnly"], + ["keyword", "Realtime"], + ["keyword", "Redraw"], + ["keyword", "REG_BINARY"], + ["keyword", "REG_DWORD"], + ["keyword", "REG_EXPAND_SZ"], + ["keyword", "REG_MULTI_SZ"], + ["keyword", "REG_SZ"], + ["keyword", "Region"], + ["keyword", "Relative"], + ["keyword", "Rename"], + ["keyword", "Report"], + ["keyword", "Resize"], + ["keyword", "Restore"], + ["keyword", "Retry"], + ["keyword", "RGB"], + ["keyword", "Screen"], + ["keyword", "Seconds"], + ["keyword", "Section"], + ["keyword", "Serial"], + ["keyword", "SetLabel"], + ["keyword", "ShiftAltTab"], + ["keyword", "Show"], + ["keyword", "Single"], + ["keyword", "Slider"], + ["keyword", "SortDesc"], + ["keyword", "Standard"], + ["keyword", "static"], + ["keyword", "Status"], + ["keyword", "StatusBar"], + ["keyword", "StatusCD"], + ["keyword", "strike"], + ["keyword", "Style"], + ["keyword", "Submit"], + ["keyword", "SysMenu"], + ["keyword", "Tab2"], + ["keyword", "TabStop"], + ["keyword", "Text"], + ["keyword", "Theme"], + ["keyword", "Tile"], + ["keyword", "ToggleCheck"], + ["keyword", "ToggleEnable"], + ["keyword", "ToolWindow"], + ["keyword", "Top"], + ["keyword", "Topmost"], + ["keyword", "TransColor"], + ["keyword", "Transparent"], + ["keyword", "Tray"], + ["keyword", "TreeView"], + ["keyword", "TryAgain"], + ["keyword", "Type"], + ["keyword", "UnCheck"], + ["keyword", "underline"], + ["keyword", "Unicode"], + ["keyword", "Unlock"], + ["keyword", "UpDown"], + ["keyword", "Upper"], + ["keyword", "Uppercase"], + ["keyword", "UseErrorLevel"], + ["keyword", "Vis"], + ["keyword", "VisFirst"], + ["keyword", "Visible"], + ["keyword", "VScroll"], + ["keyword", "Wait"], + ["keyword", "WaitClose"], + ["keyword", "WantCtrlA"], + ["keyword", "WantF2"], + ["keyword", "WantReturn"], + ["keyword", "While"], + ["keyword", "Wrap"], + ["keyword", "Xdigit"], + ["keyword", "xm"], + ["keyword", "xp"], + ["keyword", "xs"], + ["keyword", "Yes"], + ["keyword", "ym"], + ["keyword", "yp"], + ["keyword", "ys"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/number_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/number_feature.test new file mode 100644 index 0000000000..35a493aee9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/number_feature.test @@ -0,0 +1,21 @@ +42 +3.14159 +3.2e10 +2.9E-7 +0xbabe +0xBABE + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "3.2e10"], + ["number", "2.9E-7"], + ["number", "0xbabe"], + ["number", "0xBABE"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/operator_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/operator_feature.test new file mode 100644 index 0000000000..ec9e23eda1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/operator_feature.test @@ -0,0 +1,33 @@ ++ - * / += ? & | +< > +++ -- ** // +! ~ ^ . +<< >> <= >= +~= == <> != +NOT 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", "=="], ["operator", "<>"], ["operator", "!="], + ["operator", "NOT"], ["operator", "AND"], ["operator", "&&"], ["operator", "OR"], ["operator", "||"], + ["operator", ":="], ["operator", "+="], ["operator", "-="], ["operator", "*="], + ["operator", "/="], ["operator", "//="], ["operator", ".="], + ["operator", "|="], ["operator", "&="], ["operator", "^="], + ["operator", ">>="], ["operator", "<<="] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/selector_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/selector_feature.test new file mode 100644 index 0000000000..29210c265b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/selector_feature.test @@ -0,0 +1,381 @@ +AutoTrim +BlockInput +Break +Click +ClipWait +Continue +Control +ControlClick +ControlFocus +ControlGet +ControlGetFocus +ControlGetPos +ControlGetText +ControlMove +ControlSend +ControlSendRaw +ControlSetText +CoordMode +Critical +DetectHiddenText +DetectHiddenWindows +Drive +DriveGet +DriveSpaceFree +EnvAdd +EnvDiv +EnvGet +EnvMult +EnvSet +EnvSub +EnvUpdate +Exit +ExitApp +FileAppend +FileCopy +FileCopyDir +FileCreateDir +FileCreateShortcut +FileDelete +FileEncoding +FileGetAttrib +FileGetShortcut +FileGetSize +FileGetTime +FileGetVersion +FileInstall +FileMove +FileMoveDir +FileRead +FileReadLine +FileRecycle +FileRecycleEmpty +FileRemoveDir +FileSelectFile +FileSelectFolder +FileSetAttrib +FileSetTime +FormatTime +GetKeyState +Gosub +Goto +GroupActivate +GroupAdd +GroupClose +GroupDeactivate +Gui +GuiControl +GuiControlGet +Hotkey +ImageSearch +IniDelete +IniRead +IniWrite +Input +InputBox +KeyWait +ListHotkeys +ListLines +ListVars +Loop +Menu +MouseClick +MouseClickDrag +MouseGetPos +MouseMove +MsgBox +OnExit +OutputDebug +Pause +PixelGetColor +PixelSearch +PostMessage +Process +Progress +Random +RegDelete +RegRead +RegWrite +Reload +Repeat +Return +Run +RunAs +RunWait +Send +SendEvent +SendInput +SendMessage +SendMode +SendPlay +SendRaw +SetBatchLines +SetCapslockState +SetControlDelay +SetDefaultMouseSpeed +SetEnv +SetFormat +SetKeyDelay +SetMouseDelay +SetNumlockState +SetScrollLockState +SetStoreCapslockMode +SetTimer +SetTitleMatchMode +SetWinDelay +SetWorkingDir +Shutdown +Sleep +Sort +SoundBeep +SoundGet +SoundGetWaveVolume +SoundPlay +SoundSet +SoundSetWaveVolume +SplashImage +SplashTextOff +SplashTextOn +SplitPath +StatusBarGetText +StatusBarWait +StringCaseSense +StringGetPos +StringLeft +StringLen +StringLower +StringMid +StringReplace +StringRight +StringSplit +StringTrimLeft +StringTrimRight +StringUpper +Suspend +SysGet +Thread +ToolTip +Transform +TrayTip +URLDownloadToFile +WinActivate +WinActivateBottom +WinClose +WinGet +WinGetActiveStats +WinGetActiveTitle +WinGetClass +WinGetPos +WinGetText +WinGetTitle +WinHide +WinKill +WinMaximize +WinMenuSelectItem +WinMinimize +WinMinimizeAll +WinMinimizeAllUndo +WinMove +WinRestore +WinSet +WinSetTitle +WinShow +WinWait +WinWaitActive +WinWaitClose +WinWaitNotActive + +---------------------------------------------------- + +[ + ["selector", "AutoTrim"], + ["selector", "BlockInput"], + ["selector", "Break"], + ["selector", "Click"], + ["selector", "ClipWait"], + ["selector", "Continue"], + ["selector", "Control"], + ["selector", "ControlClick"], + ["selector", "ControlFocus"], + ["selector", "ControlGet"], + ["selector", "ControlGetFocus"], + ["selector", "ControlGetPos"], + ["selector", "ControlGetText"], + ["selector", "ControlMove"], + ["selector", "ControlSend"], + ["selector", "ControlSendRaw"], + ["selector", "ControlSetText"], + ["selector", "CoordMode"], + ["selector", "Critical"], + ["selector", "DetectHiddenText"], + ["selector", "DetectHiddenWindows"], + ["selector", "Drive"], + ["selector", "DriveGet"], + ["selector", "DriveSpaceFree"], + ["selector", "EnvAdd"], + ["selector", "EnvDiv"], + ["selector", "EnvGet"], + ["selector", "EnvMult"], + ["selector", "EnvSet"], + ["selector", "EnvSub"], + ["selector", "EnvUpdate"], + ["selector", "Exit"], + ["selector", "ExitApp"], + ["selector", "FileAppend"], + ["selector", "FileCopy"], + ["selector", "FileCopyDir"], + ["selector", "FileCreateDir"], + ["selector", "FileCreateShortcut"], + ["selector", "FileDelete"], + ["selector", "FileEncoding"], + ["selector", "FileGetAttrib"], + ["selector", "FileGetShortcut"], + ["selector", "FileGetSize"], + ["selector", "FileGetTime"], + ["selector", "FileGetVersion"], + ["selector", "FileInstall"], + ["selector", "FileMove"], + ["selector", "FileMoveDir"], + ["selector", "FileRead"], + ["selector", "FileReadLine"], + ["selector", "FileRecycle"], + ["selector", "FileRecycleEmpty"], + ["selector", "FileRemoveDir"], + ["selector", "FileSelectFile"], + ["selector", "FileSelectFolder"], + ["selector", "FileSetAttrib"], + ["selector", "FileSetTime"], + ["selector", "FormatTime"], + ["selector", "GetKeyState"], + ["selector", "Gosub"], + ["selector", "Goto"], + ["selector", "GroupActivate"], + ["selector", "GroupAdd"], + ["selector", "GroupClose"], + ["selector", "GroupDeactivate"], + ["selector", "Gui"], + ["selector", "GuiControl"], + ["selector", "GuiControlGet"], + ["selector", "Hotkey"], + ["selector", "ImageSearch"], + ["selector", "IniDelete"], + ["selector", "IniRead"], + ["selector", "IniWrite"], + ["selector", "Input"], + ["selector", "InputBox"], + ["selector", "KeyWait"], + ["selector", "ListHotkeys"], + ["selector", "ListLines"], + ["selector", "ListVars"], + ["selector", "Loop"], + ["selector", "Menu"], + ["selector", "MouseClick"], + ["selector", "MouseClickDrag"], + ["selector", "MouseGetPos"], + ["selector", "MouseMove"], + ["selector", "MsgBox"], + ["selector", "OnExit"], + ["selector", "OutputDebug"], + ["selector", "Pause"], + ["selector", "PixelGetColor"], + ["selector", "PixelSearch"], + ["selector", "PostMessage"], + ["selector", "Process"], + ["selector", "Progress"], + ["selector", "Random"], + ["selector", "RegDelete"], + ["selector", "RegRead"], + ["selector", "RegWrite"], + ["selector", "Reload"], + ["selector", "Repeat"], + ["selector", "Return"], + ["selector", "Run"], + ["selector", "RunAs"], + ["selector", "RunWait"], + ["selector", "Send"], + ["selector", "SendEvent"], + ["selector", "SendInput"], + ["selector", "SendMessage"], + ["selector", "SendMode"], + ["selector", "SendPlay"], + ["selector", "SendRaw"], + ["selector", "SetBatchLines"], + ["selector", "SetCapslockState"], + ["selector", "SetControlDelay"], + ["selector", "SetDefaultMouseSpeed"], + ["selector", "SetEnv"], + ["selector", "SetFormat"], + ["selector", "SetKeyDelay"], + ["selector", "SetMouseDelay"], + ["selector", "SetNumlockState"], + ["selector", "SetScrollLockState"], + ["selector", "SetStoreCapslockMode"], + ["selector", "SetTimer"], + ["selector", "SetTitleMatchMode"], + ["selector", "SetWinDelay"], + ["selector", "SetWorkingDir"], + ["selector", "Shutdown"], + ["selector", "Sleep"], + ["selector", "Sort"], + ["selector", "SoundBeep"], + ["selector", "SoundGet"], + ["selector", "SoundGetWaveVolume"], + ["selector", "SoundPlay"], + ["selector", "SoundSet"], + ["selector", "SoundSetWaveVolume"], + ["selector", "SplashImage"], + ["selector", "SplashTextOff"], + ["selector", "SplashTextOn"], + ["selector", "SplitPath"], + ["selector", "StatusBarGetText"], + ["selector", "StatusBarWait"], + ["selector", "StringCaseSense"], + ["selector", "StringGetPos"], + ["selector", "StringLeft"], + ["selector", "StringLen"], + ["selector", "StringLower"], + ["selector", "StringMid"], + ["selector", "StringReplace"], + ["selector", "StringRight"], + ["selector", "StringSplit"], + ["selector", "StringTrimLeft"], + ["selector", "StringTrimRight"], + ["selector", "StringUpper"], + ["selector", "Suspend"], + ["selector", "SysGet"], + ["selector", "Thread"], + ["selector", "ToolTip"], + ["selector", "Transform"], + ["selector", "TrayTip"], + ["selector", "URLDownloadToFile"], + ["selector", "WinActivate"], + ["selector", "WinActivateBottom"], + ["selector", "WinClose"], + ["selector", "WinGet"], + ["selector", "WinGetActiveStats"], + ["selector", "WinGetActiveTitle"], + ["selector", "WinGetClass"], + ["selector", "WinGetPos"], + ["selector", "WinGetText"], + ["selector", "WinGetTitle"], + ["selector", "WinHide"], + ["selector", "WinKill"], + ["selector", "WinMaximize"], + ["selector", "WinMenuSelectItem"], + ["selector", "WinMinimize"], + ["selector", "WinMinimizeAll"], + ["selector", "WinMinimizeAllUndo"], + ["selector", "WinMove"], + ["selector", "WinRestore"], + ["selector", "WinSet"], + ["selector", "WinSetTitle"], + ["selector", "WinShow"], + ["selector", "WinWait"], + ["selector", "WinWaitActive"], + ["selector", "WinWaitClose"], + ["selector", "WinWaitNotActive"] +] + +---------------------------------------------------- + +Checks for all selectors. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/string_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/string_feature.test new file mode 100644 index 0000000000..76168fd271 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/string_feature.test @@ -0,0 +1,15 @@ +"" +"foo" +"foo""bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\"\"bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/symbol_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/symbol_feature.test new file mode 100644 index 0000000000..2c47777427 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/symbol_feature.test @@ -0,0 +1,347 @@ +alt +altdown +altup +appskey +backspace +browser_back +browser_favorites +browser_forward +browser_home +browser_refresh +browser_search +browser_stop +bs +capslock +ctrl +ctrlbreak +ctrldown +ctrlup +del +delete +down +end +enter +esc +escape +f1 +f10 +f11 +f12 +f13 +f14 +f15 +f16 +f17 +f18 +f19 +f2 +f20 +f21 +f22 +f23 +f24 +f3 +f4 +f5 +f6 +f7 +f8 +f9 +home +ins +insert +joy1 +joy10 +joy11 +joy12 +joy13 +joy14 +joy15 +joy16 +joy17 +joy18 +joy19 +joy2 +joy20 +joy21 +joy22 +joy23 +joy24 +joy25 +joy26 +joy27 +joy28 +joy29 +joy3 +joy30 +joy31 +joy32 +joy4 +joy5 +joy6 +joy7 +joy8 +joy9 +joyaxes +joybuttons +joyinfo +joyname +joypov +joyr +joyu +joyv +joyx +joyy +joyz +lalt +launch_app1 +launch_app2 +launch_mail +launch_media +lbutton +lcontrol +lctrl +left +lshift +lwin +lwindown +lwinup +mbutton +media_next +media_play_pause +media_prev +media_stop +numlock +numpad0 +numpad1 +numpad2 +numpad3 +numpad4 +numpad5 +numpad6 +numpad7 +numpad8 +numpad9 +numpadadd +numpadclear +numpaddel +numpaddiv +numpaddot +numpaddown +numpadend +numpadenter +numpadhome +numpadins +numpadleft +numpadmult +numpadpgdn +numpadpgup +numpadright +numpadsub +numpadup +pgdn +pgup +printscreen +ralt +rbutton +rcontrol +rctrl +right +rshift +rwin +rwindown +rwinup +scrolllock +shift +shiftdown +shiftup +space +tab +up +volume_down +volume_mute +volume_up +wheeldown +wheelleft +wheelright +wheelup +xbutton1 +xbutton2 + +---------------------------------------------------- + +[ + ["symbol", "alt"], + ["symbol", "altdown"], + ["symbol", "altup"], + ["symbol", "appskey"], + ["symbol", "backspace"], + ["symbol", "browser_back"], + ["symbol", "browser_favorites"], + ["symbol", "browser_forward"], + ["symbol", "browser_home"], + ["symbol", "browser_refresh"], + ["symbol", "browser_search"], + ["symbol", "browser_stop"], + ["symbol", "bs"], + ["symbol", "capslock"], + ["symbol", "ctrl"], + ["symbol", "ctrlbreak"], + ["symbol", "ctrldown"], + ["symbol", "ctrlup"], + ["symbol", "del"], + ["symbol", "delete"], + ["symbol", "down"], + ["symbol", "end"], + ["symbol", "enter"], + ["symbol", "esc"], + ["symbol", "escape"], + ["symbol", "f1"], + ["symbol", "f10"], + ["symbol", "f11"], + ["symbol", "f12"], + ["symbol", "f13"], + ["symbol", "f14"], + ["symbol", "f15"], + ["symbol", "f16"], + ["symbol", "f17"], + ["symbol", "f18"], + ["symbol", "f19"], + ["symbol", "f2"], + ["symbol", "f20"], + ["symbol", "f21"], + ["symbol", "f22"], + ["symbol", "f23"], + ["symbol", "f24"], + ["symbol", "f3"], + ["symbol", "f4"], + ["symbol", "f5"], + ["symbol", "f6"], + ["symbol", "f7"], + ["symbol", "f8"], + ["symbol", "f9"], + ["symbol", "home"], + ["symbol", "ins"], + ["symbol", "insert"], + ["symbol", "joy1"], + ["symbol", "joy10"], + ["symbol", "joy11"], + ["symbol", "joy12"], + ["symbol", "joy13"], + ["symbol", "joy14"], + ["symbol", "joy15"], + ["symbol", "joy16"], + ["symbol", "joy17"], + ["symbol", "joy18"], + ["symbol", "joy19"], + ["symbol", "joy2"], + ["symbol", "joy20"], + ["symbol", "joy21"], + ["symbol", "joy22"], + ["symbol", "joy23"], + ["symbol", "joy24"], + ["symbol", "joy25"], + ["symbol", "joy26"], + ["symbol", "joy27"], + ["symbol", "joy28"], + ["symbol", "joy29"], + ["symbol", "joy3"], + ["symbol", "joy30"], + ["symbol", "joy31"], + ["symbol", "joy32"], + ["symbol", "joy4"], + ["symbol", "joy5"], + ["symbol", "joy6"], + ["symbol", "joy7"], + ["symbol", "joy8"], + ["symbol", "joy9"], + ["symbol", "joyaxes"], + ["symbol", "joybuttons"], + ["symbol", "joyinfo"], + ["symbol", "joyname"], + ["symbol", "joypov"], + ["symbol", "joyr"], + ["symbol", "joyu"], + ["symbol", "joyv"], + ["symbol", "joyx"], + ["symbol", "joyy"], + ["symbol", "joyz"], + ["symbol", "lalt"], + ["symbol", "launch_app1"], + ["symbol", "launch_app2"], + ["symbol", "launch_mail"], + ["symbol", "launch_media"], + ["symbol", "lbutton"], + ["symbol", "lcontrol"], + ["symbol", "lctrl"], + ["symbol", "left"], + ["symbol", "lshift"], + ["symbol", "lwin"], + ["symbol", "lwindown"], + ["symbol", "lwinup"], + ["symbol", "mbutton"], + ["symbol", "media_next"], + ["symbol", "media_play_pause"], + ["symbol", "media_prev"], + ["symbol", "media_stop"], + ["symbol", "numlock"], + ["symbol", "numpad0"], + ["symbol", "numpad1"], + ["symbol", "numpad2"], + ["symbol", "numpad3"], + ["symbol", "numpad4"], + ["symbol", "numpad5"], + ["symbol", "numpad6"], + ["symbol", "numpad7"], + ["symbol", "numpad8"], + ["symbol", "numpad9"], + ["symbol", "numpadadd"], + ["symbol", "numpadclear"], + ["symbol", "numpaddel"], + ["symbol", "numpaddiv"], + ["symbol", "numpaddot"], + ["symbol", "numpaddown"], + ["symbol", "numpadend"], + ["symbol", "numpadenter"], + ["symbol", "numpadhome"], + ["symbol", "numpadins"], + ["symbol", "numpadleft"], + ["symbol", "numpadmult"], + ["symbol", "numpadpgdn"], + ["symbol", "numpadpgup"], + ["symbol", "numpadright"], + ["symbol", "numpadsub"], + ["symbol", "numpadup"], + ["symbol", "pgdn"], + ["symbol", "pgup"], + ["symbol", "printscreen"], + ["symbol", "ralt"], + ["symbol", "rbutton"], + ["symbol", "rcontrol"], + ["symbol", "rctrl"], + ["symbol", "right"], + ["symbol", "rshift"], + ["symbol", "rwin"], + ["symbol", "rwindown"], + ["symbol", "rwinup"], + ["symbol", "scrolllock"], + ["symbol", "shift"], + ["symbol", "shiftdown"], + ["symbol", "shiftup"], + ["symbol", "space"], + ["symbol", "tab"], + ["symbol", "up"], + ["symbol", "volume_down"], + ["symbol", "volume_mute"], + ["symbol", "volume_up"], + ["symbol", "wheeldown"], + ["symbol", "wheelleft"], + ["symbol", "wheelright"], + ["symbol", "wheelup"], + ["symbol", "xbutton1"], + ["symbol", "xbutton2"] +] + +---------------------------------------------------- + +Checks for all symbols. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/tag_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/tag_feature.test new file mode 100644 index 0000000000..0ca92589e4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/tag_feature.test @@ -0,0 +1,15 @@ +foo: +foo_bar: + +---------------------------------------------------- + +[ + ["tag", "foo"], + ["punctuation", ":"], + ["tag", "foo_bar"], + ["punctuation", ":"] +] + +---------------------------------------------------- + +Checks for tags (labels). \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autohotkey/variable_feature.test b/docs/_style/prism-master/tests/languages/autohotkey/variable_feature.test new file mode 100644 index 0000000000..5ed8a4c518 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autohotkey/variable_feature.test @@ -0,0 +1,13 @@ +%foo% +%foo_bar% + +---------------------------------------------------- + +[ + ["variable", "%foo%"], + ["variable", "%foo_bar%"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/boolean_feature.test b/docs/_style/prism-master/tests/languages/autoit/boolean_feature.test new file mode 100644 index 0000000000..5750be06cf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/boolean_feature.test @@ -0,0 +1,13 @@ +True +False + +---------------------------------------------------- + +[ + ["boolean", "True"], + ["boolean", "False"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/comment_feature.test b/docs/_style/prism-master/tests/languages/autoit/comment_feature.test new file mode 100644 index 0000000000..d88708f344 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/comment_feature.test @@ -0,0 +1,33 @@ +; +; foo +#comments-start + foobar() +#comments-end +#cs + foobar() +#ce +;#comments-start + foobar() +;#comments-end +;#cs + foobar() +;#ce + +---------------------------------------------------- + +[ + ["comment", ";"], + ["comment", "; foo"], + ["comment", "#comments-start\r\n\tfoobar()\r\n#comments-end"], + ["comment", "#cs\r\n\tfoobar()\r\n#ce"], + ["comment", ";#comments-start"], + ["function", "foobar"], ["punctuation", "("], ["punctuation", ")"], + ["comment", ";#comments-end"], + ["comment", ";#cs"], + ["function", "foobar"], ["punctuation", "("], ["punctuation", ")"], + ["comment", ";#ce"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/directive_feature.test b/docs/_style/prism-master/tests/languages/autoit/directive_feature.test new file mode 100644 index 0000000000..9219f700a0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/directive_feature.test @@ -0,0 +1,13 @@ +#NoTrayIcon +#OnAutoItStartRegister "Example" + +---------------------------------------------------- + +[ + ["directive", "#NoTrayIcon"], + ["directive", "#OnAutoItStartRegister"], ["string", ["\"Example\""]] +] + +---------------------------------------------------- + +Checks for directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/function_feature.test b/docs/_style/prism-master/tests/languages/autoit/function_feature.test new file mode 100644 index 0000000000..13c82ddad2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/function_feature.test @@ -0,0 +1,15 @@ +foo() +foo_bar() +foo_bar_42() + +---------------------------------------------------- + +[ + ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo_bar_42"], ["punctuation", "("], ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/keyword_feature.test b/docs/_style/prism-master/tests/languages/autoit/keyword_feature.test new file mode 100644 index 0000000000..2db276cb77 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/keyword_feature.test @@ -0,0 +1,83 @@ +Case +Const +ContinueCase +ContinueLoop +Default +Dim +Do +Else +ElseIf +EndFunc +EndIf +EndSelect +EndSwitch +EndWith +Enum +Exit +ExitLoop +For +Func +Global +If +In +Local +Next +Null +ReDim +Select +Static +Step +Switch +Then +To +Until +Volatile +WEnd +While +With + +---------------------------------------------------- + +[ + ["keyword", "Case"], + ["keyword", "Const"], + ["keyword", "ContinueCase"], + ["keyword", "ContinueLoop"], + ["keyword", "Default"], + ["keyword", "Dim"], + ["keyword", "Do"], + ["keyword", "Else"], + ["keyword", "ElseIf"], + ["keyword", "EndFunc"], + ["keyword", "EndIf"], + ["keyword", "EndSelect"], + ["keyword", "EndSwitch"], + ["keyword", "EndWith"], + ["keyword", "Enum"], + ["keyword", "Exit"], + ["keyword", "ExitLoop"], + ["keyword", "For"], + ["keyword", "Func"], + ["keyword", "Global"], + ["keyword", "If"], + ["keyword", "In"], + ["keyword", "Local"], + ["keyword", "Next"], + ["keyword", "Null"], + ["keyword", "ReDim"], + ["keyword", "Select"], + ["keyword", "Static"], + ["keyword", "Step"], + ["keyword", "Switch"], + ["keyword", "Then"], + ["keyword", "To"], + ["keyword", "Until"], + ["keyword", "Volatile"], + ["keyword", "WEnd"], + ["keyword", "While"], + ["keyword", "With"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/number_feature.test b/docs/_style/prism-master/tests/languages/autoit/number_feature.test new file mode 100644 index 0000000000..5c6ac5bcaa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/number_feature.test @@ -0,0 +1,21 @@ +42 +3.14159 +4e8 +3.5E-9 +0.7e+12 +0xBadFace + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e8"], + ["number", "3.5E-9"], + ["number", "0.7e+12"], + ["number", "0xBadFace"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/operator_feature.test b/docs/_style/prism-master/tests/languages/autoit/operator_feature.test new file mode 100644 index 0000000000..65f4ce4d1f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/operator_feature.test @@ -0,0 +1,23 @@ +< <= <> +> >= ++ += - -= +* *= / /= +& &= +? ^ +And Or Not + +---------------------------------------------------- + +[ + ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "+="], ["operator", "-"], ["operator", "-="], + ["operator", "*"], ["operator", "*="], ["operator", "/"], ["operator", "/="], + ["operator", "&"], ["operator", "&="], + ["operator", "?"], ["operator", "^"], + ["operator", "And"], ["operator", "Or"], ["operator", "Not"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/string_feature.test b/docs/_style/prism-master/tests/languages/autoit/string_feature.test new file mode 100644 index 0000000000..5ae4bb70fd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/string_feature.test @@ -0,0 +1,37 @@ +"" +"foo""bar" +"foo %foo% bar $bar$ baz @baz@" +'' +'foo''bar' +'foo %foo% bar $bar$ baz @baz@' + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["\"foo\"\"bar\""]], + ["string", [ + "\"foo ", + ["variable", "%foo%"], + " bar ", + ["variable", "$bar$"], + " baz ", + ["variable", "@baz@"], + "\"" + ]], + ["string", ["''"]], + ["string", ["'foo''bar'"]], + ["string", [ + "'foo ", + ["variable", "%foo%"], + " bar ", + ["variable", "$bar$"], + " baz ", + ["variable", "@baz@"], + "'" + ]] +] + +---------------------------------------------------- + +Checks for strings and interpolation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/url_feature.test b/docs/_style/prism-master/tests/languages/autoit/url_feature.test new file mode 100644 index 0000000000..1f6d3cd496 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/url_feature.test @@ -0,0 +1,15 @@ +#include +#include "foo.au3" + +---------------------------------------------------- + +[ + ["directive", "#include"], + ["url", ""], + ["directive", "#include"], + ["url", "\"foo.au3\""] +] + +---------------------------------------------------- + +Checks for files in includes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/autoit/variable_feature.test b/docs/_style/prism-master/tests/languages/autoit/variable_feature.test new file mode 100644 index 0000000000..e36ffe327a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/autoit/variable_feature.test @@ -0,0 +1,19 @@ +$foo +$foo_bar_42 +@ComputerName +@CPUArch +@TAB + +---------------------------------------------------- + +[ + ["variable", "$foo"], + ["variable", "$foo_bar_42"], + ["variable", "@ComputerName"], + ["variable", "@CPUArch"], + ["variable", "@TAB"] +] + +---------------------------------------------------- + +Checks for variables and macros. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/arithmetic_environment_feature.test b/docs/_style/prism-master/tests/languages/bash/arithmetic_environment_feature.test new file mode 100644 index 0000000000..a9c5663dc1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/arithmetic_environment_feature.test @@ -0,0 +1,53 @@ +(( 4 + 5 )) +$((5 * 7)) +"foo $((5 * 7)) bar" +for (( NUM=1 ; NUM<=1000 ; NUM++ )) + +---------------------------------------------------- + +[ + ["variable", [ + ["punctuation", "(("], + ["number", "4"], + ["operator", "+"], + ["number", "5"], + ["punctuation", "))"] + ]], + ["variable", [ + ["variable", "$(("], + ["number", "5"], + ["operator", "*"], + ["number", "7"], + ["variable", "))"] + ]], + ["string", [ + "\"foo ", + ["variable", [ + ["variable", "$(("], + ["number", "5"], + ["operator", "*"], + ["number", "7"], + ["variable", "))"] + ]], + " bar\"" + ]], + ["keyword", "for"], + ["variable", [ + ["punctuation", "(("], + " NUM", + ["operator", "="], + ["number", "1"], + ["punctuation", ";"], + " NUM", + ["operator", "<="], + ["number", "1000"], + ["punctuation", ";"], + " NUM", + ["operator", "++"], + ["punctuation", "))"] + ]] +] + +---------------------------------------------------- + +Checks arithmetic environments \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/command_substitution_feature.test b/docs/_style/prism-master/tests/languages/bash/command_substitution_feature.test new file mode 100644 index 0000000000..2b78b51851 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/command_substitution_feature.test @@ -0,0 +1,45 @@ +$(echo "foo") +`echo "foo"` +"$(echo "foo") bar" +"`echo "foo"` bar" + +---------------------------------------------------- + +[ + ["variable", [ + ["variable", "$("], + ["keyword", "echo"], + ["string", ["\"foo\""]], + ["variable", ")"] + ]], + ["variable", [ + ["variable", "`"], + ["keyword", "echo"], + ["string", ["\"foo\""]], + ["variable", "`"] + ]], + ["string", [ + "\"", + ["variable", [ + ["variable", "$("], + ["keyword", "echo"], + ["string", ["\"foo\""]], + ["variable", ")"] + ]], + " bar\"" + ]], + ["string", [ + "\"", + ["variable", [ + ["variable", "`"], + ["keyword", "echo"], + ["string", ["\"foo\""]], + ["variable", "`"] + ]], + " bar\"" + ]] +] + +---------------------------------------------------- + +Checks for command substitution. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/comment_feature.test b/docs/_style/prism-master/tests/languages/bash/comment_feature.test new file mode 100644 index 0000000000..58249096f0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/comment_feature.test @@ -0,0 +1,13 @@ +#foo +# bar + +---------------------------------------------------- + +[ + ["comment", "#foo"], + ["comment", "# bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/function_feature.test b/docs/_style/prism-master/tests/languages/bash/function_feature.test new file mode 100644 index 0000000000..f3fb71232b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/function_feature.test @@ -0,0 +1,101 @@ +alias apropos apt apt-cache apt-get aptitude aspell +automysqlbackup awk basename bash bc bconsole bg +builtin bzip2 cal cat cd +cfdisk chgrp chmod chown chroot +chkconfig cksum clear cmp comm +command cp cron crontab csplit +curl cut date dc dd ddrescue debootstrap +df diff diff3 dig dir dircolors +dirname dirs dmesg du +egrep eject enable env ethtool +eval exec expand expect +export expr fdformat fdisk +fg fgrep file find fmt +fold format free fsck ftp +fuser gawk getopts git gparted grep +groupadd groupdel groupmod groups grub-mkconfig +gzip halt hash head help hg history host +hostname htop iconv id ifconfig +ifdown ifup import install ip jobs +join kill killall less link ln +locate logname logout logrotate look lpc lpr +lprint lprintd lprintq lprm ls +lsof lynx make man mc mdadm mkconfig mkdir mke2fs mkfifo +mkfs mkisofs mknod mkswap more most mount +mtools mtr mutt mv mmv nano nc netstat +nice nl nohup notify-send nslookup +open parted op passwd paste pathchk ping +pkill popd pr printcap printenv +printf ps pushd pv pwd quota +quotacheck quotactl ram rar rcp +read readarray readonly reboot +rename renice remsync rev rm +rmdir rpm rsync screen scp sdiff sed sendmail +seq service sftp shift +shopt shutdown sleep slocate +sort source split ssh stat strace +su sudo sum suspend swapon sync tail tar +tee test time timeout times +touch top traceroute trap tr +tsort tty type ulimit umask +umount unalias uname unexpand uniq +units unrar unshar unzip update-grub uptime +useradd userdel usermod users uuencode +uudecode vdir vi vim virsh vmstat wait watch +wc wget whereis which who whoami write +xargs xdg-open yes zip zypper + +---------------------------------------------------- + +[ + ["function", "alias"], ["function", "apropos"], ["function", "apt"], ["function", "apt-cache"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"], + ["function", "automysqlbackup"], ["function", "awk"], ["function", "basename"], ["function", "bash"], ["function", "bc"], ["function", "bconsole"], ["function", "bg"], + ["function", "builtin"], ["function", "bzip2"], ["function", "cal"], ["function", "cat"], ["function", "cd"], + ["function", "cfdisk"], ["function", "chgrp"], ["function", "chmod"], ["function", "chown"], ["function", "chroot"], + ["function", "chkconfig"], ["function", "cksum"], ["function", "clear"], ["function", "cmp"], ["function", "comm"], + ["function", "command"], ["function", "cp"], ["function", "cron"], ["function", "crontab"], ["function", "csplit"], + ["function", "curl"], ["function", "cut"], ["function", "date"], ["function", "dc"], ["function", "dd"], ["function", "ddrescue"], ["function", "debootstrap"], + ["function", "df"], ["function", "diff"], ["function", "diff3"], ["function", "dig"], ["function", "dir"], ["function", "dircolors"], + ["function", "dirname"], ["function", "dirs"], ["function", "dmesg"], ["function", "du"], + ["function", "egrep"], ["function", "eject"], ["function", "enable"], ["function", "env"], ["function", "ethtool"], + ["function", "eval"], ["function", "exec"], ["function", "expand"], ["function", "expect"], + ["function", "export"], ["function", "expr"], ["function", "fdformat"], ["function", "fdisk"], + ["function", "fg"], ["function", "fgrep"], ["function", "file"], ["function", "find"], ["function", "fmt"], + ["function", "fold"], ["function", "format"], ["function", "free"], ["function", "fsck"], ["function", "ftp"], + ["function", "fuser"], ["function", "gawk"], ["function", "getopts"], ["function", "git"], ["function", "gparted"], ["function", "grep"], + ["function", "groupadd"], ["function", "groupdel"], ["function", "groupmod"], ["function", "groups"], ["function", "grub-mkconfig"], + ["function", "gzip"], ["function", "halt"], ["function", "hash"], ["function", "head"], ["function", "help"], ["function", "hg"], ["function", "history"], ["function", "host"], + ["function", "hostname"], ["function", "htop"], ["function", "iconv"], ["function", "id"], ["function", "ifconfig"], + ["function", "ifdown"], ["function", "ifup"], ["function", "import"], ["function", "install"], ["function", "ip"], ["function", "jobs"], + ["function", "join"], ["function", "kill"], ["function", "killall"], ["function", "less"], ["function", "link"], ["function", "ln"], + ["function", "locate"], ["function", "logname"], ["function", "logout"], ["function", "logrotate"], ["function", "look"], ["function", "lpc"], ["function", "lpr"], + ["function", "lprint"], ["function", "lprintd"], ["function", "lprintq"], ["function", "lprm"], ["function", "ls"], + ["function", "lsof"], ["function", "lynx"], ["function", "make"], ["function", "man"], ["function", "mc"], ["function", "mdadm"], ["function", "mkconfig"], ["function", "mkdir"], ["function", "mke2fs"], ["function", "mkfifo"], + ["function", "mkfs"], ["function", "mkisofs"], ["function", "mknod"], ["function", "mkswap"], ["function", "more"], ["function", "most"], ["function", "mount"], + ["function", "mtools"], ["function", "mtr"], ["function", "mutt"], ["function", "mv"], ["function", "mmv"], ["function", "nano"], ["function", "nc"], ["function", "netstat"], + ["function", "nice"], ["function", "nl"], ["function", "nohup"], ["function", "notify-send"], ["function", "nslookup"], + ["function", "open"], ["function", "parted"], ["function", "op"], ["function", "passwd"], ["function", "paste"], ["function", "pathchk"], ["function", "ping"], + ["function", "pkill"], ["function", "popd"], ["function", "pr"], ["function", "printcap"], ["function", "printenv"], + ["function", "printf"], ["function", "ps"], ["function", "pushd"], ["function", "pv"], ["function", "pwd"], ["function", "quota"], + ["function", "quotacheck"], ["function", "quotactl"], ["function", "ram"], ["function", "rar"], ["function", "rcp"], + ["function", "read"], ["function", "readarray"], ["function", "readonly"], ["function", "reboot"], + ["function", "rename"], ["function", "renice"], ["function", "remsync"], ["function", "rev"], ["function", "rm"], + ["function", "rmdir"], ["function", "rpm"], ["function", "rsync"], ["function", "screen"], ["function", "scp"], ["function", "sdiff"], ["function", "sed"], ["function", "sendmail"], + ["function", "seq"], ["function", "service"], ["function", "sftp"], ["function", "shift"], + ["function", "shopt"], ["function", "shutdown"], ["function", "sleep"], ["function", "slocate"], + ["function", "sort"], ["function", "source"], ["function", "split"], ["function", "ssh"], ["function", "stat"], ["function", "strace"], + ["function", "su"], ["function", "sudo"], ["function", "sum"], ["function", "suspend"], ["function", "swapon"], ["function", "sync"], ["function", "tail"], ["function", "tar"], + ["function", "tee"], ["function", "test"], ["function", "time"], ["function", "timeout"], ["function", "times"], + ["function", "touch"], ["function", "top"], ["function", "traceroute"], ["function", "trap"], ["function", "tr"], + ["function", "tsort"], ["function", "tty"], ["function", "type"], ["function", "ulimit"], ["function", "umask"], + ["function", "umount"], ["function", "unalias"], ["function", "uname"], ["function", "unexpand"], ["function", "uniq"], + ["function", "units"], ["function", "unrar"], ["function", "unshar"], ["function", "unzip"], ["function", "update-grub"], ["function", "uptime"], + ["function", "useradd"], ["function", "userdel"], ["function", "usermod"], ["function", "users"], ["function", "uuencode"], + ["function", "uudecode"], ["function", "vdir"], ["function", "vi"], ["function", "vim"], ["function", "virsh"], ["function", "vmstat"], ["function", "wait"], ["function", "watch"], + ["function", "wc"], ["function", "wget"], ["function", "whereis"], ["function", "which"], ["function", "who"], ["function", "whoami"], ["function", "write"], + ["function", "xargs"], ["function", "xdg-open"], ["function", "yes"], ["function", "zip"], ["function", "zypper"] +] + +---------------------------------------------------- + +Checks for all functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/keyword_feature.test b/docs/_style/prism-master/tests/languages/bash/keyword_feature.test new file mode 100644 index 0000000000..b3bacf55af --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/keyword_feature.test @@ -0,0 +1,20 @@ +if then else elif fi +for break continue while +in case function select +do done until echo exit +return set declare +. : +---------------------------------------------------- + +[ + ["keyword", "if"], ["keyword", "then"], ["keyword", "else"], ["keyword", "elif"], ["keyword", "fi"], + ["keyword", "for"], ["keyword", "break"], ["keyword", "continue"], ["keyword", "while"], + ["keyword", "in"], ["keyword", "case"], ["keyword", "function"], ["keyword", "select"], + ["keyword", "do"], ["keyword", "done"], ["keyword", "until"], ["keyword", "echo"], ["keyword", "exit"], + ["keyword", "return"], ["keyword", "set"], ["keyword", "declare"], + ["keyword", "."], ["keyword", ":"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/shebang_feature.test b/docs/_style/prism-master/tests/languages/bash/shebang_feature.test new file mode 100644 index 0000000000..c41860d026 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/shebang_feature.test @@ -0,0 +1,11 @@ +#!/bin/bash + +---------------------------------------------------- + +[ + ["shebang", "#!/bin/bash"] +] + +---------------------------------------------------- + +Checks for shebang. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/string_feature.test b/docs/_style/prism-master/tests/languages/bash/string_feature.test new file mode 100644 index 0000000000..fd2a30317d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/string_feature.test @@ -0,0 +1,67 @@ +"" +'' +"foo" +'foo' +"foo +bar" +'foo +bar' +"'foo'" +'"bar"' +"$@" +"${foo}" +<< STRING_END +foo +bar +STRING_END +<< EOF +foo $@ +bar +EOF +<< 'EOF' +'single quoted string' +"double quoted string" +EOF +<< "EOF" +foo +bar +EOF +<< STRING_END +# comment +STRING_END +" # comment " + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["''"]], + ["string", ["\"foo\""]], + ["string", ["'foo'"]], + ["string", ["\"foo\r\nbar\""]], + ["string", ["'foo\r\nbar'"]], + ["string", ["\"'foo'\""]], + ["string", ["'\"bar\"'"]], + ["string", [ + "\"", ["variable", "$@"], "\"" + ]], + ["string", [ + "\"", ["variable", "${foo}"], "\"" + ]], + ["operator", "<<"], + ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], + ["operator", "<<"], + ["string", ["EOF\r\nfoo ", ["variable", "$@"], "\r\nbar\r\nEOF"]], + ["operator", "<<"], + ["string", ["'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"]], + ["operator", "<<"], + ["string", ["\"EOF\"\r\nfoo\r\nbar\r\nEOF"]], + ["operator", "<<"], + ["string", ["STRING_END\r\n# comment\r\nSTRING_END"]], + ["string", ["\" # comment \""]] +] + +---------------------------------------------------- + +Checks for single-quoted and double-quoted strings. +Also checks for variables in strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bash/variable_feature.test b/docs/_style/prism-master/tests/languages/bash/variable_feature.test new file mode 100644 index 0000000000..16b7448aa3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bash/variable_feature.test @@ -0,0 +1,15 @@ +$foo +$@ +${foo bar} + +---------------------------------------------------- + +[ + ["variable", "$foo"], + ["variable", "$@"], + ["variable", "${foo bar}"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/comment_feature.test b/docs/_style/prism-master/tests/languages/basic/comment_feature.test new file mode 100644 index 0000000000..d306176161 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/comment_feature.test @@ -0,0 +1,13 @@ +! Foobar +REM Foobar + +---------------------------------------------------- + +[ + ["comment", ["! Foobar"]], + ["comment", [["keyword", "REM"], " Foobar"]] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/function_feature.test b/docs/_style/prism-master/tests/languages/basic/function_feature.test new file mode 100644 index 0000000000..5fe8d760e3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/function_feature.test @@ -0,0 +1,309 @@ +ABS +ACCESS +ACOS +ANGLE +AREA +ARITHMETIC +ARRAY +ASIN +ASK +AT +ATN +BASE +BEGIN +BREAK +CAUSE +CEIL +CHR +CLIP +COLLATE +COLOR +CON +COS +COSH +COT +CSC +DATE +DATUM +DEBUG +DECIMAL +DEF +DEG +DEGREES +DELETE +DET +DEVICE +DISPLAY +DOT +ELAPSED +EPS +ERASABLE +EXLINE +EXP +EXTERNAL +EXTYPE +FILETYPE +FIXED +FP +GO +GRAPH +HANDLER +IDN +IMAGE +IN +INT +INTERNAL +IP +IS +KEYED +LBOUND +LCASE +LEFT +LEN +LENGTH +LET +LINE +LINES +LOG +LOG10 +LOG2 +LTRIM +MARGIN +MAT +MAX +MAXNUM +MID +MIN +MISSING +MOD +NATIVE +NUL +NUMERIC +OF +OPTION +ORD +ORGANIZATION +OUTIN +OUTPUT +PI +POINT +POINTER +POINTS +POS +PRINT +PROGRAM +PROMPT +RAD +RADIANS +RANDOMIZE +RECORD +RECSIZE +RECTYPE +RELATIVE +REMAINDER +REPEAT +REST +RETRY +REWRITE +RIGHT +RND +ROUND +RTRIM +SAME +SEC +SELECT +SEQUENTIAL +SET +SETTER +SGN +SIN +SINH +SIZE +SKIP +SQR +STANDARD +STATUS +STR +STREAM +STYLE +TAB +TAN +TANH +TEMPLATE +TEXT +THERE +TIME +TIMEOUT +TRACE +TRANSFORM +TRUNCATE +UBOUND +UCASE +USE +VAL +VARIABLE +VIEWPORT +WHEN +WINDOW +WITH +ZER +ZONEWIDTH + +---------------------------------------------------- + +[ + ["function", "ABS"], + ["function", "ACCESS"], + ["function", "ACOS"], + ["function", "ANGLE"], + ["function", "AREA"], + ["function", "ARITHMETIC"], + ["function", "ARRAY"], + ["function", "ASIN"], + ["function", "ASK"], + ["function", "AT"], + ["function", "ATN"], + ["function", "BASE"], + ["function", "BEGIN"], + ["function", "BREAK"], + ["function", "CAUSE"], + ["function", "CEIL"], + ["function", "CHR"], + ["function", "CLIP"], + ["function", "COLLATE"], + ["function", "COLOR"], + ["function", "CON"], + ["function", "COS"], + ["function", "COSH"], + ["function", "COT"], + ["function", "CSC"], + ["function", "DATE"], + ["function", "DATUM"], + ["function", "DEBUG"], + ["function", "DECIMAL"], + ["function", "DEF"], + ["function", "DEG"], + ["function", "DEGREES"], + ["function", "DELETE"], + ["function", "DET"], + ["function", "DEVICE"], + ["function", "DISPLAY"], + ["function", "DOT"], + ["function", "ELAPSED"], + ["function", "EPS"], + ["function", "ERASABLE"], + ["function", "EXLINE"], + ["function", "EXP"], + ["function", "EXTERNAL"], + ["function", "EXTYPE"], + ["function", "FILETYPE"], + ["function", "FIXED"], + ["function", "FP"], + ["function", "GO"], + ["function", "GRAPH"], + ["function", "HANDLER"], + ["function", "IDN"], + ["function", "IMAGE"], + ["function", "IN"], + ["function", "INT"], + ["function", "INTERNAL"], + ["function", "IP"], + ["function", "IS"], + ["function", "KEYED"], + ["function", "LBOUND"], + ["function", "LCASE"], + ["function", "LEFT"], + ["function", "LEN"], + ["function", "LENGTH"], + ["function", "LET"], + ["function", "LINE"], + ["function", "LINES"], + ["function", "LOG"], + ["function", "LOG10"], + ["function", "LOG2"], + ["function", "LTRIM"], + ["function", "MARGIN"], + ["function", "MAT"], + ["function", "MAX"], + ["function", "MAXNUM"], + ["function", "MID"], + ["function", "MIN"], + ["function", "MISSING"], + ["function", "MOD"], + ["function", "NATIVE"], + ["function", "NUL"], + ["function", "NUMERIC"], + ["function", "OF"], + ["function", "OPTION"], + ["function", "ORD"], + ["function", "ORGANIZATION"], + ["function", "OUTIN"], + ["function", "OUTPUT"], + ["function", "PI"], + ["function", "POINT"], + ["function", "POINTER"], + ["function", "POINTS"], + ["function", "POS"], + ["function", "PRINT"], + ["function", "PROGRAM"], + ["function", "PROMPT"], + ["function", "RAD"], + ["function", "RADIANS"], + ["function", "RANDOMIZE"], + ["function", "RECORD"], + ["function", "RECSIZE"], + ["function", "RECTYPE"], + ["function", "RELATIVE"], + ["function", "REMAINDER"], + ["function", "REPEAT"], + ["function", "REST"], + ["function", "RETRY"], + ["function", "REWRITE"], + ["function", "RIGHT"], + ["function", "RND"], + ["function", "ROUND"], + ["function", "RTRIM"], + ["function", "SAME"], + ["function", "SEC"], + ["function", "SELECT"], + ["function", "SEQUENTIAL"], + ["function", "SET"], + ["function", "SETTER"], + ["function", "SGN"], + ["function", "SIN"], + ["function", "SINH"], + ["function", "SIZE"], + ["function", "SKIP"], + ["function", "SQR"], + ["function", "STANDARD"], + ["function", "STATUS"], + ["function", "STR"], + ["function", "STREAM"], + ["function", "STYLE"], + ["function", "TAB"], + ["function", "TAN"], + ["function", "TANH"], + ["function", "TEMPLATE"], + ["function", "TEXT"], + ["function", "THERE"], + ["function", "TIME"], + ["function", "TIMEOUT"], + ["function", "TRACE"], + ["function", "TRANSFORM"], + ["function", "TRUNCATE"], + ["function", "UBOUND"], + ["function", "UCASE"], + ["function", "USE"], + ["function", "VAL"], + ["function", "VARIABLE"], + ["function", "VIEWPORT"], + ["function", "WHEN"], + ["function", "WINDOW"], + ["function", "WITH"], + ["function", "ZER"], + ["function", "ZONEWIDTH"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/keyword_feature.test b/docs/_style/prism-master/tests/languages/basic/keyword_feature.test new file mode 100644 index 0000000000..ecac6855ed --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/keyword_feature.test @@ -0,0 +1,213 @@ +AS +BEEP +BLOAD +BSAVE +CALL +CALL ABSOLUTE +CASE +CHAIN +CHDIR +CLEAR +CLOSE +CLS +COM +COMMON +CONST +DATA +DECLARE +DEF FN +DEF SEG +DEFDBL +DEFINT +DEFLNG +DEFSNG +DEFSTR +DIM +DO +DOUBLE +ELSE +ELSEIF +END +ENVIRON +ERASE +ERROR +EXIT +FIELD +FILES +FOR +FUNCTION +GET +GOSUB +GOTO +IF +INPUT +INTEGER +IOCTL +KEY +KILL +LINE INPUT +LOCATE +LOCK +LONG +LOOP +LSET +MKDIR +NAME +NEXT +OFF +ON +ON COM +ON ERROR +ON KEY +ON TIMER +OPEN +OPTION BASE +OUT +POKE +PUT +READ +REDIM +REM +RESTORE +RESUME +RETURN +RMDIR +RSET +RUN +SHARED +SINGLE +SELECT CASE +SHELL +SLEEP +STATIC +STEP +STOP +STRING +SUB +SWAP +SYSTEM +THEN +TIMER +TO +TROFF +TRON +TYPE +UNLOCK +UNTIL +USING +VIEW PRINT +WAIT +WEND +WHILE +WRITE + +---------------------------------------------------- + +[ + ["keyword", "AS"], + ["keyword", "BEEP"], + ["keyword", "BLOAD"], + ["keyword", "BSAVE"], + ["keyword", "CALL"], + ["keyword", "CALL ABSOLUTE"], + ["keyword", "CASE"], + ["keyword", "CHAIN"], + ["keyword", "CHDIR"], + ["keyword", "CLEAR"], + ["keyword", "CLOSE"], + ["keyword", "CLS"], + ["keyword", "COM"], + ["keyword", "COMMON"], + ["keyword", "CONST"], + ["keyword", "DATA"], + ["keyword", "DECLARE"], + ["keyword", "DEF FN"], + ["keyword", "DEF SEG"], + ["keyword", "DEFDBL"], + ["keyword", "DEFINT"], + ["keyword", "DEFLNG"], + ["keyword", "DEFSNG"], + ["keyword", "DEFSTR"], + ["keyword", "DIM"], + ["keyword", "DO"], + ["keyword", "DOUBLE"], + ["keyword", "ELSE"], + ["keyword", "ELSEIF"], + ["keyword", "END"], + ["keyword", "ENVIRON"], + ["keyword", "ERASE"], + ["keyword", "ERROR"], + ["keyword", "EXIT"], + ["keyword", "FIELD"], + ["keyword", "FILES"], + ["keyword", "FOR"], + ["keyword", "FUNCTION"], + ["keyword", "GET"], + ["keyword", "GOSUB"], + ["keyword", "GOTO"], + ["keyword", "IF"], + ["keyword", "INPUT"], + ["keyword", "INTEGER"], + ["keyword", "IOCTL"], + ["keyword", "KEY"], + ["keyword", "KILL"], + ["keyword", "LINE INPUT"], + ["keyword", "LOCATE"], + ["keyword", "LOCK"], + ["keyword", "LONG"], + ["keyword", "LOOP"], + ["keyword", "LSET"], + ["keyword", "MKDIR"], + ["keyword", "NAME"], + ["keyword", "NEXT"], + ["keyword", "OFF"], + ["keyword", "ON"], + ["keyword", "ON COM"], + ["keyword", "ON ERROR"], + ["keyword", "ON KEY"], + ["keyword", "ON TIMER"], + ["keyword", "OPEN"], + ["keyword", "OPTION BASE"], + ["keyword", "OUT"], + ["keyword", "POKE"], + ["keyword", "PUT"], + ["keyword", "READ"], + ["keyword", "REDIM"], + ["keyword", "REM"], + ["keyword", "RESTORE"], + ["keyword", "RESUME"], + ["keyword", "RETURN"], + ["keyword", "RMDIR"], + ["keyword", "RSET"], + ["keyword", "RUN"], + ["keyword", "SHARED"], + ["keyword", "SINGLE"], + ["keyword", "SELECT CASE"], + ["keyword", "SHELL"], + ["keyword", "SLEEP"], + ["keyword", "STATIC"], + ["keyword", "STEP"], + ["keyword", "STOP"], + ["keyword", "STRING"], + ["keyword", "SUB"], + ["keyword", "SWAP"], + ["keyword", "SYSTEM"], + ["keyword", "THEN"], + ["keyword", "TIMER"], + ["keyword", "TO"], + ["keyword", "TROFF"], + ["keyword", "TRON"], + ["keyword", "TYPE"], + ["keyword", "UNLOCK"], + ["keyword", "UNTIL"], + ["keyword", "USING"], + ["keyword", "VIEW PRINT"], + ["keyword", "WAIT"], + ["keyword", "WEND"], + ["keyword", "WHILE"], + ["keyword", "WRITE"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/number_feature.test b/docs/_style/prism-master/tests/languages/basic/number_feature.test new file mode 100644 index 0000000000..5adeb7af0a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/number_feature.test @@ -0,0 +1,19 @@ +42 +3.14159 +2e8 +3.4E-9 +0.7E+12 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "2e8"], + ["number", "3.4E-9"], + ["number", "0.7E+12"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/operator_feature.test b/docs/_style/prism-master/tests/languages/basic/operator_feature.test new file mode 100644 index 0000000000..b2d93f619b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/operator_feature.test @@ -0,0 +1,21 @@ +< <= <> +> >= ++ - * / +^ = & +AND EQV IMP +NOT OR XOR + +---------------------------------------------------- + +[ + ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "^"], ["operator", "="], ["operator", "&"], + ["operator", "AND"], ["operator", "EQV"], ["operator", "IMP"], + ["operator", "NOT"], ["operator", "OR"], ["operator", "XOR"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/basic/string_feature.test b/docs/_style/prism-master/tests/languages/basic/string_feature.test new file mode 100644 index 0000000000..83fea35edb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/basic/string_feature.test @@ -0,0 +1,13 @@ +"" +"fo""obar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\"\"obar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/batch/command_feature.test b/docs/_style/prism-master/tests/languages/batch/command_feature.test new file mode 100644 index 0000000000..350788a8bd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/batch/command_feature.test @@ -0,0 +1,103 @@ +FOR /l %%a in (5,-1,1) do (TITLE %title% -- closing in %%as) +SET title=%~n0 +echo.Hello World +@ECHO OFF +if not defined ProgressFormat set "ProgressFormat=[PPPP]" +EXIT /b +set /a ProgressCnt+=1 +IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) + +---------------------------------------------------- + +[ + ["command", [ + ["keyword", "FOR"], + ["parameter", ["/l"]], + ["variable", "%%a"], + ["keyword", "in"], + ["punctuation", "("], + ["number", "5"], ["punctuation", ","], + ["number", "-1"], ["punctuation", ","], + ["number", "1"], ["punctuation", ")"], + ["keyword", "do"] + ]], + ["punctuation", "("], + ["command", [ + ["keyword", "TITLE"], + ["variable", "%title%"], + " -- closing in ", + ["variable", "%%as"] + ]], + ["punctuation", ")"], + + ["command", [ + ["keyword", "SET"], + ["variable", "title"], + ["operator", "="], + ["variable", "%~n0"] + ]], + + ["command", [ + ["keyword", "echo"], + ".Hello World" + ]], + + ["operator", "@"], + ["command", [ + ["keyword", "ECHO"], + " OFF" + ]], + + ["command", [ + ["keyword", "if"], + ["keyword", "not"], + ["keyword", "defined"], + " ProgressFormat" + ]], + ["command", [ + ["keyword", "set"], + ["string", "\"ProgressFormat=[PPPP]\""] + ]], + + ["command", [ + ["keyword", "EXIT"], + ["parameter", ["/b"]] + ]], + + ["command", [ + ["keyword", "set"], + ["parameter", ["/a"]], + ["variable", "ProgressCnt"], + ["operator", "+="], + ["number", "1"] + ]], + + ["command", [ + ["keyword", "IF"], + ["string", "\"%~1\""], + ["operator", "NEQ"], + ["string", "\"\""] + ]], + ["punctuation", "("], + ["command", [ + ["keyword", "SET"], + ["variable", "%~1"], + ["operator", "="], + ["variable", "%new%"] + ]], + ["punctuation", ")"], + ["command", [ + ["keyword", "ELSE"] + ]], + ["punctuation", "("], + ["command", [ + ["keyword", "echo"], + ".", + ["variable", "%new%"] + ]], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for commands. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/batch/comment_feature.test b/docs/_style/prism-master/tests/languages/batch/comment_feature.test new file mode 100644 index 0000000000..83759d8e86 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/batch/comment_feature.test @@ -0,0 +1,18 @@ +:: +:: Foobar +REM Foobar +rem foo^ +bar + +---------------------------------------------------- + +[ + ["comment", "::"], + ["comment", ":: Foobar"], + ["comment", "REM Foobar"], + ["comment", "rem foo^\r\nbar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/batch/label_feature.test b/docs/_style/prism-master/tests/languages/batch/label_feature.test new file mode 100644 index 0000000000..a672ba0cc3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/batch/label_feature.test @@ -0,0 +1,13 @@ +:foo +:Foo_Bar + +---------------------------------------------------- + +[ + ["label", ":foo"], + ["label", ":Foo_Bar"] +] + +---------------------------------------------------- + +Checks for labels. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/c_feature.test b/docs/_style/prism-master/tests/languages/bison/c_feature.test new file mode 100644 index 0000000000..4d8be839d5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/c_feature.test @@ -0,0 +1,56 @@ +%{ + #include +%} +%code { + if(foo) { + + } +} +%% +exp: + NUM { + $$ = f($3, $4); + @$.first_column = @1.first_column; + $result = $left + $1; + } +%% + +---------------------------------------------------- + +[ + ["bison", [ + ["c", [ + ["delimiter", "%{"], + ["macro", ["#", ["directive", "include"], ["string", ""]]], + ["delimiter", "%}"] + ]], + ["keyword", "%code"], + ["c", [ + ["delimiter", "{"], + ["keyword", "if"], ["punctuation", "("], "foo", ["punctuation", ")"], + ["punctuation", "{"], ["punctuation", "}"], + ["delimiter", "}"] + ]], + ["punctuation", "%%"], + ["property", "exp"], ["punctuation", ":"], + "\r\n\tNUM ", + ["c", [ + ["delimiter", "{"], + ["bison-variable", ["$$"]], ["operator", "="], + ["function", "f"], ["punctuation", "("], + ["bison-variable", ["$3"]], ["punctuation", ","], + ["bison-variable", ["$4"]], ["punctuation", ")"], ["punctuation", ";"], + ["bison-variable", ["@$"]], ["punctuation", "."], "first_column ", ["operator", "="], + ["bison-variable", ["@1"]], ["punctuation", "."], "first_column", ["punctuation", ";"], + ["bison-variable", ["$result"]], ["operator", "="], + ["bison-variable", ["$left"]], ["operator", "+"], + ["bison-variable", ["$", ["punctuation", "<"], "itype", ["punctuation", ">"], "1"]], ["punctuation", ";"], + ["delimiter", "}"] + ]], + ["punctuation", "%%"] + ]] +] + +---------------------------------------------------- + +Checks for C inside Bison, along with special Bison variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/comment_feature.test b/docs/_style/prism-master/tests/languages/bison/comment_feature.test new file mode 100644 index 0000000000..15ed152e15 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/comment_feature.test @@ -0,0 +1,25 @@ +// Foobar +/* Foo +bar */ +%% +// Foobar +/* Foo +bar */ +%% + +---------------------------------------------------- + +[ + ["bison", [ + ["comment", "// Foobar"], + ["comment", "/* Foo\r\nbar */"], + ["punctuation", "%%"], + ["comment", "// Foobar"], + ["comment", "/* Foo\r\nbar */"], + ["punctuation", "%%"] + ]] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/keyword_feature.test b/docs/_style/prism-master/tests/languages/bison/keyword_feature.test new file mode 100644 index 0000000000..49fb373317 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/keyword_feature.test @@ -0,0 +1,22 @@ +%union +%token +%% +exp: %empty +%% + +---------------------------------------------------- + +[ + ["bison", [ + ["keyword", "%union"], + ["keyword", "%token"], + ["punctuation", "%%"], + ["property", "exp"], ["punctuation", ":"], + ["keyword", "%empty"], + ["punctuation", "%%"] + ]] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/number_feature.test b/docs/_style/prism-master/tests/languages/bison/number_feature.test new file mode 100644 index 0000000000..ddbacff94b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/number_feature.test @@ -0,0 +1,15 @@ +42 +0 +0xBadFace + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0"], + ["number", "0xBadFace"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/property_feature.test b/docs/_style/prism-master/tests/languages/bison/property_feature.test new file mode 100644 index 0000000000..c1b6cb2405 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/property_feature.test @@ -0,0 +1,21 @@ +%% +foo: +bar_42: +$@1: +%% + +---------------------------------------------------- + +[ + ["bison", [ + ["punctuation", "%%"], + ["property", "foo"], ["punctuation", ":"], + ["property", "bar_42"], ["punctuation", ":"], + ["property", "$@1"], ["punctuation", ":"], + ["punctuation", "%%"] + ]] +] + +---------------------------------------------------- + +Checks for properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bison/string_feature.test b/docs/_style/prism-master/tests/languages/bison/string_feature.test new file mode 100644 index 0000000000..3f3f6c0d58 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bison/string_feature.test @@ -0,0 +1,21 @@ +%% +foo: 'foo' "foo"; +bar: '\'' "\""; +%% + +---------------------------------------------------- + +[ + ["bison", [ + ["punctuation", "%%"], + ["property", "foo"], ["punctuation", ":"], + ["string", "'foo'"], ["string", "\"foo\""], ["punctuation", ";"], + ["property", "bar"], ["punctuation", ":"], + ["string", "'\\''"], ["string", "\"\\\"\""], ["punctuation", ";"], + ["punctuation", "%%"] + ]] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/brainfuck/all_feature.test b/docs/_style/prism-master/tests/languages/brainfuck/all_feature.test new file mode 100644 index 0000000000..284f758aaa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/brainfuck/all_feature.test @@ -0,0 +1,19 @@ +++ foobar +[ + >. + <-, +] + +---------------------------------------------------- + +[ + ["increment", "+"], ["increment", "+"], ["comment", "foobar"], + ["branching", "["], + ["pointer", ">"], ["operator", "."], + ["pointer", "<"], ["decrement", "-"], ["operator", ","], + ["branching", "]"] +] + +---------------------------------------------------- + +Checks for all patterns. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/builtin_feature.test b/docs/_style/prism-master/tests/languages/bro/builtin_feature.test new file mode 100644 index 0000000000..cd5a1210c5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/builtin_feature.test @@ -0,0 +1,29 @@ +@load-sigs +@load-plugin +@unload +@prefixes +@ifndef +@ifdef +@else +&redef +&priority +redef + +---------------------------------------------------- + +[ + ["builtin", "@load-sigs"], + ["builtin", "@load-plugin"], + ["builtin", "@unload"], + ["builtin", "@prefixes"], + ["builtin", "@ifndef"], + ["builtin", "@ifdef"], + ["builtin", "@else"], + ["builtin", "&redef"], + ["builtin", "&priority"], + ["builtin", "redef"] +] + +---------------------------------------------------- + +Checks for the builtins \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/comment_feature.test b/docs/_style/prism-master/tests/languages/bro/comment_feature.test new file mode 100644 index 0000000000..e1eff305fd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/comment_feature.test @@ -0,0 +1,17 @@ +## comment +#TODO +## FIXME +# XXX + +---------------------------------------------------- + +[ + ["comment", [ "## comment"]], + ["comment", [ "#", ["italic", "TODO"]]], + ["comment", [ "## ", ["italic", "FIXME"]]], + ["comment", [ "# ", ["italic", "XXX"]]] +] + +---------------------------------------------------- + +Checks for the highlighting of comments \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/function_feature.test b/docs/_style/prism-master/tests/languages/bro/function_feature.test new file mode 100644 index 0000000000..a10d792acc --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/function_feature.test @@ -0,0 +1,21 @@ +function foo +hook foo +event foo +function foo::bar +hook foo::bar +event foo::bar + +---------------------------------------------------- + +[ + ["function", [["keyword", "function"], " foo"]], + ["function", [["keyword", "hook"], " foo"]], + ["function", [["keyword", "event"], " foo"]], + ["function", [["keyword", "function"], " foo::bar"]], + ["function", [["keyword", "hook"], " foo::bar"]], + ["function", [["keyword", "event"], " foo::bar"]] +] + +---------------------------------------------------- + +Checks for the function feature \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/keyword_feature.test b/docs/_style/prism-master/tests/languages/bro/keyword_feature.test new file mode 100644 index 0000000000..aa025cd481 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/keyword_feature.test @@ -0,0 +1,87 @@ +break +next +continue +alarm +using +of +add +delete +export +print +return +schedule +when +timeout +addr +any +bool +count +double +enum +file +int +interval +pattern +opaque +port +record +set +string +subnet +table +time +vector +for +if +else +in +module +function + +---------------------------------------------------- + +[ + ["keyword", "break"], + ["keyword", "next"], + ["keyword", "continue"], + ["keyword", "alarm"], + ["keyword", "using"], + ["keyword", "of"], + ["keyword", "add"], + ["keyword", "delete"], + ["keyword", "export"], + ["keyword", "print"], + ["keyword", "return"], + ["keyword", "schedule"], + ["keyword", "when"], + ["keyword", "timeout"], + ["keyword", "addr"], + ["keyword", "any"], + ["keyword", "bool"], + ["keyword", "count"], + ["keyword", "double"], + ["keyword", "enum"], + ["keyword", "file"], + ["keyword", "int"], + ["keyword", "interval"], + ["keyword", "pattern"], + ["keyword", "opaque"], + ["keyword", "port"], + ["keyword", "record"], + ["keyword", "set"], + ["keyword", "string"], + ["keyword", "subnet"], + ["keyword", "table"], + ["keyword", "time"], + ["keyword", "vector"], + ["keyword", "for"], + ["keyword", "if"], + ["keyword", "else"], + ["keyword", "in"], + ["keyword", "module"], + ["keyword", "function"] +] + +---------------------------------------------------- + +Checks for the builtins \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/string_feature.test b/docs/_style/prism-master/tests/languages/bro/string_feature.test new file mode 100644 index 0000000000..68277b5147 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/string_feature.test @@ -0,0 +1,23 @@ +"" +'' +"foo" +'foo' +"'foo'" +'"bar"' +" # comment " + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "\"foo\""], + ["string", "'foo'"], + ["string", "\"'foo'\""], + ["string", "'\"bar\"'"], + ["string", "\" # comment \""] +] + +---------------------------------------------------- + +Checks for single-quoted and double-quoted strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/bro/variable_feature.test b/docs/_style/prism-master/tests/languages/bro/variable_feature.test new file mode 100644 index 0000000000..daf51203ba --- /dev/null +++ b/docs/_style/prism-master/tests/languages/bro/variable_feature.test @@ -0,0 +1,25 @@ +local foo +global foo +local bool = T; +const bar +local baz = 66; + +---------------------------------------------------- + +[ + ["variable", [["keyword", "local"], " foo"]], + ["variable", [["keyword", "global"], " foo"]], + ["variable", [["keyword", "local"], " bool"]], + ["operator", "="], + ["boolean", "T"], + ["punctuation", ";"], + ["constant", [["keyword", "const"], " bar"]], + ["variable", [["keyword", "local"], " baz"]], + ["operator", "="], + ["number", "66"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for the highlighting of variables \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c+pure/c_inclusion.test b/docs/_style/prism-master/tests/languages/c+pure/c_inclusion.test new file mode 100644 index 0000000000..312fde2cf6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c+pure/c_inclusion.test @@ -0,0 +1,28 @@ +%< +asm (); +%> + +%< -*- C -*- +asm (); +%> + +---------------------------------------------------- + +[ + ["inline-lang", [ + ["delimiter", "%<"], + ["keyword", "asm"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ";"], + ["delimiter", "%>"] + ]], + + ["inline-lang-c", [ + ["delimiter", "%< "], + ["lang", "-*- C -*-"], + ["keyword", "asm"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ";"], + ["delimiter", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for C in Pure. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c/constant_feature.test b/docs/_style/prism-master/tests/languages/c/constant_feature.test new file mode 100644 index 0000000000..449305a71e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c/constant_feature.test @@ -0,0 +1,37 @@ +__FILE__ +__LINE__ +__DATE__ +__TIME__ +__TIMESTAMP__ +__func__ +EOF +NULL +SEEK_CUR +SEEK_END +SEEK_SET +stdin +stdout +stderr + +---------------------------------------------------- + +[ + ["constant", "__FILE__"], + ["constant", "__LINE__"], + ["constant", "__DATE__"], + ["constant", "__TIME__"], + ["constant", "__TIMESTAMP__"], + ["constant", "__func__"], + ["constant", "EOF"], + ["constant", "NULL"], + ["constant", "SEEK_CUR"], + ["constant", "SEEK_END"], + ["constant", "SEEK_SET"], + ["constant", "stdin"], + ["constant", "stdout"], + ["constant", "stderr"] +] + +---------------------------------------------------- + +Checks for all constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c/keyword_feature.test b/docs/_style/prism-master/tests/languages/c/keyword_feature.test new file mode 100644 index 0000000000..feb9ff9377 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c/keyword_feature.test @@ -0,0 +1,29 @@ +_Alignas _Alignof _Atomic _Bool +_Complex _Generic _Imaginary +_Noreturn _Static_assert _Thread_local +asm typeof inline auto break +case char const continue default +do double else enum extern +float for goto if int +long register return short signed +sizeof static struct switch typedef +union unsigned void volatile while + +---------------------------------------------------- + +[ + ["keyword", "_Alignas"], ["keyword", "_Alignof"], ["keyword", "_Atomic"], ["keyword", "_Bool"], + ["keyword", "_Complex"], ["keyword", "_Generic"], ["keyword", "_Imaginary"], + ["keyword", "_Noreturn"], ["keyword", "_Static_assert"], ["keyword", "_Thread_local"], + ["keyword", "asm"], ["keyword", "typeof"], ["keyword", "inline"], ["keyword", "auto"], ["keyword", "break"], + ["keyword", "case"], ["keyword", "char"], ["keyword", "const"], ["keyword", "continue"], ["keyword", "default"], + ["keyword", "do"], ["keyword", "double"], ["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"], + ["keyword", "float"], ["keyword", "for"], ["keyword", "goto"], ["keyword", "if"], ["keyword", "int"], + ["keyword", "long"], ["keyword", "register"], ["keyword", "return"], ["keyword", "short"], ["keyword", "signed"], + ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "struct"], ["keyword", "switch"], ["keyword", "typedef"], + ["keyword", "union"], ["keyword", "unsigned"], ["keyword", "void"], ["keyword", "volatile"], ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c/macro_feature.test b/docs/_style/prism-master/tests/languages/c/macro_feature.test new file mode 100644 index 0000000000..6e65d9d590 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c/macro_feature.test @@ -0,0 +1,45 @@ +# include + #define PG_locked 0 + +#defined +#elif +#else +#endif +#error +#ifdef +#ifndef +#if +#import +#include +#line +#pragma +#undef +#using + +---------------------------------------------------- + +[ + ["macro", [ + "# ", ["directive", "include"], + ["string", ""] + ]], + ["macro", ["#", ["directive", "define"], " PG_locked 0"]], + ["macro", ["#", ["directive", "defined"]]], + ["macro", ["#", ["directive", "elif"]]], + ["macro", ["#", ["directive", "else"]]], + ["macro", ["#", ["directive", "endif"]]], + ["macro", ["#", ["directive", "error"]]], + ["macro", ["#", ["directive", "ifdef"]]], + ["macro", ["#", ["directive", "ifndef"]]], + ["macro", ["#", ["directive", "if"]]], + ["macro", ["#", ["directive", "import"]]], + ["macro", ["#", ["directive", "include"]]], + ["macro", ["#", ["directive", "line"]]], + ["macro", ["#", ["directive", "pragma"]]], + ["macro", ["#", ["directive", "undef"]]], + ["macro", ["#", ["directive", "using"]]] +] + +---------------------------------------------------- + +Checks for macros and paths inside include statements. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c/number_feature.test b/docs/_style/prism-master/tests/languages/c/number_feature.test new file mode 100644 index 0000000000..0542683404 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c/number_feature.test @@ -0,0 +1,35 @@ +42 +3.14159 +4e10 +2.1e-10 +0.4e+2 +0xbabe +0xBABE +42f +42F +42u +42U +42l +42L + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e10"], + ["number", "2.1e-10"], + ["number", "0.4e+2"], + ["number", "0xbabe"], + ["number", "0xBABE"], + ["number", "42f"], + ["number", "42F"], + ["number", "42u"], + ["number", "42U"], + ["number", "42l"], + ["number", "42L"] +] + +---------------------------------------------------- + +Checks for decimal numbers and hexadecimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/c/operator_feature.test b/docs/_style/prism-master/tests/languages/c/operator_feature.test new file mode 100644 index 0000000000..95cef64674 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/c/operator_feature.test @@ -0,0 +1,61 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> :: +? : += == != < > <= >= + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "::"], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="] +] + +---------------------------------------------------- + +Checks for all operators diff --git a/docs/_style/prism-master/tests/languages/cil/asm_reference.test b/docs/_style/prism-master/tests/languages/cil/asm_reference.test new file mode 100644 index 0000000000..991f998cc2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/asm_reference.test @@ -0,0 +1,11 @@ +[mscorlib] + +-------------------------------------------------------- + +[ + [ "variable", "[mscorlib]" ] +] + +-------------------------------------------------------- + +Tests assembly references diff --git a/docs/_style/prism-master/tests/languages/cil/boolean.test b/docs/_style/prism-master/tests/languages/cil/boolean.test new file mode 100644 index 0000000000..c6cfe746fd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/boolean.test @@ -0,0 +1,14 @@ + +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Tests booleans. diff --git a/docs/_style/prism-master/tests/languages/cil/comment.test b/docs/_style/prism-master/tests/languages/cil/comment.test new file mode 100644 index 0000000000..97a30a459f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/comment.test @@ -0,0 +1,11 @@ +// this is a test + +-------------------------------------------------------- + +[ + [ "comment", "// this is a test" ] +] + +-------------------------------------------------------- + +Tests comments diff --git a/docs/_style/prism-master/tests/languages/cil/instructions.test b/docs/_style/prism-master/tests/languages/cil/instructions.test new file mode 100644 index 0000000000..fc01826c81 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/instructions.test @@ -0,0 +1,457 @@ +add +add.ovf +add.ovf.un +and +arglist +beq +beq.s +bge +bge.s +bge.un +bge.un.s +bgt +bgt.s +bgt.un +bgt.un.s +ble +ble.s +ble.un +ble.un.s +blt +blt.s +blt.un +blt.un.s +bne.un +bne.un.s +box +br +br.s +break +brfalse +brfalse.s +brinst +brinst.s +brnull +brnull.s +brtrue +brtrue.s +brzero +brzero.s +call +calli +callvirt +castclass +ceq +cgt +cgt.un +ckfinite +clt +clt.un +conv.i +conv.i1 +conv.i2 +conv.i4 +conv.i8 +conv.ovf.i +conv.ovf.i.un +conv.ovf.i1 +conv.ovf.i1.un +conv.ovf.i2 +conv.ovf.i2.un +conv.ovf.i4 +conv.ovf.i4.un +conv.ovf.i8 +conv.ovf.i8.un +conv.ovf.u +conv.ovf.u.un +conv.ovf.u1 +conv.ovf.u1.un +conv.ovf.u2 +conv.ovf.u2.un +conv.ovf.u4 +conv.ovf.u4.un +conv.ovf.u8 +conv.ovf.u8.un +conv.r.un +conv.r4 +conv.r8 +conv.u +conv.u1 +conv.u2 +conv.u4 +conv.u8 +cpblk +cpobj +div +div.un +dup +endfault +endfilter +endfinally +initblk +initobj +isinst +jmp +ldarg +ldarg.0 +ldarg.1 +ldarg.2 +ldarg.3 +ldarg.s +ldarga +ldarga.s +ldc.i4 +ldc.i4.0 +ldc.i4.1 +ldc.i4.2 +ldc.i4.3 +ldc.i4.4 +ldc.i4.5 +ldc.i4.6 +ldc.i4.7 +ldc.i4.8 +ldc.i4.m1 +ldc.i4.M1 +ldc.i4.s +ldc.i8 +ldc.r4 +ldc.r8 +ldelem +ldelem.i +ldelem.i1 +ldelem.i2 +ldelem.i4 +ldelem.i8 +ldelem.r4 +ldelem.r8 +ldelem.ref +ldelem.u1 +ldelem.u2 +ldelem.u4 +ldelem.u8 +ldelema +ldfld +ldflda +ldftn +ldind.i +ldind.i1 +ldind.i2 +ldind.i4 +ldind.i8 +ldind.r4 +ldind.r8 +ldind.ref +ldind.u1 +ldind.u2 +ldind.u4 +ldind.u8 +ldlen +ldloc +ldloc.0 +ldloc.1 +ldloc.2 +ldloc.3 +ldloc.s +ldloca +ldloca.s +ldnull +ldobj +ldsfld +ldsflda +ldstr +ldtoken +ldvirtftn +leave +leave.s +localloc +mkrefany +mul +mul.ovf +mul.ovf.un +neg +newarr +newobj +nop +not +or +pop +refanytype +refanyval +rem +rem.un +ret +rethrow +shl +shr +shr.un +sizeof +starg +starg.s +stelem +stelem.i +stelem.i1 +stelem.i2 +stelem.i4 +stelem.i8 +stelem.r4 +stelem.r8 +stelem.ref +stfld +stind.i +stind.i1 +stind.i2 +stind.i4 +stind.i8 +stind.r4 +stind.r8 +stind.ref +stloc +stloc.0 +stloc.1 +stloc.2 +stloc.3 +stloc.s +stobj +stsfld +sub +sub.ovf +sub.ovf.un +switch +throw +alignment +unbox +unbox.any +xor + +---------------------------------------------------- + +[ + ["function", "add"], + ["function", "add.ovf"], + ["function", "add.ovf.un"], + ["function", "and"], + ["function", "arglist"], + ["function", "beq"], + ["function", "beq.s"], + ["function", "bge"], + ["function", "bge.s"], + ["function", "bge.un"], + ["function", "bge.un.s"], + ["function", "bgt"], + ["function", "bgt.s"], + ["function", "bgt.un"], + ["function", "bgt.un.s"], + ["function", "ble"], + ["function", "ble.s"], + ["function", "ble.un"], + ["function", "ble.un.s"], + ["function", "blt"], + ["function", "blt.s"], + ["function", "blt.un"], + ["function", "blt.un.s"], + ["function", "bne.un"], + ["function", "bne.un.s"], + ["function", "box"], + ["function", "br"], + ["function", "br.s"], + ["function", "break"], + ["function", "brfalse"], + ["function", "brfalse.s"], + ["function", "brinst"], + ["function", "brinst.s"], + ["function", "brnull"], + ["function", "brnull.s"], + ["function", "brtrue"], + ["function", "brtrue.s"], + ["function", "brzero"], + ["function", "brzero.s"], + ["function", "call"], + ["function", "calli"], + ["function", "callvirt"], + ["function", "castclass"], + ["function", "ceq"], + ["function", "cgt"], + ["function", "cgt.un"], + ["function", "ckfinite"], + ["function", "clt"], + ["function", "clt.un"], + ["function", "conv.i"], + ["function", "conv.i1"], + ["function", "conv.i2"], + ["function", "conv.i4"], + ["function", "conv.i8"], + ["function", "conv.ovf.i"], + ["function", "conv.ovf.i.un"], + ["function", "conv.ovf.i1"], + ["function", "conv.ovf.i1.un"], + ["function", "conv.ovf.i2"], + ["function", "conv.ovf.i2.un"], + ["function", "conv.ovf.i4"], + ["function", "conv.ovf.i4.un"], + ["function", "conv.ovf.i8"], + ["function", "conv.ovf.i8.un"], + ["function", "conv.ovf.u"], + ["function", "conv.ovf.u.un"], + ["function", "conv.ovf.u1"], + ["function", "conv.ovf.u1.un"], + ["function", "conv.ovf.u2"], + ["function", "conv.ovf.u2.un"], + ["function", "conv.ovf.u4"], + ["function", "conv.ovf.u4.un"], + ["function", "conv.ovf.u8"], + ["function", "conv.ovf.u8.un"], + ["function", "conv.r.un"], + ["function", "conv.r4"], + ["function", "conv.r8"], + ["function", "conv.u"], + ["function", "conv.u1"], + ["function", "conv.u2"], + ["function", "conv.u4"], + ["function", "conv.u8"], + ["function", "cpblk"], + ["function", "cpobj"], + ["function", "div"], + ["function", "div.un"], + ["function", "dup"], + ["function", "endfault"], + ["function", "endfilter"], + ["function", "endfinally"], + ["function", "initblk"], + ["function", "initobj"], + ["function", "isinst"], + ["function", "jmp"], + ["function", "ldarg"], + ["function", "ldarg.0"], + ["function", "ldarg.1"], + ["function", "ldarg.2"], + ["function", "ldarg.3"], + ["function", "ldarg.s"], + ["function", "ldarga"], + ["function", "ldarga.s"], + ["function", "ldc.i4"], + ["function", "ldc.i4.0"], + ["function", "ldc.i4.1"], + ["function", "ldc.i4.2"], + ["function", "ldc.i4.3"], + ["function", "ldc.i4.4"], + ["function", "ldc.i4.5"], + ["function", "ldc.i4.6"], + ["function", "ldc.i4.7"], + ["function", "ldc.i4.8"], + ["function", "ldc.i4.m1"], + ["function", "ldc.i4.M1"], + ["function", "ldc.i4.s"], + ["function", "ldc.i8"], + ["function", "ldc.r4"], + ["function", "ldc.r8"], + ["function", "ldelem"], + ["function", "ldelem.i"], + ["function", "ldelem.i1"], + ["function", "ldelem.i2"], + ["function", "ldelem.i4"], + ["function", "ldelem.i8"], + ["function", "ldelem.r4"], + ["function", "ldelem.r8"], + ["function", "ldelem.ref"], + ["function", "ldelem.u1"], + ["function", "ldelem.u2"], + ["function", "ldelem.u4"], + ["function", "ldelem.u8"], + ["function", "ldelema"], + ["function", "ldfld"], + ["function", "ldflda"], + ["function", "ldftn"], + ["function", "ldind.i"], + ["function", "ldind.i1"], + ["function", "ldind.i2"], + ["function", "ldind.i4"], + ["function", "ldind.i8"], + ["function", "ldind.r4"], + ["function", "ldind.r8"], + ["function", "ldind.ref"], + ["function", "ldind.u1"], + ["function", "ldind.u2"], + ["function", "ldind.u4"], + ["function", "ldind.u8"], + ["function", "ldlen"], + ["function", "ldloc"], + ["function", "ldloc.0"], + ["function", "ldloc.1"], + ["function", "ldloc.2"], + ["function", "ldloc.3"], + ["function", "ldloc.s"], + ["function", "ldloca"], + ["function", "ldloca.s"], + ["function", "ldnull"], + ["function", "ldobj"], + ["function", "ldsfld"], + ["function", "ldsflda"], + ["function", "ldstr"], + ["function", "ldtoken"], + ["function", "ldvirtftn"], + ["function", "leave"], + ["function", "leave.s"], + ["function", "localloc"], + ["function", "mkrefany"], + ["function", "mul"], + ["function", "mul.ovf"], + ["function", "mul.ovf.un"], + ["function", "neg"], + ["function", "newarr"], + ["function", "newobj"], + ["function", "nop"], + ["function", "not"], + ["function", "or"], + ["function", "pop"], + ["function", "refanytype"], + ["function", "refanyval"], + ["function", "rem"], + ["function", "rem.un"], + ["function", "ret"], + ["function", "rethrow"], + ["function", "shl"], + ["function", "shr"], + ["function", "shr.un"], + ["function", "sizeof"], + ["function", "starg"], + ["function", "starg.s"], + ["function", "stelem"], + ["function", "stelem.i"], + ["function", "stelem.i1"], + ["function", "stelem.i2"], + ["function", "stelem.i4"], + ["function", "stelem.i8"], + ["function", "stelem.r4"], + ["function", "stelem.r8"], + ["function", "stelem.ref"], + ["function", "stfld"], + ["function", "stind.i"], + ["function", "stind.i1"], + ["function", "stind.i2"], + ["function", "stind.i4"], + ["function", "stind.i8"], + ["function", "stind.r4"], + ["function", "stind.r8"], + ["function", "stind.ref"], + ["function", "stloc"], + ["function", "stloc.0"], + ["function", "stloc.1"], + ["function", "stloc.2"], + ["function", "stloc.3"], + ["function", "stloc.s"], + ["function", "stobj"], + ["function", "stsfld"], + ["function", "sub"], + ["function", "sub.ovf"], + ["function", "sub.ovf.un"], + ["function", "switch"], + ["function", "throw"], + ["function", "alignment"], + ["function", "unbox"], + ["function", "unbox.any"], + ["function", "xor"] +] + +---------------------------------------------------- + +Tests instruction names diff --git a/docs/_style/prism-master/tests/languages/cil/keywords.test b/docs/_style/prism-master/tests/languages/cil/keywords.test new file mode 100644 index 0000000000..53a4645a25 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/keywords.test @@ -0,0 +1,161 @@ +abstract +ansi +assembly +auto +autochar +beforefieldinit +bool +bstr +byvalstr +cil +char +class +currency +date +decimal +default +enum +error +explicit +extends +extern +famandassem +family +famorassem +final +float32 +float64 +hidebysig +iant +idispatch +import +initonly +instance +int +int16 +int32 +int64 +int8 +uint +uint16 +uint32 +uint64 +uint8 +interface +iunknown +lpstr +lpstruct +lptstr +lpwstr +managed +nativeType +nested +newslot +objectref +pinvokeimpl +private +privatescope +public +reqsecobj +rtspecialname +sealed +sequential +serializable +specialname +static +string +struct +syschar +tbstr +unicode +unmanagedexp +unsigned +value +variant +virtual +void + +-------------------------------------------------------- + +[ + [ "keyword", "abstract" ], + [ "keyword", "ansi" ], + [ "keyword", "assembly" ], + [ "keyword", "auto" ], + [ "keyword", "autochar" ], + [ "keyword", "beforefieldinit" ], + [ "keyword", "bool" ], + [ "keyword", "bstr" ], + [ "keyword", "byvalstr" ], + [ "keyword", "cil" ], + [ "keyword", "char" ], + [ "keyword", "class" ], + [ "keyword", "currency" ], + [ "keyword", "date" ], + [ "keyword", "decimal" ], + [ "keyword", "default" ], + [ "keyword", "enum" ], + [ "keyword", "error" ], + [ "keyword", "explicit" ], + [ "keyword", "extends" ], + [ "keyword", "extern" ], + [ "keyword", "famandassem" ], + [ "keyword", "family" ], + [ "keyword", "famorassem" ], + [ "keyword", "final" ], + [ "keyword", "float32" ], + [ "keyword", "float64" ], + [ "keyword", "hidebysig" ], + [ "keyword", "iant" ], + [ "keyword", "idispatch" ], + [ "keyword", "import" ], + [ "keyword", "initonly" ], + [ "keyword", "instance" ], + [ "keyword", "int" ], + [ "keyword", "int16" ], + [ "keyword", "int32" ], + [ "keyword", "int64" ], + [ "keyword", "int8" ], + [ "keyword", "uint" ], + [ "keyword", "uint16" ], + [ "keyword", "uint32" ], + [ "keyword", "uint64" ], + [ "keyword", "uint8" ], + [ "keyword", "interface" ], + [ "keyword", "iunknown" ], + [ "keyword", "lpstr" ], + [ "keyword", "lpstruct" ], + [ "keyword", "lptstr" ], + [ "keyword", "lpwstr" ], + [ "keyword", "managed" ], + [ "keyword", "nativeType" ], + [ "keyword", "nested" ], + [ "keyword", "newslot" ], + [ "keyword", "objectref" ], + [ "keyword", "pinvokeimpl" ], + [ "keyword", "private" ], + [ "keyword", "privatescope" ], + [ "keyword", "public" ], + [ "keyword", "reqsecobj" ], + [ "keyword", "rtspecialname" ], + [ "keyword", "sealed" ], + [ "keyword", "sequential" ], + [ "keyword", "serializable" ], + [ "keyword", "specialname" ], + [ "keyword", "static" ], + [ "keyword", "string" ], + [ "keyword", "struct" ], + [ "keyword", "syschar" ], + [ "keyword", "tbstr" ], + [ "keyword", "unicode" ], + [ "keyword", "unmanagedexp" ], + [ "keyword", "unsigned" ], + [ "keyword", "value" ], + [ "keyword", "variant" ], + [ "keyword", "virtual" ], + [ "keyword", "void"] +] + +-------------------------------------------------------- + +Tests keywords diff --git a/docs/_style/prism-master/tests/languages/cil/strings.test b/docs/_style/prism-master/tests/languages/cil/strings.test new file mode 100644 index 0000000000..da2de2c73b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cil/strings.test @@ -0,0 +1,11 @@ +"testing! £$%^&*" + +---------------------------------------------------- + +[ + ["string", "\"testing! £$%^&*\""] +] + +---------------------------------------------------- + +Tests strings. diff --git a/docs/_style/prism-master/tests/languages/clike/boolean_feature.test b/docs/_style/prism-master/tests/languages/clike/boolean_feature.test new file mode 100644 index 0000000000..6a1ad0ca3d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/boolean_feature.test @@ -0,0 +1,12 @@ +true; false; + +---------------------------------------------------- + +[ + ["boolean", "true"], ["punctuation", ";"], + ["boolean", "false"], ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/class-name_feature.test b/docs/_style/prism-master/tests/languages/clike/class-name_feature.test new file mode 100644 index 0000000000..04c211254e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/class-name_feature.test @@ -0,0 +1,53 @@ +class Foo +interface bar +extends Foo +implements bar +trait Foo +instanceof \bar +new \Foo +catch (bar) + +---------------------------------------------------- + +[ + "class ", + ["class-name", [ + "Foo" + ]], + "\r\ninterface ", + ["class-name", [ + "bar" + ]], + "\r\nextends ", + ["class-name", [ + "Foo" + ]], + "\r\nimplements ", + ["class-name", [ + "bar" + ]], + "\r\ntrait ", + ["class-name", [ + "Foo" + ]], + ["keyword", "instanceof"], + ["class-name", [ + ["punctuation", "\\"], + "bar" + ]], + ["keyword", "new"], + ["class-name", [ + ["punctuation", "\\"], + "Foo" + ]], + ["keyword", "catch"], + ["punctuation", "("], + ["class-name", [ + "bar" + ]], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/comment_feature.test b/docs/_style/prism-master/tests/languages/clike/comment_feature.test new file mode 100644 index 0000000000..00bb2894f1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/comment_feature.test @@ -0,0 +1,16 @@ +// foobar +/**/ +/* foo +bar */ + +---------------------------------------------------- + +[ + ["comment", "// foobar"], + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/function_feature.test b/docs/_style/prism-master/tests/languages/clike/function_feature.test new file mode 100644 index 0000000000..031ed1c9d9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/function_feature.test @@ -0,0 +1,23 @@ +foo() +foo_bar() +f42() + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo_bar"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "f42"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/issue1340.test b/docs/_style/prism-master/tests/languages/clike/issue1340.test new file mode 100644 index 0000000000..0b5effa041 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/issue1340.test @@ -0,0 +1,13 @@ +/* +// +*/ + +---------------------------------------------------- + +[ + ["comment", "/*\r\n//\r\n*/"] +] + +---------------------------------------------------- + +Non-regression test for inline comments inside multiline comments. See #1340 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/keyword_feature.test b/docs/_style/prism-master/tests/languages/clike/keyword_feature.test new file mode 100644 index 0000000000..4313f7c9ad --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/keyword_feature.test @@ -0,0 +1,30 @@ +if; else; while; do; for; +return; in; instanceof; function; new; +try; throw; catch; finally; null; +break; continue; + +---------------------------------------------------- + +[ + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "finally"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/number_feature.test b/docs/_style/prism-master/tests/languages/clike/number_feature.test new file mode 100644 index 0000000000..f6bcc0b662 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/number_feature.test @@ -0,0 +1,23 @@ +42 +3.14159 +4e10 +2.1e-10 +0.4e+2 +0xbabe +0xBABE + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e10"], + ["number", "2.1e-10"], + ["number", "0.4e+2"], + ["number", "0xbabe"], + ["number", "0xBABE"] +] + +---------------------------------------------------- + +Checks for decimal numbers and hexadecimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/operator_feature.test b/docs/_style/prism-master/tests/languages/clike/operator_feature.test new file mode 100644 index 0000000000..1a4c6495da --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/operator_feature.test @@ -0,0 +1,21 @@ +- + -- ++ +< <= > >= += == === +! != !== +& && | || +? * / ~ ^ % + +---------------------------------------------------- + +[ + ["operator", "-"], ["operator", "+"], ["operator", "--"], ["operator", "++"], + ["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="], + ["operator", "="], ["operator", "=="], ["operator", "==="], + ["operator", "!"], ["operator", "!="], ["operator", "!=="], + ["operator", "&"], ["operator", "&&"], ["operator", "|"], ["operator", "||"], + ["operator", "?"], ["operator", "*"], ["operator", "/"], ["operator", "~"], ["operator", "^"], ["operator", "%"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clike/string_feature.test b/docs/_style/prism-master/tests/languages/clike/string_feature.test new file mode 100644 index 0000000000..0e347c9020 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clike/string_feature.test @@ -0,0 +1,31 @@ +"" +'' +"f\"oo" +'b\'ar' +"foo\ +bar" +'foo\ +bar' +"foo /* comment */ bar" +'foo // bar' +'foo // bar' //comment + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "\"f\\\"oo\""], + ["string", "'b\\'ar'"], + ["string", "\"foo\\\r\nbar\""], + ["string", "'foo\\\r\nbar'"], + ["string", "\"foo /* comment */ bar\""], + ["string", "'foo // bar'"], + ["string", "'foo // bar'"], + ["comment", "//comment"] +] + +---------------------------------------------------- + +Checks for empty strings, single-line strings and +multi-line strings, both single-quoted and double-quoted. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clojure/boolean_feature.test b/docs/_style/prism-master/tests/languages/clojure/boolean_feature.test new file mode 100644 index 0000000000..55720b4f46 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clojure/boolean_feature.test @@ -0,0 +1,15 @@ +false +true +nil + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"], + ["boolean", "nil"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clojure/comment_feature.test b/docs/_style/prism-master/tests/languages/clojure/comment_feature.test new file mode 100644 index 0000000000..c4f5c7d182 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clojure/comment_feature.test @@ -0,0 +1,13 @@ +;; this is comment +; this is another comment + +---------------------------------------------------- + +[ + ["comment", ";; this is comment"], + ["comment", "; this is another comment"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clojure/keyword_feature.test b/docs/_style/prism-master/tests/languages/clojure/keyword_feature.test new file mode 100644 index 0000000000..0c32cd2db4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clojure/keyword_feature.test @@ -0,0 +1,175 @@ +(def) +(if) +(do) +(let) +(var) +(fn) +(quote) +(->>) +(->) +(loop) +(recur) +(throw) +(try) +(monitor-enter) +(.) +(new) +(set!) +(defn) +(defn-) +(defmacro) +(defmulti) +(defmethod) +(defstruct) +(defonce) +(declare) +(definline) +(definterface) +(defprotocol) +(defrecord) +(deftype) +(defproject) +(ns) +(*) +(+) +(-) +(/) +(<) +(<=) +(>=) +(=) +(==) +(..) +(>) +(accessor) +(agent) +(agent-errors) +(aget) +(alength) +(all-ns) +(alter) +(and) +(append-child) +(apply) +(array-map) +(aset) +(aset-boolean) +(aset-byte) +(aset-char) +(aset-double) +(aset-float) +(aset-int) +(aset-long) +(aset-short) +(assert) +(assoc) +(await) +(await-for) +(bean) +(binding) +(bit-and) +(bit-not) +(branch?) +(contains?) +(end?) +(every?) +(false?) +(identical?) +(instance?) +(keyword?) +(list*) +(not-any?) +(true?) +(zero?) + +---------------------------------------------------- + +[ + ["punctuation", "("], ["keyword", "def"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "if"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "do"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "let"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "var"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "fn"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "->>"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "->"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "loop"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "recur"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "throw"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "try"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "monitor-enter"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "."], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "new"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defn"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defn-"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defmacro"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defmulti"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defmethod"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defstruct"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defonce"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "declare"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "definline"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "definterface"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defprotocol"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defrecord"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "deftype"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "defproject"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "ns"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "*"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "+"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "-"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "/"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "<"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "<="], ["punctuation", ")"], + ["punctuation", "("], ["keyword", ">="], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "="], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "=="], ["punctuation", ")"], + ["punctuation", "("], ["keyword", ".."], ["punctuation", ")"], + ["punctuation", "("], ["keyword", ">"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "accessor"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "agent"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "agent-errors"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aget"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "alength"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "all-ns"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "alter"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "and"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "append-child"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "apply"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "array-map"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-boolean"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-byte"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-char"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-double"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-float"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-int"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-long"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "aset-short"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "assert"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "assoc"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "await"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "await-for"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "bean"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "binding"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "bit-and"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "bit-not"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "branch?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "contains?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "end?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "every?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "false?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "identical?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "instance?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "keyword?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "list*"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "not-any?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "true?"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "zero?"], ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/docs/_style/prism-master/tests/languages/clojure/operator_and_punctuation.test b/docs/_style/prism-master/tests/languages/clojure/operator_and_punctuation.test new file mode 100644 index 0000000000..e90acb631d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clojure/operator_and_punctuation.test @@ -0,0 +1,20 @@ +(::example [x y] (:kebab-case x y)) + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["operator", "::example"], + ["punctuation", "["], + "x y", + ["punctuation", "]"], + ["punctuation", "("], + ["operator", ":kebab-case"], + " x y", + ["punctuation", ")"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for operators and punctuation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/clojure/string_feature.test b/docs/_style/prism-master/tests/languages/clojure/string_feature.test new file mode 100644 index 0000000000..13a966cf7e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/clojure/string_feature.test @@ -0,0 +1,13 @@ +"" +"Fo\"obar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"Fo\\\"obar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript+haml/coffeescript_inclusion.test b/docs/_style/prism-master/tests/languages/coffeescript+haml/coffeescript_inclusion.test new file mode 100644 index 0000000000..7a7751692d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript+haml/coffeescript_inclusion.test @@ -0,0 +1,24 @@ +:coffee + 'This is coffee script' + +~ + :coffee + 'This is coffee script' + +---------------------------------------------------- + +[ + ["filter-coffee", [ + ["filter-name", ":coffee"], + ["string", "'This is coffee script'"] + ]], + ["punctuation", "~"], + ["filter-coffee", [ + ["filter-name", ":coffee"], + ["string", "'This is coffee script'"] + ]] +] + +---------------------------------------------------- + +Checks for CoffeeScript filter in Haml. The tilde serves only as a separator. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript+pug/coffeescript_inclusion.test b/docs/_style/prism-master/tests/languages/coffeescript+pug/coffeescript_inclusion.test new file mode 100644 index 0000000000..ccf8963ba1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript+pug/coffeescript_inclusion.test @@ -0,0 +1,19 @@ +:coffee + "#{foo}" + +---------------------------------------------------- + +[ + ["filter-coffee", [ + ["filter-name", ":coffee"], + ["string", [ + "\"", + ["interpolation", "#{foo}"], + "\"" + ]] + ]] +] + +---------------------------------------------------- + +Checks for coffee filter (CoffeeScript) in Jade. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/block-regex_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/block-regex_feature.test new file mode 100644 index 0000000000..b01a9a42de --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/block-regex_feature.test @@ -0,0 +1,33 @@ +///foo[bar]/// +///foo +[bar]/// +///foo +b#{ar}baz/// +///foo #bar +baz/// + +---------------------------------------------------- + +[ + ["block-regex", [ + "///foo[bar]///" + ]], + ["block-regex", [ + "///foo\r\n[bar]///" + ]], + ["block-regex", [ + "///foo\r\nb", + ["interpolation", "#{ar}"], + "baz///" + ]], + ["block-regex", [ + "///foo ", + ["comment", "#bar"], + "\r\nbaz///" + ]] +] + +---------------------------------------------------- + +Checks for block regex. +Also checks for comments and interpolations inside block regex. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/class-member_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/class-member_feature.test new file mode 100644 index 0000000000..6fdbcf3e3a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/class-member_feature.test @@ -0,0 +1,13 @@ +@name +@foo_bar + +---------------------------------------------------- + +[ + ["class-member", "@name"], + ["class-member", "@foo_bar"] +] + +---------------------------------------------------- + +Checks for class members. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/comment_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/comment_feature.test new file mode 100644 index 0000000000..5d034ff0f0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/comment_feature.test @@ -0,0 +1,16 @@ +#foo +# foo bar +### foo bar +baz ### + +---------------------------------------------------- + +[ + ["comment", "#foo"], + ["comment", "# foo bar"], + ["multiline-comment", "### foo bar\r\nbaz ###"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/inline-javascript_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/inline-javascript_feature.test new file mode 100644 index 0000000000..cf15e26c0a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/inline-javascript_feature.test @@ -0,0 +1,22 @@ +`/* JS here */` +`/* +JS here */` + +---------------------------------------------------- + +[ + ["inline-javascript", [ + ["delimiter", "`"], + ["comment", "/* JS here */"], + ["delimiter", "`"] + ]], + ["inline-javascript", [ + ["delimiter", "`"], + ["comment", "/*\r\nJS here */"], + ["delimiter", "`"] + ]] +] + +---------------------------------------------------- + +Checks for inline JavaScript. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/keyword_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/keyword_feature.test new file mode 100644 index 0000000000..3207e3982d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/keyword_feature.test @@ -0,0 +1,41 @@ +and break by catch +class; +continue debugger delete +do each else extend +extends; +false finally for if in +instanceof; +is isnt let +loop namespace +new; +no not null of off on +or own return super +switch then this throw +true try typeof undefined +unless until when while +window with yes yield + +---------------------------------------------------- + +[ + ["keyword", "and"], ["keyword", "break"], ["keyword", "by"], ["keyword", "catch"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "continue"], ["keyword", "debugger"], ["keyword", "delete"], + ["keyword", "do"], ["keyword", "each"], ["keyword", "else"], ["keyword", "extend"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "false"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "if"], ["keyword", "in"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "is"], ["keyword", "isnt"], ["keyword", "let"], + ["keyword", "loop"], ["keyword", "namespace"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "no"], ["keyword", "not"], ["keyword", "null"], ["keyword", "of"], ["keyword", "off"], ["keyword", "on"], + ["keyword", "or"], ["keyword", "own"], ["keyword", "return"], ["keyword", "super"], + ["keyword", "switch"], ["keyword", "then"], ["keyword", "this"], ["keyword", "throw"], + ["keyword", "true"], ["keyword", "try"], ["keyword", "typeof"], ["keyword", "undefined"], + ["keyword", "unless"], ["keyword", "until"], ["keyword", "when"], ["keyword", "while"], + ["keyword", "window"], ["keyword", "with"], ["keyword", "yes"], ["keyword", "yield"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/property_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/property_feature.test new file mode 100644 index 0000000000..0f25679876 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/property_feature.test @@ -0,0 +1,15 @@ +foo: +foo_bar : + +---------------------------------------------------- + +[ + ["property", "foo"], + ["punctuation", ":"], + ["property", "foo_bar"], + ["punctuation", ":"] +] + +---------------------------------------------------- + +Checks for object properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/coffeescript/string_feature.test b/docs/_style/prism-master/tests/languages/coffeescript/string_feature.test new file mode 100644 index 0000000000..f5a6868516 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/coffeescript/string_feature.test @@ -0,0 +1,64 @@ +'' +'foo' +'foo\ +bar' +"" +"foo" +"foo\ +bar" +"foo #{interpolation} bar" +'''''' +'''foo''' +'''foo +bar''' + +"""""" +"""foo""" +"""foo +bar""" +"""foo #{interpolation} bar""" +"foo # comment bar" +'foo # bar' +"""foo +#comment +bar""" +'''foo +#comment +bar''' + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "'foo'"], + ["string", "'foo\\\r\nbar'"], + ["string", ["\"\""]], + ["string", ["\"foo\""]], + ["string", ["\"foo\\\r\nbar\""]], + ["string", [ + "\"foo ", + ["interpolation", "#{interpolation}"], + " bar\"" + ]], + + ["multiline-string", "''''''"], + ["multiline-string", "'''foo'''"], + ["multiline-string", "'''foo\r\nbar'''"], + ["multiline-string", ["\"\"\"\"\"\""]], + ["multiline-string", ["\"\"\"foo\"\"\""]], + ["multiline-string", ["\"\"\"foo\r\nbar\"\"\""]], + ["multiline-string", [ + "\"\"\"foo ", + ["interpolation", "#{interpolation}"], + " bar\"\"\"" + ]], + ["string", ["\"foo # comment bar\""]], + ["string", "'foo # bar'"], + ["multiline-string", ["\"\"\"foo\r\n#comment\r\nbar\"\"\""]], + ["multiline-string", "'''foo\r\n#comment\r\nbar'''"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line strings and block strings. +Also checks for string interpolation inside double-quoted strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/cpp+pure/cpp_inclusion.test b/docs/_style/prism-master/tests/languages/cpp+pure/cpp_inclusion.test new file mode 100644 index 0000000000..150080e46a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp+pure/cpp_inclusion.test @@ -0,0 +1,18 @@ +%< -*- C++ -*- +alignas +%> + +---------------------------------------------------- + +[ + ["inline-lang-cpp", [ + ["delimiter", "%< "], + ["lang", "-*- C++ -*-"], + ["keyword", "alignas"], + ["delimiter", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for C++ in Pure. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/cpp/boolean_feature.test b/docs/_style/prism-master/tests/languages/cpp/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/cpp/class-name_feature.test b/docs/_style/prism-master/tests/languages/cpp/class-name_feature.test new file mode 100644 index 0000000000..f3d5df5f63 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp/class-name_feature.test @@ -0,0 +1,13 @@ +class Foo +class Foo_bar + +---------------------------------------------------- + +[ + ["keyword", "class"], ["class-name", "Foo"], + ["keyword", "class"], ["class-name", "Foo_bar"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/cpp/keyword_feature.test b/docs/_style/prism-master/tests/languages/cpp/keyword_feature.test new file mode 100644 index 0000000000..180f68ef09 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp/keyword_feature.test @@ -0,0 +1,49 @@ +alignas alignof asm auto bool +break case catch char char16_t char32_t +class; +compl const constexpr +const_cast continue decltype default +delete do double dynamic_cast +else enum explicit export extern +float for friend goto if +inline int long mutable namespace +new noexcept nullptr operator +private protected public register +reinterpret_cast return short +signed sizeof static static_assert +static_cast struct switch template +this thread_local throw try +typedef typeid typename union +unsigned using virtual void +volatile wchar_t while +int8_t int16_t int32_t int64_t +uint8_t uint16_t uint32_t uint64_t + +---------------------------------------------------- + +[ + ["keyword", "alignas"], ["keyword", "alignof"], ["keyword", "asm"], ["keyword", "auto"], ["keyword", "bool"], + ["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "char"], ["keyword", "char16_t"], ["keyword", "char32_t"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "compl"], ["keyword", "const"], ["keyword", "constexpr"], + ["keyword", "const_cast"], ["keyword", "continue"], ["keyword", "decltype"], ["keyword", "default"], + ["keyword", "delete"], ["keyword", "do"], ["keyword", "double"], ["keyword", "dynamic_cast"], + ["keyword", "else"], ["keyword", "enum"], ["keyword", "explicit"], ["keyword", "export"], ["keyword", "extern"], + ["keyword", "float"], ["keyword", "for"], ["keyword", "friend"], ["keyword", "goto"], ["keyword", "if"], + ["keyword", "inline"], ["keyword", "int"], ["keyword", "long"], ["keyword", "mutable"], ["keyword", "namespace"], + ["keyword", "new"], ["keyword", "noexcept"], ["keyword", "nullptr"], ["keyword", "operator"], + ["keyword", "private"], ["keyword", "protected"], ["keyword", "public"], ["keyword", "register"], + ["keyword", "reinterpret_cast"], ["keyword", "return"], ["keyword", "short"], + ["keyword", "signed"], ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "static_assert"], + ["keyword", "static_cast"], ["keyword", "struct"], ["keyword", "switch"], ["keyword", "template"], + ["keyword", "this"], ["keyword", "thread_local"], ["keyword", "throw"], ["keyword", "try"], + ["keyword", "typedef"], ["keyword", "typeid"], ["keyword", "typename"], ["keyword", "union"], + ["keyword", "unsigned"], ["keyword", "using"], ["keyword", "virtual"], ["keyword", "void"], + ["keyword", "volatile"], ["keyword", "wchar_t"], ["keyword", "while"], + ["keyword", "int8_t"], ["keyword", "int16_t"], ["keyword", "int32_t"], ["keyword", "int64_t"], + ["keyword", "uint8_t"], ["keyword", "uint16_t"], ["keyword", "uint32_t"], ["keyword", "uint64_t"] +] + +---------------------------------------------------- + +Checks for all keywords \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/cpp/operator_feature.test b/docs/_style/prism-master/tests/languages/cpp/operator_feature.test new file mode 100644 index 0000000000..a29f08ea5b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp/operator_feature.test @@ -0,0 +1,73 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> :: +? : += == != < > <= >= +and and_eq bitand bitor not not_eq or or_eq xor xor_eq + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "::"], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "and"], + ["operator", "and_eq"], + ["operator", "bitand"], + ["operator", "bitor"], + ["operator", "not"], + ["operator", "not_eq"], + ["operator", "or"], + ["operator", "or_eq"], + ["operator", "xor"], + ["operator", "xor_eq"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/docs/_style/prism-master/tests/languages/cpp/raw_string_feature.test b/docs/_style/prism-master/tests/languages/cpp/raw_string_feature.test new file mode 100644 index 0000000000..f9a896f882 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/cpp/raw_string_feature.test @@ -0,0 +1,18 @@ +R"raw( +test +)raw" +R"(no delimiter)" +R"(foo)"R"(bar)" + +---------------------------------------------------- + +[ + ["raw-string", "R\"raw(\r\ntest\r\n)raw\""], + ["raw-string", "R\"(no delimiter)\""], + ["raw-string", "R\"(foo)\""], + ["raw-string", "R\"(bar)\""] +] + +---------------------------------------------------- + +Checks for the C++11 raw string feature \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/crystal/attribute_feature.test b/docs/_style/prism-master/tests/languages/crystal/attribute_feature.test new file mode 100644 index 0000000000..4fb0bad1d0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/crystal/attribute_feature.test @@ -0,0 +1,21 @@ +@[AlwaysInline] +@[CallConvention("X86_StdCall")] + +---------------------------------------------------- + +[ + ["attribute", [ + ["delimiter", "@["], + ["constant", "AlwaysInline"], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "@["], + ["constant", "CallConvention"], ["punctuation", "("], ["string", [ "\"X86_StdCall\"" ]], ["punctuation", ")"], + ["delimiter", "]"] + ]] +] + +---------------------------------------------------- + +Checks for attributes. diff --git a/docs/_style/prism-master/tests/languages/crystal/expansion_feature.test b/docs/_style/prism-master/tests/languages/crystal/expansion_feature.test new file mode 100644 index 0000000000..b40bd1f51f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/crystal/expansion_feature.test @@ -0,0 +1,37 @@ +{{ 1_u32 }} +{% 2_u32 %} +{{ { 3_u32 } }} +{% % 4_u32 % %} + +---------------------------------------------------- + +[ + ["expansion", [ + ["delimiter", "{{"], + ["number", "1_u32"], + ["delimiter", "}}"] + ]], + ["expansion", [ + ["delimiter", "{%"], + ["number", "2_u32"], + ["delimiter", "%}"] + ]], + ["expansion", [ + ["delimiter", "{{"], + ["punctuation", "{"], + ["number", "3_u32"], + ["punctuation", "}"], + ["delimiter", "}}"] + ]], + ["expansion", [ + ["delimiter", "{%"], + ["operator", "%"], + ["number", "4_u32"], + ["operator", "%"], + ["delimiter", "%}"] + ]] +] + +---------------------------------------------------- + +Checks for macro expansions. diff --git a/docs/_style/prism-master/tests/languages/crystal/keyword_feature.test b/docs/_style/prism-master/tests/languages/crystal/keyword_feature.test new file mode 100644 index 0000000000..962beadf84 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/crystal/keyword_feature.test @@ -0,0 +1,37 @@ +abstract alias as asm begin break case +class; +def; +do else elsif +end ensure enum extend for fun +if include instance_sizeof +.is_a? +lib macro module next of out pointerof +private protected rescue +.responds_to? +return require select self sizeof struct super +then type typeof uninitialized union unless +until when while with yield __DIR__ __END_LINE__ +__FILE__ __LINE__ + +---------------------------------------------------- + +[ + ["keyword", "abstract"], ["keyword", "alias"], ["keyword", "as"], ["keyword", "asm"], ["keyword", "begin"], ["keyword", "break"], ["keyword", "case"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "def"], ["punctuation", ";"], + ["keyword", "do"], ["keyword", "else"], ["keyword", "elsif"], + ["keyword", "end"], ["keyword", "ensure"], ["keyword", "enum"], ["keyword", "extend"], ["keyword", "for"], ["keyword", "fun"], + ["keyword", "if"], ["keyword", "include"], ["keyword", "instance_sizeof"], + ["punctuation", "."], ["keyword", "is_a?"], + ["keyword", "lib"], ["keyword", "macro"], ["keyword", "module"], ["keyword", "next"], ["keyword", "of"], ["keyword", "out"], ["keyword", "pointerof"], + ["keyword", "private"], ["keyword", "protected"], ["keyword", "rescue"], + ["punctuation", "."], ["keyword", "responds_to?"], + ["keyword", "return"], ["keyword", "require"], ["keyword", "select"], ["keyword", "self"], ["keyword", "sizeof"], ["keyword", "struct"], ["keyword", "super"], + ["keyword", "then"], ["keyword", "type"], ["keyword", "typeof"], ["keyword", "uninitialized"], ["keyword", "union"], ["keyword", "unless"], + ["keyword", "until"], ["keyword", "when"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"], ["keyword", "__DIR__"], ["keyword", "__END_LINE__"], + ["keyword", "__FILE__"], ["keyword", "__LINE__"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/docs/_style/prism-master/tests/languages/crystal/number_feature.test b/docs/_style/prism-master/tests/languages/crystal/number_feature.test new file mode 100644 index 0000000000..cefdc5eea3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/crystal/number_feature.test @@ -0,0 +1,23 @@ +1 +1_1 +1_1_1 +0b10_01 +0o1_2_3 +0x123456789abcdef +012_345.678_9e+10_f64 + +---------------------------------------------------- + +[ + ["number", "1"], + ["number", "1_1"], + ["number", "1_1_1"], + ["number", "0b10_01"], + ["number", "0o1_2_3"], + ["number", "0x123456789abcdef"], + ["number", "012_345.678_9e+10_f64"] +] + +---------------------------------------------------- + +Checks for number literals. diff --git a/docs/_style/prism-master/tests/languages/csharp+aspnet/directive_feature.test b/docs/_style/prism-master/tests/languages/csharp+aspnet/directive_feature.test new file mode 100644 index 0000000000..f19c2a82c2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp+aspnet/directive_feature.test @@ -0,0 +1,70 @@ +<%: Page.Title %> +<%#:Item.ProductID%> + +<% if(foo) { %> + foobar +<% } %> + +---------------------------------------------------- + +[ + ["directive tag", [ + ["directive tag", "<%:"], + " Page", + ["punctuation", "."], + "Title ", + ["directive tag", "%>"] + ]], + + ["directive tag", [ + ["directive tag", "<%#:"], + "Item", + ["punctuation", "."], + "ProductID", + ["directive tag", "%>"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "a" + ]], + ["attr-name", [ + "href" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "ProductDetails.aspx?productID=", + ["directive tag", [ + ["directive tag", "<%#:"], + "Item", + ["punctuation", "."], + "ProductID", + ["directive tag", "%>"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + + ["directive tag", [ + ["directive tag", "<%"], + ["keyword", "if"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", "{"], + ["directive tag", "%>"] + ]], + "\r\n\tfoobar\r\n", + ["directive tag", [ + ["directive tag", "<%"], + ["punctuation", "}"], + ["directive tag", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/class-name_feature.test b/docs/_style/prism-master/tests/languages/csharp/class-name_feature.test new file mode 100644 index 0000000000..113982b6fe --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/class-name_feature.test @@ -0,0 +1,34 @@ +class Foo +interface BarBaz +class Foo : Bar +[Foobar] +void Foo(Bar bar, Baz baz) + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + ["keyword", "interface"], + ["class-name", ["BarBaz"]], + ["keyword", "class"], + ["class-name", ["Foo"]], + ["punctuation", ":"], + ["class-name", ["Bar"]], + ["punctuation", "["], + ["class-name", ["Foobar"]], + ["punctuation", "]"], + ["keyword", "void"], + ["function", "Foo"], + ["punctuation", "("], + ["class-name", ["Bar"]], + " bar", + ["punctuation", ","], + ["class-name", ["Baz"]], + " baz", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/generic_feature.test b/docs/_style/prism-master/tests/languages/csharp/generic_feature.test new file mode 100644 index 0000000000..05d3f589a9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/generic_feature.test @@ -0,0 +1,34 @@ +void method(); +method(); + +---------------------------------------------------- + +[ + ["keyword", "void"], + ["generic-method", [ + ["function", "method"], + ["punctuation", "<"], + ["class-name", ["T"]], + ["punctuation", ","], + ["class-name", ["U"]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["generic-method", [ + ["function", "method"], + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "char"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for generic methods \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/issue1091.test b/docs/_style/prism-master/tests/languages/csharp/issue1091.test new file mode 100644 index 0000000000..c0c264b1f4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/issue1091.test @@ -0,0 +1,12 @@ +@"file:///" + +---------------------------------------------------- + +[ + ["string", "@\"file:///\""] +] + +---------------------------------------------------- + +Checks that three slashes inside a string do not break highlighting. +See #1091. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/issue1365.test b/docs/_style/prism-master/tests/languages/csharp/issue1365.test new file mode 100644 index 0000000000..6aaf3c7169 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/issue1365.test @@ -0,0 +1,39 @@ +interface ILogger { + void Init(SomeClass file); + void LogInfo(string message); +} +public class SomeClass : BaseClass {} + +---------------------------------------------------- + +[ + ["keyword", "interface"], + ["class-name", ["ILogger"]], + ["punctuation", "{"], + ["keyword", "void"], + ["function", "Init"], + ["punctuation", "("], + ["class-name", ["SomeClass"]], + " file", + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "void"], + ["function", "LogInfo"], + ["punctuation", "("], + ["keyword", "string"], + " message", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "class"], + ["class-name", ["SomeClass"]], + ["punctuation", ":"], + ["class-name", ["BaseClass"]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class names. See #1365 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/issue1371.test b/docs/_style/prism-master/tests/languages/csharp/issue1371.test new file mode 100644 index 0000000000..1fec4a0580 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/issue1371.test @@ -0,0 +1,144 @@ +container.Register(); +container.Register(); +var container = new Container(f => +{ + f.For().Use(); +}); +class LandAnimal { + public void Move() => Run(); } +class Dog : LandAnimal { + public new void Move() => Run(); } +class Works : LandAnimal { + public override void Move() => Run(); } +[Required] +[RequiredAttribute()] +[Range(1, 10)] + +---------------------------------------------------- + +[ + "container", + ["punctuation", "."], + ["generic-method", [ + ["function", "Register"], + ["punctuation", "<"], + ["class-name", ["Car"]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + "\r\ncontainer", + ["punctuation", "."], + ["generic-method", [ + ["function", "Register"], + ["punctuation", "<"], + ["class-name", ["IJuice"]], + ["punctuation", ","], + ["class-name", ["Juice"]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "var"], + " container ", + ["operator", "="], + ["keyword", "new"], + ["class-name", ["Container"]], + ["punctuation", "("], + "f ", + ["operator", "=>"], + ["punctuation", "{"], + "\r\n f", + ["punctuation", "."], + ["generic-method", [ + ["function", "For"], + ["punctuation", "<"], + ["class-name", ["IFoo"]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "."], + ["generic-method", [ + ["function", "Use"], + ["punctuation", "<"], + ["class-name", ["Foo"]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", ["LandAnimal"]], + ["punctuation", "{"], + ["keyword", "public"], + ["keyword", "void"], + ["function", "Move"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["function", "Run"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "class"], + ["class-name", ["Dog"]], + ["punctuation", ":"], + ["class-name", ["LandAnimal"]], + ["punctuation", "{"], + ["keyword", "public"], + ["keyword", "new"], + ["keyword", "void"], + ["function", "Move"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["function", "Run"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "class"], + ["class-name", ["Works"]], + ["punctuation", ":"], + ["class-name", ["LandAnimal"]], + ["punctuation", "{"], + ["keyword", "public"], + ["keyword", "override"], + ["keyword", "void"], + ["function", "Move"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["function", "Run"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", "["], + ["class-name", ["Required"]], + ["punctuation", "]"], + ["punctuation", "["], + ["class-name", ["RequiredAttribute"]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "]"], + ["punctuation", "["], + ["class-name", ["Range"]], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ")"], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for various cases of class names. See #1371 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/issue806.test b/docs/_style/prism-master/tests/languages/csharp/issue806.test new file mode 100644 index 0000000000..f7a4096f41 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/issue806.test @@ -0,0 +1,12 @@ +0.3f + +---------------------------------------------------- + +[ + ["number", "0.3f"] +] + +---------------------------------------------------- + +Checks that "f" prefix is properly highlighted as part of the number. +See #806. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/keyword_feature.test b/docs/_style/prism-master/tests/languages/csharp/keyword_feature.test new file mode 100644 index 0000000000..e1c37f0a08 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/keyword_feature.test @@ -0,0 +1,209 @@ +abstract +add +alias +as +ascending +async +await +base +bool +break +byte +case +catch +char +checked +class; +const +continue +decimal +default +delegate +descending +do +double +dynamic +else +enum +event +explicit +extern +false +finally +fixed +float +for +foreach +from +get +global +goto +group +if +implicit +in +int +interface; +internal +into +is +join +let +lock +long +namespace +new; +null +object +operator +orderby +out +override +params +partial +private +protected +public +readonly +ref +remove +return +sbyte +sealed +select +set +short +sizeof +stackalloc +static +string +struct +switch +this +throw +true +try +typeof +uint +ulong +unchecked +unsafe +ushort +using +value +var +virtual +void +volatile +where +while +yield + +---------------------------------------------------- + +[ + ["keyword", "abstract"], + ["keyword", "add"], + ["keyword", "alias"], + ["keyword", "as"], + ["keyword", "ascending"], + ["keyword", "async"], + ["keyword", "await"], + ["keyword", "base"], + ["keyword", "bool"], + ["keyword", "break"], + ["keyword", "byte"], + ["keyword", "case"], + ["keyword", "catch"], + ["keyword", "char"], + ["keyword", "checked"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "decimal"], + ["keyword", "default"], + ["keyword", "delegate"], + ["keyword", "descending"], + ["keyword", "do"], + ["keyword", "double"], + ["keyword", "dynamic"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "event"], + ["keyword", "explicit"], + ["keyword", "extern"], + ["keyword", "false"], + ["keyword", "finally"], + ["keyword", "fixed"], + ["keyword", "float"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "from"], + ["keyword", "get"], + ["keyword", "global"], + ["keyword", "goto"], + ["keyword", "group"], + ["keyword", "if"], + ["keyword", "implicit"], + ["keyword", "in"], + ["keyword", "int"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "internal"], + ["keyword", "into"], + ["keyword", "is"], + ["keyword", "join"], + ["keyword", "let"], + ["keyword", "lock"], + ["keyword", "long"], + ["keyword", "namespace"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "null"], + ["keyword", "object"], + ["keyword", "operator"], + ["keyword", "orderby"], + ["keyword", "out"], + ["keyword", "override"], + ["keyword", "params"], + ["keyword", "partial"], + ["keyword", "private"], + ["keyword", "protected"], + ["keyword", "public"], + ["keyword", "readonly"], + ["keyword", "ref"], + ["keyword", "remove"], + ["keyword", "return"], + ["keyword", "sbyte"], + ["keyword", "sealed"], + ["keyword", "select"], + ["keyword", "set"], + ["keyword", "short"], + ["keyword", "sizeof"], + ["keyword", "stackalloc"], + ["keyword", "static"], + ["keyword", "string"], + ["keyword", "struct"], + ["keyword", "switch"], + ["keyword", "this"], + ["keyword", "throw"], + ["keyword", "true"], + ["keyword", "try"], + ["keyword", "typeof"], + ["keyword", "uint"], + ["keyword", "ulong"], + ["keyword", "unchecked"], + ["keyword", "unsafe"], + ["keyword", "ushort"], + ["keyword", "using"], + ["keyword", "value"], + ["keyword", "var"], + ["keyword", "virtual"], + ["keyword", "void"], + ["keyword", "volatile"], + ["keyword", "where"], + ["keyword", "while"], + ["keyword", "yield"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/number_feature.test b/docs/_style/prism-master/tests/languages/csharp/number_feature.test new file mode 100644 index 0000000000..126808037b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/number_feature.test @@ -0,0 +1,17 @@ +42 +3.14159 +0xbabe +0XBABE + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "0xbabe"], + ["number", "0XBABE"] +] + +---------------------------------------------------- + +Checks for decimal and hexadecimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/operator_feature.test b/docs/_style/prism-master/tests/languages/csharp/operator_feature.test new file mode 100644 index 0000000000..4749c38c75 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/operator_feature.test @@ -0,0 +1,60 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> => += == != < > <= >= +?? + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "=>"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "??"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/docs/_style/prism-master/tests/languages/csharp/preprocessor_feature.test b/docs/_style/prism-master/tests/languages/csharp/preprocessor_feature.test new file mode 100644 index 0000000000..93ad4903ab --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/preprocessor_feature.test @@ -0,0 +1,35 @@ +#define DEBUG +#if DEBUG +#endif + +#elif +#else +#endregion +#error +#line +#pragma +#region +#undef +#warning + +---------------------------------------------------- + +[ + ["preprocessor", ["#", ["directive", "define"], " DEBUG"]], + ["preprocessor", ["#", ["directive", "if"], " DEBUG"]], + ["preprocessor", ["#", ["directive", "endif"]]], + + ["preprocessor", ["#", ["directive", "elif"]]], + ["preprocessor", ["#", ["directive", "else"]]], + ["preprocessor", ["#", ["directive", "endregion"]]], + ["preprocessor", ["#", ["directive", "error"]]], + ["preprocessor", ["#", ["directive", "line"]]], + ["preprocessor", ["#", ["directive", "pragma"]]], + ["preprocessor", ["#", ["directive", "region"]]], + ["preprocessor", ["#", ["directive", "undef"]]], + ["preprocessor", ["#", ["directive", "warning"]]] +] + +---------------------------------------------------- + +Checks for preprocessor directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csharp/punctuation_feature.test b/docs/_style/prism-master/tests/languages/csharp/punctuation_feature.test new file mode 100644 index 0000000000..b9a7bf1499 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/punctuation_feature.test @@ -0,0 +1,27 @@ +. , ; : :: +? ?. +[ ] { } ( ) + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "::"], + + ["punctuation", "?"], + ["punctuation", "?."], + + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/docs/_style/prism-master/tests/languages/csharp/string_feature.test b/docs/_style/prism-master/tests/languages/csharp/string_feature.test new file mode 100644 index 0000000000..2814cb561c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csharp/string_feature.test @@ -0,0 +1,32 @@ +"" +"fo\"o" + +@"" +@"foo" +@"fo""o" +@"foo +bar" + +'a' +'\'' +'\\' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + + ["string", "@\"\""], + ["string", "@\"foo\""], + ["string", "@\"fo\"\"o\""], + ["string", "@\"foo\r\nbar\""], + ["string", "'a'"], + ["string", "'\\''"], + ["string", "'\\\\'"] +] + +---------------------------------------------------- + +Checks for normal and verbatim strings. +Also checks for single quoted characters. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/csp/directive_no_value_feature.test b/docs/_style/prism-master/tests/languages/csp/directive_no_value_feature.test new file mode 100644 index 0000000000..5ae927df77 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csp/directive_no_value_feature.test @@ -0,0 +1,11 @@ +upgrade-insecure-requests; + +---------------------------------------------------- + +[ + ["directive", "upgrade-insecure-requests;"] +] + +---------------------------------------------------- + +Checks for a "void" CSP directive followed by semicolon. diff --git a/docs/_style/prism-master/tests/languages/csp/directive_with_source_expression_feature.test b/docs/_style/prism-master/tests/languages/csp/directive_with_source_expression_feature.test new file mode 100644 index 0000000000..fc059f4246 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csp/directive_with_source_expression_feature.test @@ -0,0 +1,12 @@ +script-src example.com; + +---------------------------------------------------- + +[ + ["directive", "script-src "], + "example.com;" +] + +---------------------------------------------------- + +Checks for CSP directive followed by a source expression. diff --git a/docs/_style/prism-master/tests/languages/csp/safe_feature.test b/docs/_style/prism-master/tests/languages/csp/safe_feature.test new file mode 100644 index 0000000000..af31d1ac4d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csp/safe_feature.test @@ -0,0 +1,19 @@ +default-src 'none'; style-src 'self' 'strict-dynamic' 'nonce-yeah' 'sha256-EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4='; + +---------------------------------------------------- + +[ + ["directive", "default-src "], + ["safe", "'none'"], + "; ", + ["directive", "style-src "], + ["safe", "'self'"], + ["safe", "'strict-dynamic'"], + ["safe", "'nonce-yeah'"], + ["safe", "'sha256-EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4='"], + ";" +] + +---------------------------------------------------- + +Checks for source expressions classified as safe. diff --git a/docs/_style/prism-master/tests/languages/csp/unsafe_feature.test b/docs/_style/prism-master/tests/languages/csp/unsafe_feature.test new file mode 100644 index 0000000000..1fe7e478e3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/csp/unsafe_feature.test @@ -0,0 +1,15 @@ +script-src 'unsafe-inline' 'unsafe-eval' 'unsafe-hashed-attributes'; + +---------------------------------------------------- + +[ + ["directive", "script-src "], + ["unsafe", "'unsafe-inline'"], + ["unsafe", "'unsafe-eval'"], + ["unsafe", "'unsafe-hashed-attributes'"], + ";" +] + +---------------------------------------------------- + +Checks for source expressions classified as unsafe. diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/entity_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/entity_feature.test new file mode 100644 index 0000000000..c1c91a290b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/entity_feature.test @@ -0,0 +1,13 @@ +\0022 +\20B9 + +---------------------------------------------------- + +[ + ["entity", "\\0022"], + ["entity", "\\20B9"] +] + +---------------------------------------------------- + +Checks for entities. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/hexcode_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/hexcode_feature.test new file mode 100644 index 0000000000..cac0b44b7d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/hexcode_feature.test @@ -0,0 +1,17 @@ +#ff0000 +#BADA55 +#4dd +#D0C + +---------------------------------------------------- + +[ + ["hexcode", "#ff0000"], + ["hexcode", "#BADA55"], + ["hexcode", "#4dd"], + ["hexcode", "#D0C"] +] + +---------------------------------------------------- + +Checks for hexadecimal colors. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/number_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/number_feature.test new file mode 100644 index 0000000000..ef58e62036 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/number_feature.test @@ -0,0 +1,17 @@ +42 +3.14159 +-42 +-3.14 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "-42"], + ["number", "-3.14"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/operator_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/operator_feature.test new file mode 100644 index 0000000000..0df7612b38 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/operator_feature.test @@ -0,0 +1,71 @@ +width: calc(100% + 20px); +width: calc(100% - 20px); +width: calc(5px * 2); +width: calc(10px / 2); +height: -20px; +content: 'this - is not an operator'; + +---------------------------------------------------- + +[ + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "+"], + ["number", "20"], + ["unit", "px"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "-"], + ["number", "20"], + ["unit", "px"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "5"], + ["unit", "px"], + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "10"], + ["unit", "px"], + ["operator", "/"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "height"], + ["punctuation", ":"], + ["number", "-20"], + ["unit", "px"], + ["punctuation", ";"], + + ["property", "content"], + ["punctuation", ":"], + ["string", "'this - is not an operator'"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/selector_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/selector_feature.test new file mode 100644 index 0000000000..3931a66334 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/selector_feature.test @@ -0,0 +1,58 @@ +foo:after { +foo::first-letter { + +foo:nth-child(2n+1) { + +foo.bar { + +foo#bar { + +#foo > .bar:not(baz):after { + +div[foo="bar"] { + +---------------------------------------------------- + +[ + ["selector", [ + "foo", + ["pseudo-element", ":after"] + ]], ["punctuation", "{"], + + ["selector", [ + "foo", + ["pseudo-element", "::first-letter"] + ]], ["punctuation", "{"], + + ["selector", [ + "foo", + ["pseudo-class", ":nth-child(2n+1)"] + ]], ["punctuation", "{"], + + ["selector", [ + "foo", + ["class", ".bar"] + ]], ["punctuation", "{"], + + ["selector", [ + "foo", + ["id", "#bar"] + ]], ["punctuation", "{"], + + ["selector", [ + ["id", "#foo"], + " > ", + ["class", ".bar"], + ["pseudo-class", ":not(baz)"], + ["pseudo-element", ":after"] + ]], ["punctuation", "{"], + + ["selector", [ + "div", + ["attribute", "[foo=\"bar\"]"] + ]], ["punctuation", "{"] +] + +---------------------------------------------------- + +Checks for pseudo-elements, pseudo-classes, classes and ids inside selectors. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/unit_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/unit_feature.test new file mode 100644 index 0000000000..6d5c15c8e6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/unit_feature.test @@ -0,0 +1,21 @@ +100% +1rem +500ms +.5s +-3px +-0.618vw + +---------------------------------------------------- + +[ + ["number", "100"], ["unit", "%"], + ["number", "1"], ["unit", "rem"], + ["number", "500"], ["unit", "ms"], + ["number", ".5"], ["unit", "s"], + ["number", "-3"], ["unit", "px"], + ["number", "-0.618"], ["unit", "vw"] +] + +---------------------------------------------------- + +Checks for units. diff --git a/docs/_style/prism-master/tests/languages/css!+css-extras/variable_feature.test b/docs/_style/prism-master/tests/languages/css!+css-extras/variable_feature.test new file mode 100644 index 0000000000..dc089b5f11 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css!+css-extras/variable_feature.test @@ -0,0 +1,54 @@ +element { + --foo: green; +} + +var(--color-primary) +var(--level-3) +var(--foo, red) +calc(100% - var(--margin-size) * 2) + +---------------------------------------------------- + +[ + ["selector", ["element"]], + ["punctuation", "{"], + ["variable", "--foo"], + ["punctuation", ":"], + " green", + ["punctuation", ";"], + ["punctuation", "}"], + + ["function", "var"], + ["punctuation", "("], + ["variable", "--color-primary"], + ["punctuation", ")"], + + ["function", "var"], + ["punctuation", "("], + ["variable", "--level-3"], + ["punctuation", ")"], + + ["function", "var"], + ["punctuation", "("], + ["variable", "--foo"], + ["punctuation", ","], + " red", + ["punctuation", ")"], + + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "-"], + ["function", "var"], + ["punctuation", "("], + ["variable", "--margin-size"], + ["punctuation", ")"], + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for variables. diff --git a/docs/_style/prism-master/tests/languages/css+haml/css+haml_usage.test b/docs/_style/prism-master/tests/languages/css+haml/css+haml_usage.test new file mode 100644 index 0000000000..c90047f28f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css+haml/css+haml_usage.test @@ -0,0 +1,28 @@ +:css + .test {} + +~ + :css + .test {} + +---------------------------------------------------- + +[ + ["filter-css", [ + ["filter-name", ":css"], + ["selector", ".test"], + ["punctuation", "{"], + ["punctuation", "}"] + ]], + ["punctuation", "~"], + ["filter-css", [ + ["filter-name", ":css"], + ["selector", ".test"], + ["punctuation", "{"], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for CSS filter in Haml. The tilde serves only as a separator. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css+http/css_inclusion.test b/docs/_style/prism-master/tests/languages/css+http/css_inclusion.test new file mode 100644 index 0000000000..f805d6d4db --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css+http/css_inclusion.test @@ -0,0 +1,25 @@ +Content-type: text/css + +a.link:hover { + color: red; +} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " text/css", + ["text/css", [ + ["selector", "a.link:hover"], + ["punctuation", "{"], + ["property", "color"], + ["punctuation", ":"], + " red", + ["punctuation", ";"], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for JavaScript content in HTTP. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css+textile/css_inclusion.test b/docs/_style/prism-master/tests/languages/css+textile/css_inclusion.test new file mode 100644 index 0000000000..8b6f6052e8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css+textile/css_inclusion.test @@ -0,0 +1,117 @@ +h3{color: red}. Baz + +h4[fr]{text-decoration:underline;}(#bar). Foobar + +*{color:red}bold* +"(foo)[en]{color:blue;}Foo":bar + +#[fr](#foo){background:pink} Foobar + +!(foo)[en]{border:1px solid #ccc}foo.png! + +{color: blue}.|{font-weight:bold}.Baz| +(foo#bar){font-style:italic}[fr].|{background:red;}(bar#baz)[en].Baz| + +---------------------------------------------------- + +[ + ["phrase", [ + ["block-tag", [ + ["tag", "h3"], + ["modifier", [ + ["css", [["punctuation", "{"], ["property", "color"], ["punctuation", ":"], " red", ["punctuation", "}"]]] + ]], + ["punctuation", "."] + ]], + " Baz" + ]], + ["phrase", [ + ["block-tag", [ + ["tag", "h4"], + ["modifier", [ + ["punctuation", "["], ["lang", "fr"], ["punctuation", "]"], + ["css", [["punctuation", "{"], ["property", "text-decoration"], ["punctuation", ":"], "underline", ["punctuation", ";"], ["punctuation", "}"]]], + ["punctuation", "("], ["class-id", "#bar"], ["punctuation", ")"] + ]], + ["punctuation", "."] + ]], + " Foobar" + ]], + + ["phrase", [ + ["inline", [ + ["punctuation", "*"], + ["modifier", [ + ["css", [["punctuation", "{"], ["property", "color"], ["punctuation", ":"], "red", ["punctuation", "}"]]] + ]], + ["bold", ["bold"]], + ["punctuation", "*"] + ]], + ["link", [ + ["punctuation", "\""], + ["modifier", [ + ["punctuation", "("], ["class-id", "foo"], ["punctuation", ")"], + ["punctuation", "["], ["lang", "en"], ["punctuation", "]"], + ["css", [["punctuation", "{"], ["property", "color"], ["punctuation", ":"], "blue", ["punctuation", ";"], ["punctuation", "}"]]] + ]], + ["text", "Foo"], + ["punctuation", "\""], ["punctuation", ":"], + ["url", "bar"] + ]] + ]], + + ["phrase", [ + ["list", [ + ["punctuation", "#"], + ["modifier", [ + ["punctuation", "["], ["lang", "fr"], ["punctuation", "]"], + ["punctuation", "("], ["class-id", "#foo"], ["punctuation", ")"], + ["css", [["punctuation", "{"], ["property", "background"], ["punctuation", ":"], "pink", ["punctuation", "}"]]] + ]], + " Foobar" + ]] + ]], + + ["phrase", [ + ["image", [ + ["punctuation", "!"], + ["modifier", [ + ["punctuation", "("], ["class-id", "foo"], ["punctuation", ")"], + ["punctuation", "["], ["lang", "en"], ["punctuation", "]"], + ["css", [["punctuation", "{"], ["property", "border"], ["punctuation", ":"], "1px solid #ccc", ["punctuation", "}"]]] + ]], + ["source", "foo.png"], + ["punctuation", "!"] + ]] + ]], + + ["phrase", [ + ["table", [ + ["modifier", [ + ["css", [["punctuation", "{"], ["property", "color"], ["punctuation", ":"], " blue", ["punctuation", "}"]]] + ]], + ["punctuation", "."], ["punctuation", "|"], + ["modifier", [ + ["css", [["punctuation", "{"], ["property", "font-weight"], ["punctuation", ":"], "bold", ["punctuation", "}"]]] + ]], + ["punctuation", "."], "Baz", ["punctuation", "|"], + + ["modifier", [ + ["punctuation", "("], ["class-id", "foo#bar"], ["punctuation", ")"], + ["css", [["punctuation", "{"], ["property", "font-style"], ["punctuation", ":"], "italic", ["punctuation", "}"]]], + ["punctuation", "["], ["lang", "fr"], ["punctuation", "]"] + ]], + ["punctuation", "."], ["punctuation", "|"], + ["modifier", [ + ["css", [["punctuation", "{"], ["property", "background"], ["punctuation", ":"], "red", ["punctuation", ";"], ["punctuation", "}"]]], + ["punctuation", "("], ["class-id", "bar#baz"], ["punctuation", ")"], + ["punctuation", "["], ["lang", "en"], ["punctuation", "]"] + ]], + ["punctuation", "."], "Baz", ["punctuation", "|"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for CSS modifier. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/atrule_feature.test b/docs/_style/prism-master/tests/languages/css/atrule_feature.test new file mode 100644 index 0000000000..abc75def35 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/atrule_feature.test @@ -0,0 +1,47 @@ +@import url(foo.css); +@media print {} +@media (min-width: 640px) and (min-height: 1000px) {} +@main-color: red; + +---------------------------------------------------- + +[ + ["atrule", [ + ["rule", "@import"], + ["url", "url(foo.css)"], + ["punctuation", ";"] + ]], + ["atrule", [ + ["rule", "@media"], + " print" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["atrule", [ + ["rule", "@media"], + ["punctuation", "("], + ["property", "min-width"], + ["punctuation", ":"], + " 640px", + ["punctuation", ")"], + " and ", + ["punctuation", "("], + ["property", "min-height"], + ["punctuation", ":"], + " 1000px", + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["atrule", [ + ["rule", "@main-color"], + ["punctuation", ":"], + " red", + ["punctuation", ";"] + ]] +] + +---------------------------------------------------- + +Checks for at-rules. +Also checks for LESS variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/comment_feature.test b/docs/_style/prism-master/tests/languages/css/comment_feature.test new file mode 100644 index 0000000000..a3899eddb2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/comment_feature.test @@ -0,0 +1,16 @@ +/**/ +/* foo */ +/* foo +bar */ + +---------------------------------------------------- + +[ + ["comment", "/**/"], + ["comment", "/* foo */"], + ["comment", "/* foo\r\nbar */"] +] + +---------------------------------------------------- + +Checks for empty comment, single-line comment and multi-line comment. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/function_feature.test b/docs/_style/prism-master/tests/languages/css/function_feature.test new file mode 100644 index 0000000000..0af02a0c55 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/function_feature.test @@ -0,0 +1,41 @@ +transform: translate(-50%); +background: rgba(0, 0, 0, 0.2); +filter: opacity(alpha=0); + +---------------------------------------------------- + +[ + ["property", "transform"], + ["punctuation", ":"], + ["function", "translate"], + ["punctuation", "("], + "-50%", + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "background"], + ["punctuation", ":"], + ["function", "rgba"], + ["punctuation", "("], + "0", + ["punctuation", ","], + " 0", + ["punctuation", ","], + " 0", + ["punctuation", ","], + " 0.2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "filter"], + ["punctuation", ":"], + ["function", "opacity"], + ["punctuation", "("], + "alpha=0", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/important_feature.test b/docs/_style/prism-master/tests/languages/css/important_feature.test new file mode 100644 index 0000000000..0f5c1409e9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/important_feature.test @@ -0,0 +1,27 @@ +color: red !important; +padding: 10px 20px 30px !important; +position:absolute!important; + +---------------------------------------------------- + +[ + ["property", "color"], + ["punctuation", ":"], + " red ", + ["important", "!important"], + ["punctuation", ";"], + ["property", "padding"], + ["punctuation", ":"], + " 10px 20px 30px ", + ["important", "!important"], + ["punctuation", ";"], + ["property", "position"], + ["punctuation", ":"], + "absolute", + ["important", "!important"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for !important rule. diff --git a/docs/_style/prism-master/tests/languages/css/property_feature.test b/docs/_style/prism-master/tests/languages/css/property_feature.test new file mode 100644 index 0000000000..d01e2d1dc0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/property_feature.test @@ -0,0 +1,29 @@ +color: red; +background-color: blue; +-webkit-transform: none; +--ötökkä: 2; + +---------------------------------------------------- + +[ + ["property", "color"], + ["punctuation", ":"], + " red", + ["punctuation", ";"], + ["property", "background-color"], + ["punctuation", ":"], + " blue", + ["punctuation", ";"], + ["property", "-webkit-transform"], + ["punctuation", ":"], + " none", + ["punctuation", ";"], + ["property", "--ötökkä"], + ["punctuation", ":"], + " 2", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/selector_feature.test b/docs/_style/prism-master/tests/languages/css/selector_feature.test new file mode 100644 index 0000000000..5a59720135 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/selector_feature.test @@ -0,0 +1,25 @@ +foo{ +foo + bar { +foo:first-child:hover { +* { +foo, +bar{ + +---------------------------------------------------- + +[ + ["selector", "foo"], + ["punctuation", "{"], + ["selector", "foo + bar"], + ["punctuation", "{"], + ["selector", "foo:first-child:hover"], + ["punctuation", "{"], + ["selector", "*"], + ["punctuation", "{"], + ["selector", "foo,\r\nbar"], + ["punctuation", "{"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line selectors. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/string_feature.test b/docs/_style/prism-master/tests/languages/css/string_feature.test new file mode 100644 index 0000000000..c849d6044c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/string_feature.test @@ -0,0 +1,22 @@ +"f\"oo" +'f\'oo' +"foo\ +bar" +'foo\ +bar' +"foo /* bar" /* and out */ + +---------------------------------------------------- + +[ + ["string", "\"f\\\"oo\""], + ["string", "'f\\'oo'"], + ["string", "\"foo\\\r\nbar\""], + ["string", "'foo\\\r\nbar'"], + ["string", "\"foo /* bar\""], + ["comment", "/* and out */"] +] + +---------------------------------------------------- + +Checks for single-quoted and double-quoted strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/css/url_feature.test b/docs/_style/prism-master/tests/languages/css/url_feature.test new file mode 100644 index 0000000000..05ce8f9f74 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/css/url_feature.test @@ -0,0 +1,21 @@ +url(foo.png) +url('foo.png') +url("foo.png") +url('foo\ +bar.png') +url("foo\ +bar.png") + +---------------------------------------------------- + +[ + ["url", "url(foo.png)"], + ["url", "url('foo.png')"], + ["url", "url(\"foo.png\")"], + ["url", "url('foo\\\r\nbar.png')"], + ["url", "url(\"foo\\\r\nbar.png\")"] +] + +---------------------------------------------------- + +Checks for url(), unquoted, single-quoted and double-quoted. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/comment_feature.test b/docs/_style/prism-master/tests/languages/d/comment_feature.test new file mode 100644 index 0000000000..ed1f86036b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/comment_feature.test @@ -0,0 +1,27 @@ +#!/usr/bin/env rdmd + +/++/ +/+ foo +bar +/ +/+ foo + /+ + bar +/ +baz +/ +// This q{is} a comment +// This /* is a */ comment + +---------------------------------------------------- + +[ + ["comment", "#!/usr/bin/env rdmd"], + ["comment", "/++/"], + ["comment", "/+ foo\r\nbar +/"], + ["comment", "/+ foo\r\n\t/+\r\n\tbar +/\r\nbaz +/"], + ["comment", "// This q{is} a comment"], + ["comment", "// This /* is a */ comment"] +] + +---------------------------------------------------- + +Checks for shebang and nestable multi-line comments. +Other comments are tested in clike. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/keyword_feature.test b/docs/_style/prism-master/tests/languages/d/keyword_feature.test new file mode 100644 index 0000000000..a5a03688d3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/keyword_feature.test @@ -0,0 +1,251 @@ +$ +abstract +alias +align +asm +assert +auto +body +bool +break +byte +case +cast +catch +cdouble +cent +cfloat +char +class; +const +continue +creal +dchar +debug +default +delegate +delete +deprecated +do +double +else +enum +export +extern +false +final +finally +float +for +foreach +foreach_reverse +function +goto +idouble +if +ifloat +immutable +import +inout +int +interface; +invariant +ireal +lazy +long +macro +mixin +module +new; +nothrow +null +out +override +package +pragma +private +protected +public +pure +real +ref +return +scope +shared +short +static +struct +super +switch +synchronized +template +this +throw +true +try +typedef +typeid +typeof +ubyte +ucent +uint +ulong +union +unittest +ushort +version +void +volatile +wchar +while +with +__FILE__ +__MODULE__ +__LINE__ +__FUNCTION__ +__PRETTY_FUNCTION__ +__DATE__ +__EOF__ +__TIME__ +__TIMESTAMP__ +__VENDOR__ +__VERSION__ +__gshared +__traits +__vector +__parameters +string +wstring +dstring +size_t +ptrdiff_t + +---------------------------------------------------- + +[ + ["keyword", "$"], + ["keyword", "abstract"], + ["keyword", "alias"], + ["keyword", "align"], + ["keyword", "asm"], + ["keyword", "assert"], + ["keyword", "auto"], + ["keyword", "body"], + ["keyword", "bool"], + ["keyword", "break"], + ["keyword", "byte"], + ["keyword", "case"], + ["keyword", "cast"], + ["keyword", "catch"], + ["keyword", "cdouble"], + ["keyword", "cent"], + ["keyword", "cfloat"], + ["keyword", "char"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "creal"], + ["keyword", "dchar"], + ["keyword", "debug"], + ["keyword", "default"], + ["keyword", "delegate"], + ["keyword", "delete"], + ["keyword", "deprecated"], + ["keyword", "do"], + ["keyword", "double"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "export"], + ["keyword", "extern"], + ["keyword", "false"], + ["keyword", "final"], + ["keyword", "finally"], + ["keyword", "float"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "foreach_reverse"], + ["keyword", "function"], + ["keyword", "goto"], + ["keyword", "idouble"], + ["keyword", "if"], + ["keyword", "ifloat"], + ["keyword", "immutable"], + ["keyword", "import"], + ["keyword", "inout"], + ["keyword", "int"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "invariant"], + ["keyword", "ireal"], + ["keyword", "lazy"], + ["keyword", "long"], + ["keyword", "macro"], + ["keyword", "mixin"], + ["keyword", "module"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "nothrow"], + ["keyword", "null"], + ["keyword", "out"], + ["keyword", "override"], + ["keyword", "package"], + ["keyword", "pragma"], + ["keyword", "private"], + ["keyword", "protected"], + ["keyword", "public"], + ["keyword", "pure"], + ["keyword", "real"], + ["keyword", "ref"], + ["keyword", "return"], + ["keyword", "scope"], + ["keyword", "shared"], + ["keyword", "short"], + ["keyword", "static"], + ["keyword", "struct"], + ["keyword", "super"], + ["keyword", "switch"], + ["keyword", "synchronized"], + ["keyword", "template"], + ["keyword", "this"], + ["keyword", "throw"], + ["keyword", "true"], + ["keyword", "try"], + ["keyword", "typedef"], + ["keyword", "typeid"], + ["keyword", "typeof"], + ["keyword", "ubyte"], + ["keyword", "ucent"], + ["keyword", "uint"], + ["keyword", "ulong"], + ["keyword", "union"], + ["keyword", "unittest"], + ["keyword", "ushort"], + ["keyword", "version"], + ["keyword", "void"], + ["keyword", "volatile"], + ["keyword", "wchar"], + ["keyword", "while"], + ["keyword", "with"], + ["keyword", "__FILE__"], + ["keyword", "__MODULE__"], + ["keyword", "__LINE__"], + ["keyword", "__FUNCTION__"], + ["keyword", "__PRETTY_FUNCTION__"], + ["keyword", "__DATE__"], + ["keyword", "__EOF__"], + ["keyword", "__TIME__"], + ["keyword", "__TIMESTAMP__"], + ["keyword", "__VENDOR__"], + ["keyword", "__VERSION__"], + ["keyword", "__gshared"], + ["keyword", "__traits"], + ["keyword", "__vector"], + ["keyword", "__parameters"], + ["keyword", "string"], + ["keyword", "wstring"], + ["keyword", "dstring"], + ["keyword", "size_t"], + ["keyword", "ptrdiff_t"] +] + +---------------------------------------------------- + +Checks for $, keywords, special tokens and globally defined symbols. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/number_feature.test b/docs/_style/prism-master/tests/languages/d/number_feature.test new file mode 100644 index 0000000000..817bd7e3d6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/number_feature.test @@ -0,0 +1,55 @@ +42 +42_000 +42L +42U +42UL +3.14_15_9 +3.2e8 +0.4e-7 +62.14e+4 + +0xBAD_FACE +0xFFU +0xfaL +0x42UL +0x2.AFp4 +0xFp-3 +0xFBp+9 + +0b0000_1111 + +6.3i +6.3fi +6.3Li + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "42_000"], + ["number", "42L"], + ["number", "42U"], + ["number", "42UL"], + ["number", "3.14_15_9"], + ["number", "3.2e8"], + ["number", "0.4e-7"], + ["number", "62.14e+4"], + + ["number", "0xBAD_FACE"], + ["number", "0xFFU"], + ["number", "0xfaL"], + ["number", "0x42UL"], + ["number", "0x2.AFp4"], + ["number", "0xFp-3"], + ["number", "0xFBp+9"], + + ["number", "0b0000_1111"], + + ["number", "6.3i"], + ["number", "6.3fi"], + ["number", "6.3Li"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/operator_feature.test b/docs/_style/prism-master/tests/languages/d/operator_feature.test new file mode 100644 index 0000000000..d7e291da78 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/operator_feature.test @@ -0,0 +1,63 @@ +|| +&& +++ +-- +.. ... +=> +in is +!in !is +<< <<= +>> >>> >>= >>>= +^^ ^^= +<> !<> <>= !<>= +!< !<= +!> !>= ++ += +- -= +* *= +/ /= +% %= +& &= +| |= +^ ^= +~ ~= += == +! != +< <= +> >= + +---------------------------------------------------- + +[ + ["operator", "||"], + ["operator", "&&"], + ["operator", "++"], + ["operator", "--"], + ["operator", ".."], ["operator", "..."], + ["operator", "=>"], + ["operator", "in"], ["operator", "is"], + ["operator", "!in"], ["operator", "!is"], + ["operator", "<<"], ["operator", "<<="], + ["operator", ">>"], ["operator", ">>>"], ["operator", ">>="], ["operator", ">>>="], + ["operator", "^^"], ["operator", "^^="], + ["operator", "<>"], ["operator", "!<>"], ["operator", "<>="], ["operator", "!<>="], + ["operator", "!<"], ["operator", "!<="], + ["operator", "!>"], ["operator", "!>="], + ["operator", "+"], ["operator", "+="], + ["operator", "-"], ["operator", "-="], + ["operator", "*"], ["operator", "*="], + ["operator", "/"], ["operator", "/="], + ["operator", "%"], ["operator", "%="], + ["operator", "&"], ["operator", "&="], + ["operator", "|"], ["operator", "|="], + ["operator", "^"], ["operator", "^="], + ["operator", "~"], ["operator", "~="], + ["operator", "="], ["operator", "=="], + ["operator", "!"], ["operator", "!="], + ["operator", "<"], ["operator", "<="], + ["operator", ">"], ["operator", ">="] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/property_feature.test b/docs/_style/prism-master/tests/languages/d/property_feature.test new file mode 100644 index 0000000000..9e61b06294 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/property_feature.test @@ -0,0 +1,17 @@ +@property int data() +@disable this(); + +---------------------------------------------------- + +[ + ["property", "@property"], + ["keyword", "int"], + ["function", "data"], ["punctuation", "("], ["punctuation", ")"], + ["property", "@disable"], + ["keyword", "this"], ["punctuation", "("], ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Check for properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/register_feature.test b/docs/_style/prism-master/tests/languages/d/register_feature.test new file mode 100644 index 0000000000..3eb57c6738 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/register_feature.test @@ -0,0 +1,75 @@ +AL AH AX EAX +BL BH BX EBX +CL CH CX ECX +DL DH DX EDX +BP EBP +SP ESP +DI EDI +SI ESI +ES CS SS DS GS FS +CR0 CR2 CR3 CR4 +DR0 DR1 DR2 DR3 DR6 DR7 +TR3 TR4 TR5 TR6 TR7 +ST +ST(0) ST(1) ST(2) ST(3) ST(4) ST(5) ST(6) ST(7) +MM0 MM1 MM2 MM3 MM4 MM5 MM6 MM7 +XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 + +RAX RBX RCX RDX +BPL RBP +SPL RSP +DIL RDI +SIL RSI +R8B R8W R8D R8 +R9B R9W R9D R9 +R10B R10W R10D R10 +R11B R11W R11D R11 +R12B R12W R12D R12 +R13B R13W R13D R13 +R14B R14W R14D R14 +R15B R15W R15D R15 +XMM8 XMM9 XMM10 XMM11 XMM12 XMM13 XMM14 XMM15 +YMM0 YMM1 YMM2 YMM3 YMM4 YMM5 YMM6 YMM7 +YMM8 YMM9 YMM10 YMM11 YMM12 YMM13 YMM14 YMM15 + +---------------------------------------------------- + +[ + ["register", "AL"], ["register", "AH"], ["register", "AX"], ["register", "EAX"], + ["register", "BL"], ["register", "BH"], ["register", "BX"], ["register", "EBX"], + ["register", "CL"], ["register", "CH"], ["register", "CX"], ["register", "ECX"], + ["register", "DL"], ["register", "DH"], ["register", "DX"], ["register", "EDX"], + ["register", "BP"], ["register", "EBP"], + ["register", "SP"], ["register", "ESP"], + ["register", "DI"], ["register", "EDI"], + ["register", "SI"], ["register", "ESI"], + ["register", "ES"], ["register", "CS"], ["register", "SS"], ["register", "DS"], ["register", "GS"], ["register", "FS"], + ["register", "CR0"], ["register", "CR2"], ["register", "CR3"], ["register", "CR4"], + ["register", "DR0"], ["register", "DR1"], ["register", "DR2"], ["register", "DR3"], ["register", "DR6"], ["register", "DR7"], + ["register", "TR3"], ["register", "TR4"], ["register", "TR5"], ["register", "TR6"], ["register", "TR7"], + ["register", "ST"], + ["register", "ST(0)"], ["register", "ST(1)"], ["register", "ST(2)"], ["register", "ST(3)"], ["register", "ST(4)"], ["register", "ST(5)"], ["register", "ST(6)"], ["register", "ST(7)"], + ["register", "MM0"], ["register", "MM1"], ["register", "MM2"], ["register", "MM3"], ["register", "MM4"], ["register", "MM5"], ["register", "MM6"], ["register", "MM7"], + ["register", "XMM0"], ["register", "XMM1"], ["register", "XMM2"], ["register", "XMM3"], ["register", "XMM4"], ["register", "XMM5"], ["register", "XMM6"], ["register", "XMM7"], + + ["register", "RAX"], ["register", "RBX"], ["register", "RCX"], ["register", "RDX"], + ["register", "BPL"], ["register", "RBP"], + ["register", "SPL"], ["register", "RSP"], + ["register", "DIL"], ["register", "RDI"], + ["register", "SIL"], ["register", "RSI"], + ["register", "R8B"], ["register", "R8W"], ["register", "R8D"], ["register", "R8"], + ["register", "R9B"], ["register", "R9W"], ["register", "R9D"], ["register", "R9"], + ["register", "R10B"], ["register", "R10W"], ["register", "R10D"], ["register", "R10"], + ["register", "R11B"], ["register", "R11W"], ["register", "R11D"], ["register", "R11"], + ["register", "R12B"], ["register", "R12W"], ["register", "R12D"], ["register", "R12"], + ["register", "R13B"], ["register", "R13W"], ["register", "R13D"], ["register", "R13"], + ["register", "R14B"], ["register", "R14W"], ["register", "R14D"], ["register", "R14"], + ["register", "R15B"], ["register", "R15W"], ["register", "R15D"], ["register", "R15"], + ["register", "XMM8"], ["register", "XMM9"], ["register", "XMM10"], ["register", "XMM11"], ["register", "XMM12"], ["register", "XMM13"], ["register", "XMM14"], ["register", "XMM15"], + ["register", "YMM0"], ["register", "YMM1"], ["register", "YMM2"], ["register", "YMM3"], ["register", "YMM4"], ["register", "YMM5"], ["register", "YMM6"], ["register", "YMM7"], + ["register", "YMM8"], ["register", "YMM9"], ["register", "YMM10"], ["register", "YMM11"], ["register", "YMM12"], ["register", "YMM13"], ["register", "YMM14"], ["register", "YMM15"] +] + +---------------------------------------------------- + +Checks for Iasm registers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/string_feature.test b/docs/_style/prism-master/tests/languages/d/string_feature.test new file mode 100644 index 0000000000..fc501b11d4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/string_feature.test @@ -0,0 +1,56 @@ +r"" x"" +r"fo\"o"c x"00 FBCD"w r"baz"d + +q"[fo"o +bar]" +q"(fo"o +bar)" +q"" +q"{fo"o +bar}" + +q"FOO +Bar "baz" +FOO" + +q"/fo"o +bar/" +q"|fo"o +bar|" + +'a' '\'' '\u000A' + +"" +"foo"c "bar"w "baz"d +"fo\"o +bar" +`foo` + +---------------------------------------------------- + +[ + ["string", "r\"\""], ["string", "x\"\""], + ["string", "r\"fo\\\"o\"c"], ["string", "x\"00 FBCD\"w"], ["string", "r\"baz\"d"], + + ["string", "q\"[fo\"o\r\nbar]\""], + ["string", "q\"(fo\"o\r\nbar)\""], + ["string", "q\"\""], + ["string", "q\"{fo\"o\r\nbar}\""], + + ["string", "q\"FOO\r\nBar \"baz\"\r\nFOO\""], + + ["string", "q\"/fo\"o\r\nbar/\""], + ["string", "q\"|fo\"o\r\nbar|\""], + + ["string", "'a'"], ["string", "'\\''"], ["string", "'\\u000A'"], + + ["string", "\"\""], + ["string", "\"foo\"c"], ["string", "\"bar\"w"], ["string", "\"baz\"d"], + ["string", "\"fo\\\"o\r\nbar\""], + ["string", "`foo`"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/d/token-string_feature.test b/docs/_style/prism-master/tests/languages/d/token-string_feature.test new file mode 100644 index 0000000000..01627c4a85 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/d/token-string_feature.test @@ -0,0 +1,13 @@ +q{foo} +q{ q{bar} } + +---------------------------------------------------- + +[ + ["token-string", "q{foo}"], + ["token-string", "q{ q{bar} }"] +] + +---------------------------------------------------- + +Checks for token strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/dart/keyword_feature.test b/docs/_style/prism-master/tests/languages/dart/keyword_feature.test new file mode 100644 index 0000000000..a5e3c6c2da --- /dev/null +++ b/docs/_style/prism-master/tests/languages/dart/keyword_feature.test @@ -0,0 +1,49 @@ +async* sync* yield* +abstract assert async await +break case catch +class; +const +continue default deferred +do dynamic else enum +export external +extends; +factory final finally for +get if +implements; +import +in library +new; +null +operator part rethrow return +set static super switch this +throw try typedef var +void while with yield + +---------------------------------------------------- + +[ + ["keyword", "async*"], ["keyword", "sync*"], ["keyword", "yield*"], + ["keyword", "abstract"], ["keyword", "assert"], ["keyword", "async"], ["keyword", "await"], + ["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], + ["keyword", "continue"], ["keyword", "default"], ["keyword", "deferred"], + ["keyword", "do"], ["keyword", "dynamic"], ["keyword", "else"], ["keyword", "enum"], + ["keyword", "export"], ["keyword", "external"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "factory"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], + ["keyword", "get"], ["keyword", "if"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "import"], + ["keyword", "in"], ["keyword", "library"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "null"], + ["keyword", "operator"], ["keyword", "part"], ["keyword", "rethrow"], ["keyword", "return"], + ["keyword", "set"], ["keyword", "static"], ["keyword", "super"], ["keyword", "switch"], ["keyword", "this"], + ["keyword", "throw"], ["keyword", "try"], ["keyword", "typedef"], ["keyword", "var"], + ["keyword", "void"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/dart/metadata_feature.test b/docs/_style/prism-master/tests/languages/dart/metadata_feature.test new file mode 100644 index 0000000000..e88e7ba126 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/dart/metadata_feature.test @@ -0,0 +1,20 @@ +@deprecated +@override +@todo('seth', 'make this do something') + +---------------------------------------------------- + +[ + ["metadata", "@deprecated"], + ["metadata", "@override"], + ["metadata", "@todo"], + ["punctuation", "("], + ["string", "'seth'"], + ["punctuation", ","], + ["string", "'make this do something'"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for metadata. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/dart/operator_feature.test b/docs/_style/prism-master/tests/languages/dart/operator_feature.test new file mode 100644 index 0000000000..5d631fd0bb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/dart/operator_feature.test @@ -0,0 +1,33 @@ +++ -- +* / % ~/ ++ - ! ~ +<< >> ? +& ^ | +>= > <= < +as is is! +== != && || += *= /= ~/= +%= += -= +<<= >>= +&= ^= |= + +---------------------------------------------------- + +[ + ["operator", "++"], ["operator", "--"], + ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "~/"], + ["operator", "+"], ["operator", "-"], ["operator", "!"], ["operator", "~"], + ["operator", "<<"], ["operator", ">>"], ["operator", "?"], + ["operator", "&"], ["operator", "^"], ["operator", "|"], + ["operator", ">="], ["operator", ">"], ["operator", "<="], ["operator", "<"], + ["operator", "as"], ["operator", "is"], ["operator", "is!"], + ["operator", "=="], ["operator", "!="], ["operator", "&&"], ["operator", "||"], + ["operator", "="], ["operator", "*="], ["operator", "/="], ["operator", "~/="], + ["operator", "%="], ["operator", "+="], ["operator", "-="], + ["operator", "<<="], ["operator", ">>="], + ["operator", "&="], ["operator", "^="], ["operator", "|="] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/dart/string_feature.test b/docs/_style/prism-master/tests/languages/dart/string_feature.test new file mode 100644 index 0000000000..feffdbce44 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/dart/string_feature.test @@ -0,0 +1,25 @@ +"" '' +r"" r'' +"""""" '''''' +r"""""" r'''''' +"fo\"o" 'fo\'o' +"""foo +bar""" +'''foo +bar''' + +---------------------------------------------------- + +[ + ["string", "\"\""], ["string", "''"], + ["string", "r\"\""], ["string", "r''"], + ["string", "\"\"\"\"\"\""], ["string", "''''''"], + ["string", "r\"\"\"\"\"\""], ["string", "r''''''"], + ["string", "\"fo\\\"o\""], ["string", "'fo\\'o'"], + ["string", "\"\"\"foo\r\nbar\"\"\""], ["string", "'''foo\r\nbar'''"] +] + +---------------------------------------------------- + +Checks for single quoted and double quoted strings, +multi-line strings and "raw" strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/diff/coord_feature.test b/docs/_style/prism-master/tests/languages/diff/coord_feature.test new file mode 100644 index 0000000000..c082693f25 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/diff/coord_feature.test @@ -0,0 +1,21 @@ +7c7 + +*** 4,8 **** +--- 4,8 ---- + +@@ -4,5 +4,5 @@ + +---------------------------------------------------- + +[ + ["coord", "7c7"], + + ["coord", "*** 4,8 ****"], + ["coord", "--- 4,8 ----"], + + ["coord", "@@ -4,5 +4,5 @@"] +] + +---------------------------------------------------- + +Checks for coords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/diff/diff_feature.test b/docs/_style/prism-master/tests/languages/diff/diff_feature.test new file mode 100644 index 0000000000..0e53490016 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/diff/diff_feature.test @@ -0,0 +1,21 @@ +! qt: core + +- qt: core ++ qt: core gui + +< qt: core +> qt: core quick + +---------------------------------------------------- + +[ + ["diff", "! qt: core"], + ["deleted", "- qt: core"], + ["inserted", "+ qt: core gui"], + ["deleted", "< qt: core"], + ["inserted", "> qt: core quick"] +] + +---------------------------------------------------- + +Checks for deleted, inserted and different lines. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/django/comment_feature.test b/docs/_style/prism-master/tests/languages/django/comment_feature.test new file mode 100644 index 0000000000..d41c4489f5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/django/comment_feature.test @@ -0,0 +1,16 @@ +{##} +{# This a Django template example #} +{# Multi-line +comment #} + +---------------------------------------------------- + +[ + ["comment", "{##}"], + ["comment", "{# This a Django template example #}"], + ["comment", "{# Multi-line\r\ncomment #}"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/django/property_feature.test b/docs/_style/prism-master/tests/languages/django/property_feature.test new file mode 100644 index 0000000000..adbe3c4bdd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/django/property_feature.test @@ -0,0 +1,64 @@ +{% extends "base_generic.html" %} +{% block body %} + +{{ story.headline|upper }} + +{% endblock %} + +---------------------------------------------------- + +[ + ["property", [ + "{% ", + ["keyword", "extends"], + ["string", "\"base_generic.html\""], + " %}" + ]], + ["property", [ + "{% ", + ["keyword", "block"], + ["variable", "body"], + " %}" + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "a" + ]], + ["attr-name", ["href=\""]], + ["property", [ + "{{ ", + ["variable", "story"], + ["punctuation", "."], + ["variable", "get_absolute_url"], + " }}" + ]], + ["attr-name", ["\""]], + ["punctuation", ">"] + ]], + ["property", [ + "{{ ", + ["variable", "story"], + ["punctuation", "."], + ["variable", "headline"], + ["keyword", "|"], + ["function", "upper"], + " }}" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["property", [ + "{% ", + ["keyword", "endblock"], + " %}" + ]] +] + +---------------------------------------------------- + +Checks for properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/docker/comment_feature.test b/docs/_style/prism-master/tests/languages/docker/comment_feature.test new file mode 100644 index 0000000000..054d6023d1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/docker/comment_feature.test @@ -0,0 +1,13 @@ +# +# foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/docker/keyword_feature.test b/docs/_style/prism-master/tests/languages/docker/keyword_feature.test new file mode 100644 index 0000000000..a36a7e00b6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/docker/keyword_feature.test @@ -0,0 +1,45 @@ +ONBUILD ADD . /app/src +FROM ubuntu +MAINTAINER SvenDowideit@home.org.au +RUN cd /tmp +EXPOSE 5900 +ENV myName John Doe +COPY hom* /mydir/ +VOLUME /myvol +USER daemon +WORKDIR /a +HEALTHCHECK CMD echo "foo" +LABEL version="1.0" +ENTRYPOINT ["top", "-b"] +ARG user1 +SHELL ["powershell", "-command"] +STOPSIGNAL signal + +---------------------------------------------------- + +[ + ["keyword", "ONBUILD"], ["keyword", "ADD"], " . /app/src\r\n", + ["keyword", "FROM"], " ubuntu\r\n", + ["keyword", "MAINTAINER"], " SvenDowideit@home.org.au\r\n", + ["keyword", "RUN"], " cd /tmp\r\n", + ["keyword", "EXPOSE"], " 5900\r\n", + ["keyword", "ENV"], " myName John Doe\r\n", + ["keyword", "COPY"], " hom* /mydir/\r\n", + ["keyword", "VOLUME"], " /myvol\r\n", + ["keyword", "USER"], " daemon\r\n", + ["keyword", "WORKDIR"], " /a\r\n", + ["keyword", "HEALTHCHECK"], ["keyword", "CMD"], " echo ", ["string", "\"foo\""], + ["keyword", "LABEL"], " version=", ["string", "\"1.0\""], + ["keyword", "ENTRYPOINT"], + ["punctuation", "["], ["string", "\"top\""], ["punctuation", ","], + ["string", "\"-b\""], ["punctuation", "]"], + ["keyword", "ARG"], " user1\r\n", + ["keyword", "SHELL"], + ["punctuation", "["], ["string", "\"powershell\""], ["punctuation", ","], + ["string", "\"-command\""], ["punctuation", "]"], + ["keyword", "STOPSIGNAL"], " signal" +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/docker/string_feature.test b/docs/_style/prism-master/tests/languages/docker/string_feature.test new file mode 100644 index 0000000000..e131f02136 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/docker/string_feature.test @@ -0,0 +1,23 @@ +"" +"fo\"obar" +"foo\ +bar" +'' +'fo\'obar' +'foo\ +bar' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"obar\""], + ["string", "\"foo\\\r\nbar\""], + ["string", "''"], + ["string", "'fo\\'obar'"], + ["string", "'foo\\\r\nbar'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/boolean_feature.test b/docs/_style/prism-master/tests/languages/eiffel/boolean_feature.test new file mode 100644 index 0000000000..5750be06cf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/boolean_feature.test @@ -0,0 +1,13 @@ +True +False + +---------------------------------------------------- + +[ + ["boolean", "True"], + ["boolean", "False"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/char_feature.test b/docs/_style/prism-master/tests/languages/eiffel/char_feature.test new file mode 100644 index 0000000000..6a9b1248c0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/char_feature.test @@ -0,0 +1,15 @@ +'a' +'%'' +'%/123/' + +---------------------------------------------------- + +[ + ["char", "'a'"], + ["char", "'%''"], + ["char", "'%/123/'"] +] + +---------------------------------------------------- + +Checks for chars. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/class-name_feature.test b/docs/_style/prism-master/tests/languages/eiffel/class-name_feature.test new file mode 100644 index 0000000000..a7e15a6b6c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/class-name_feature.test @@ -0,0 +1,15 @@ +A +FOO +B4D_F4C3 + +---------------------------------------------------- + +[ + ["class-name", "A"], + ["class-name", "FOO"], + ["class-name", "B4D_F4C3"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/comment_feature.test b/docs/_style/prism-master/tests/languages/eiffel/comment_feature.test new file mode 100644 index 0000000000..8a6b93e320 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/comment_feature.test @@ -0,0 +1,15 @@ +-- +-- foo bar +-- "foo" bar + +---------------------------------------------------- + +[ + ["comment", "--"], + ["comment", "-- foo bar"], + ["comment", "-- \"foo\" bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/keyword_feature.test b/docs/_style/prism-master/tests/languages/eiffel/keyword_feature.test new file mode 100644 index 0000000000..cb6ae29832 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/keyword_feature.test @@ -0,0 +1,39 @@ +across agent alias all and +attached as assign attribute +check class convert create +Current debug deferred detachable +do else elseif end ensure +expanded export external +feature from frozen if +implies inherit inspect +invariant like local loop +not note obsolete old +once or Precursor redefine +rename require rescue Result +retry select separate some +then undefine until variant +Void when xor + +---------------------------------------------------- + +[ + ["keyword", "across"], ["keyword", "agent"], ["keyword", "alias"], ["keyword", "all"], ["keyword", "and"], + ["keyword", "attached"], ["keyword", "as"], ["keyword", "assign"], ["keyword", "attribute"], + ["keyword", "check"], ["keyword", "class"], ["keyword", "convert"], ["keyword", "create"], + ["keyword", "Current"], ["keyword", "debug"], ["keyword", "deferred"], ["keyword", "detachable"], + ["keyword", "do"], ["keyword", "else"], ["keyword", "elseif"], ["keyword", "end"], ["keyword", "ensure"], + ["keyword", "expanded"], ["keyword", "export"], ["keyword", "external"], + ["keyword", "feature"], ["keyword", "from"], ["keyword", "frozen"], ["keyword", "if"], + ["keyword", "implies"], ["keyword", "inherit"], ["keyword", "inspect"], + ["keyword", "invariant"], ["keyword", "like"], ["keyword", "local"], ["keyword", "loop"], + ["keyword", "not"], ["keyword", "note"], ["keyword", "obsolete"], ["keyword", "old"], + ["keyword", "once"], ["keyword", "or"], ["keyword", "Precursor"], ["keyword", "redefine"], + ["keyword", "rename"], ["keyword", "require"], ["keyword", "rescue"], ["keyword", "Result"], + ["keyword", "retry"], ["keyword", "select"], ["keyword", "separate"], ["keyword", "some"], + ["keyword", "then"], ["keyword", "undefine"], ["keyword", "until"], ["keyword", "variant"], + ["keyword", "Void"], ["keyword", "when"], ["keyword", "xor"] +] + +---------------------------------------------------- + +Checks for all keywords \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/number_feature.test b/docs/_style/prism-master/tests/languages/eiffel/number_feature.test new file mode 100644 index 0000000000..beb3cc7c5f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/number_feature.test @@ -0,0 +1,29 @@ +0xbabe +0xBAD_A55 +0c7654_1234 +0b1111_0000_0101 +42 +42. +.42 +1_845.123_456 +3.14e+4 +4_2.5_7e-1_0 + +---------------------------------------------------- + +[ + ["number", "0xbabe"], + ["number", "0xBAD_A55"], + ["number", "0c7654_1234"], + ["number", "0b1111_0000_0101"], + ["number", "42"], + ["number", "42."], + ["number", ".42"], + ["number", "1_845.123_456"], + ["number", "3.14e+4"], + ["number", "4_2.5_7e-1_0"] +] + +---------------------------------------------------- + +Checks for hexadecimal, octal, binary and decimal numbers. diff --git a/docs/_style/prism-master/tests/languages/eiffel/operator_feature.test b/docs/_style/prism-master/tests/languages/eiffel/operator_feature.test new file mode 100644 index 0000000000..fcba4b34a2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/operator_feature.test @@ -0,0 +1,19 @@ +\\ |..| .. // +/~ / /= +< <= > >= ++ - * +^ = ~ + +---------------------------------------------------- + +[ + ["operator", "\\\\"], ["operator", "|..|"], ["operator", ".."], ["operator", "//"], + ["operator", "/~"], ["operator", "/"], ["operator", "/="], + ["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], + ["operator", "^"], ["operator", "="], ["operator", "~"] +] + +---------------------------------------------------- + +Checks for all operators \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/eiffel/string_feature.test b/docs/_style/prism-master/tests/languages/eiffel/string_feature.test new file mode 100644 index 0000000000..4b6692f8f5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/eiffel/string_feature.test @@ -0,0 +1,34 @@ +"" +"fo%"o" +"foo% +%bar" + +"[]" +"[fo"o +bar]" +"!-[fo"o[] +bar]!-" +"{}" +"{fo"o +bar}" +"*?{fo"o{} +bar}*?" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo%\"o\""], + ["string", "\"foo%\r\n%bar\""], + + ["string", "\"[]\""], + ["string", "\"[fo\"o\r\nbar]\""], + ["string", "\"!-[fo\"o[]\r\nbar]!-\""], + ["string", "\"{}\""], + ["string", "\"{fo\"o\r\nbar}\""], + ["string", "\"*?{fo\"o{}\r\nbar}*?\""] +] + +---------------------------------------------------- + +Checks for strings, multi-line strings, and aligned and non aligned verbatim strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/atom_feature.test b/docs/_style/prism-master/tests/languages/elixir/atom_feature.test new file mode 100644 index 0000000000..5b1c47d2f1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/atom_feature.test @@ -0,0 +1,15 @@ +:true +:false +:FooBar42 + +---------------------------------------------------- + +[ + ["atom", ":true"], + ["atom", ":false"], + ["atom", ":FooBar42"] +] + +---------------------------------------------------- + +Checks for atoms. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/attr-name_feature.test b/docs/_style/prism-master/tests/languages/elixir/attr-name_feature.test new file mode 100644 index 0000000000..de7cadc898 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/attr-name_feature.test @@ -0,0 +1,24 @@ +[a: 1, b: 2] +do: :this, else: :that +where: foo, +select: bar + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["attr-name", "a:"], + ["number", "1"], ["punctuation", ","], + ["attr-name", "b:"], + ["number", "2"], ["punctuation", "]"], + + ["attr-name", "do:"], ["atom", ":this"], + ["punctuation", ","], + ["attr-name", "else:"], ["atom", ":that"], + ["attr-name", "where:"], " foo", ["punctuation", ","], + ["attr-name", "select:"], " bar" +] + +---------------------------------------------------- + +Checks for keyword list keys. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/attribute_feature.test b/docs/_style/prism-master/tests/languages/elixir/attribute_feature.test new file mode 100644 index 0000000000..273c2a402f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/attribute_feature.test @@ -0,0 +1,19 @@ +@vsn 2 +@moduledoc """ +foobar +""" +@tag :external + +---------------------------------------------------- + +[ + ["attribute", "@vsn"], ["number", "2"], + ["attribute", "@moduledoc"], ["string", [ + "\"\"\"\r\nfoobar\r\n\"\"\"" + ]], + ["attribute", "@tag"], ["atom", ":external"] +] + +---------------------------------------------------- + +Checks for module attributes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/boolean_feature.test b/docs/_style/prism-master/tests/languages/elixir/boolean_feature.test new file mode 100644 index 0000000000..aa949797d2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/boolean_feature.test @@ -0,0 +1,15 @@ +true +false +nil + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"], + ["boolean", "nil"] +] + +---------------------------------------------------- + +Checks for booleans and nil. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/capture_feature.test b/docs/_style/prism-master/tests/languages/elixir/capture_feature.test new file mode 100644 index 0000000000..8a64b66154 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/capture_feature.test @@ -0,0 +1,28 @@ +fun = &Math.zero?/1 +(&is_function/1).(fun) +fun = &(&1 + 1) +&List.flatten(&1, &2) + +---------------------------------------------------- + +[ + "fun ", ["operator", "="], + ["capture", "&Math.zero?/1"], + ["punctuation", "("], + ["capture", "&is_function/1"], + ["punctuation", ")"], + ["punctuation", "."], + ["punctuation", "("], "fun", ["punctuation", ")"], + "\r\nfun ", ["operator", "="], + ["capture", "&"], + ["punctuation", "("], ["argument", "&1"], + ["operator", "+"], ["number", "1"], ["punctuation", ")"], + ["capture", "&List.flatten"], + ["punctuation", "("], ["argument", "&1"], + ["punctuation", ","], ["argument", "&2"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for function capturing and arguments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/comment_feature.test b/docs/_style/prism-master/tests/languages/elixir/comment_feature.test new file mode 100644 index 0000000000..7a7981d944 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/comment_feature.test @@ -0,0 +1,15 @@ +# +# Foobar +#{ This is a comment + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# Foobar"], + ["comment", "#{ This is a comment"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/issue1392.test b/docs/_style/prism-master/tests/languages/elixir/issue1392.test new file mode 100644 index 0000000000..c7d20a8366 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/issue1392.test @@ -0,0 +1,16 @@ +String.upcase(@fixed) + +---------------------------------------------------- + +[ + "String", + ["punctuation", "."], + "upcase", + ["punctuation", "("], + ["attribute", "@fixed"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Ensure module attributes don't consume punctuation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/issue775.test b/docs/_style/prism-master/tests/languages/elixir/issue775.test new file mode 100644 index 0000000000..d3243f80a8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/issue775.test @@ -0,0 +1,17 @@ +@doc """ +## Parameters +""" + +---------------------------------------------------- + +[ + ["attribute", "@doc"], + ["string", [ + "\"\"\"\r\n## Parameters\r\n\"\"\"" + ]] +] + +---------------------------------------------------- + +Ensures that markdown headers are not highlighted as comments inside strings. +See #775 for details. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/keyword_feature.test b/docs/_style/prism-master/tests/languages/elixir/keyword_feature.test new file mode 100644 index 0000000000..e1b02a1ae3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/keyword_feature.test @@ -0,0 +1,31 @@ +after alias and case +catch cond def +defcallback +defexception +defimpl defmodule +defp defprotocol +defstruct do else +end fn for if +import not or +require rescue try +unless use when + +---------------------------------------------------- + +[ + ["keyword", "after"], ["keyword", "alias"], ["keyword", "and"], ["keyword", "case"], + ["keyword", "catch"], ["keyword", "cond"], ["keyword", "def"], + ["keyword", "defcallback"], + ["keyword", "defexception"], + ["keyword", "defimpl"], ["keyword", "defmodule"], + ["keyword", "defp"], ["keyword", "defprotocol"], + ["keyword", "defstruct"], ["keyword", "do"], ["keyword", "else"], + ["keyword", "end"], ["keyword", "fn"], ["keyword", "for"], ["keyword", "if"], + ["keyword", "import"], ["keyword", "not"], ["keyword", "or"], + ["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"], + ["keyword", "unless"], ["keyword", "use"], ["keyword", "when"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/number_feature.test b/docs/_style/prism-master/tests/languages/elixir/number_feature.test new file mode 100644 index 0000000000..ae06684b3e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/number_feature.test @@ -0,0 +1,27 @@ +0b1111_0000 +0o754_123 +0xBadFace +42 +42_000 +3.14159 +2e6 +3.241_753E-7 +0.7e+15 + +---------------------------------------------------- + +[ + ["number", "0b1111_0000"], + ["number", "0o754_123"], + ["number", "0xBadFace"], + ["number", "42"], + ["number", "42_000"], + ["number", "3.14159"], + ["number", "2e6"], + ["number", "3.241_753E-7"], + ["number", "0.7e+15"] +] + +---------------------------------------------------- + +Checks for binary, octal, hexadecimal and decimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/operator_feature.test b/docs/_style/prism-master/tests/languages/elixir/operator_feature.test new file mode 100644 index 0000000000..c97dcce5ef --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/operator_feature.test @@ -0,0 +1,41 @@ +in +\\ +:: +.. +... ++ ++ +- -- -> +* +/ +^ +& && +| || |> +< <= <> <- +> >= +! != !== += =~ == === => + +---------------------------------------------------- + +[ + ["operator", "in"], + ["operator", "\\\\"], + ["operator", "::"], + ["operator", ".."], + ["operator", "..."], + ["operator", "+"], ["operator", "++"], + ["operator", "-"], ["operator", "--"], ["operator", "->"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "&"], ["operator", "&&"], + ["operator", "|"], ["operator", "||"], ["operator", "|>"], + ["operator", "<"], ["operator", "<="], ["operator", "<>"], ["operator", "<-"], + ["operator", ">"], ["operator", ">="], + ["operator", "!"], ["operator", "!="], ["operator", "!=="], + ["operator", "="], ["operator", "=~"], ["operator", "=="], ["operator", "==="], ["operator", "=>"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/docs/_style/prism-master/tests/languages/elixir/regex_feature.test b/docs/_style/prism-master/tests/languages/elixir/regex_feature.test new file mode 100644 index 0000000000..81eb31a651 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/regex_feature.test @@ -0,0 +1,29 @@ +~r"""foobar"""im +~R'''foobar'''ux +~r/fo\/obar/smfr +~R|fo\|obar|uismxfr +~r"fo\"obar"x +~R'fo\'obar's +~r(fo\)obar) +~R[fo\]obar] +~r{fo\}obar} +~Robar> + +---------------------------------------------------- + +[ + ["regex", "~r\"\"\"foobar\"\"\"im"], + ["regex", "~R'''foobar'''ux"], + ["regex", "~r/fo\\/obar/smfr"], + ["regex", "~R|fo\\|obar|uismxfr"], + ["regex", "~r\"fo\\\"obar\"x"], + ["regex", "~R'fo\\'obar's"], + ["regex", "~r(fo\\)obar)"], + ["regex", "~R[fo\\]obar]"], + ["regex", "~r{fo\\}obar}"], + ["regex", "~Robar>"] +] + +---------------------------------------------------- + +Checks for regexes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elixir/string_feature.test b/docs/_style/prism-master/tests/languages/elixir/string_feature.test new file mode 100644 index 0000000000..ca54f4be82 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elixir/string_feature.test @@ -0,0 +1,115 @@ +~s/foobar/ +~s/foo#{42}bar/ +~S|foobar| +~c"foobar" +~c"foo#{42}bar" +~C'foobar' +~w(foobar)c +~w(foo#{42}bar)s +~W[foobar]a +~s{foobar} +~s{foo#{42}bar} +~S + +""" +Foo bar +""" + +''' +Foo bar +''' + +~S""" +Foo bar +""" + +~c""" +Foo bar +""" + +~w""" +Foo bar +""" + +"" +"foo" +"fo\"o\ +#{42}bar" +'' +'foo' +'fo\'o\ +bar' + +---------------------------------------------------- + +[ + ["string", ["~s/foobar/"]], + ["string", [ + "~s/foo", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "bar/" + ]], + ["string", ["~S|foobar|"]], + ["string", ["~c\"foobar\""]], + ["string", [ + "~c\"foo", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "bar\"" + ]], + ["string", ["~C'foobar'"]], + ["string", ["~w(foobar)c"]], + ["string", [ + "~w(foo", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "bar)s" + ]], + ["string", ["~W[foobar]a"]], + ["string", ["~s{foobar}"]], + ["string", [ + "~s{foo", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "bar}" + ]], + ["string", ["~S"]], + + ["string", ["\"\"\"\r\nFoo bar\r\n\"\"\""]], + ["string", ["'''\r\nFoo bar\r\n'''"]], + ["string", ["~S\"\"\"\r\nFoo bar\r\n\"\"\""]], + ["string", ["~c\"\"\"\r\nFoo bar\r\n\"\"\""]], + ["string", ["~w\"\"\"\r\nFoo bar\r\n\"\"\""]], + + ["string", ["\"\""]], + ["string", ["\"foo\""]], + ["string", [ + "\"fo\\\"o\\\r\n", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "bar\"" + ]], + ["string", ["''"]], + ["string", ["'foo'"]], + ["string", ["'fo\\'o\\\r\nbar'"]] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elm/builtin_feature.test b/docs/_style/prism-master/tests/languages/elm/builtin_feature.test new file mode 100644 index 0000000000..da96c1dd6c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/builtin_feature.test @@ -0,0 +1,25 @@ +abs acos always asin atan atan2 +ceiling clamp compare cos curry +degrees e flip floor fromPolar +identity isInfinite isNaN +logBase max min negate never +not pi radians rem round sin +sqrt tan toFloat toPolar toString +truncate turns uncurry xor + +---------------------------------------------------- + +[ + ["builtin", "abs"], ["builtin", "acos"], ["builtin", "always"], ["builtin", "asin"], ["builtin", "atan"], ["builtin", "atan2"], + ["builtin", "ceiling"], ["builtin", "clamp"], ["builtin", "compare"], ["builtin", "cos"], ["builtin", "curry"], + ["builtin", "degrees"], ["builtin", "e"], ["builtin", "flip"], ["builtin", "floor"], ["builtin", "fromPolar"], + ["builtin", "identity"], ["builtin", "isInfinite"], ["builtin", "isNaN"], + ["builtin", "logBase"], ["builtin", "max"], ["builtin", "min"], ["builtin", "negate"], ["builtin", "never"], + ["builtin", "not"], ["builtin", "pi"], ["builtin", "radians"], ["builtin", "rem"], ["builtin", "round"], ["builtin", "sin"], + ["builtin", "sqrt"], ["builtin", "tan"], ["builtin", "toFloat"], ["builtin", "toPolar"], ["builtin", "toString"], + ["builtin", "truncate"], ["builtin", "turns"], ["builtin", "uncurry"], ["builtin", "xor"] +] + +---------------------------------------------------- + +Checks for all builtin. diff --git a/docs/_style/prism-master/tests/languages/elm/char_feature.test b/docs/_style/prism-master/tests/languages/elm/char_feature.test new file mode 100644 index 0000000000..c4d33fcd2a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/char_feature.test @@ -0,0 +1,19 @@ +'a' +'\'' +'\n' +'\23' +'\xFE' + +---------------------------------------------------- + +[ + ["char", "'a'"], + ["char", "'\\''"], + ["char", "'\\n'"], + ["char", "'\\23'"], + ["char", "'\\xFE'"] +] + +---------------------------------------------------- + +Checks for chars. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elm/comment_feature.test b/docs/_style/prism-master/tests/languages/elm/comment_feature.test new file mode 100644 index 0000000000..d8c8cdda20 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/comment_feature.test @@ -0,0 +1,14 @@ +-- foo +{- foo +bar -} + +---------------------------------------------------- + +[ + ["comment", "-- foo"], + ["comment", "{- foo\r\nbar -}"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elm/constant_feature.test b/docs/_style/prism-master/tests/languages/elm/constant_feature.test new file mode 100644 index 0000000000..06f25f10e5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/constant_feature.test @@ -0,0 +1,15 @@ +Foo +Foo.Bar +Baz.Foobar_42 + +---------------------------------------------------- + +[ + ["constant", "Foo"], + ["constant", "Foo.Bar"], + ["constant", "Baz.Foobar_42"] +] + +---------------------------------------------------- + +Checks for constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elm/hvariable_feature.test b/docs/_style/prism-master/tests/languages/elm/hvariable_feature.test new file mode 100644 index 0000000000..defa3ba74d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/hvariable_feature.test @@ -0,0 +1,15 @@ +foo +Foo.bar +Baz.foobar_42 + +---------------------------------------------------- + +[ + ["hvariable", "foo"], + ["hvariable", "Foo.bar"], + ["hvariable", "Baz.foobar_42"] +] + +---------------------------------------------------- + +Checks for hvariables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/elm/import_statement_feature.test b/docs/_style/prism-master/tests/languages/elm/import_statement_feature.test new file mode 100644 index 0000000000..c2940362dc --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/import_statement_feature.test @@ -0,0 +1,48 @@ +import Foo +import Foo_42.Bar as Foobar +import Foo.Bar as Foo.Baz +import List exposing (map) +import Json.Decode as Json exposing (Decoder) + +---------------------------------------------------- + +[ + ["import_statement", [ + ["keyword", "import"], + " Foo" + ]], + ["import_statement", [ + ["keyword", "import"], + " Foo_42.Bar ", + ["keyword", "as"], + " Foobar" + ]], + ["import_statement", [ + ["keyword", "import"], + " Foo.Bar ", + ["keyword", "as"], + " Foo.Baz" + ]], + ["import_statement", [ + ["keyword", "import"], + " List ", + ["keyword", "exposing"] + ]], + ["punctuation", "("], + ["hvariable", "map"], + ["punctuation", ")"], + ["import_statement", [ + ["keyword", "import"], + " Json.Decode ", + ["keyword", "as"], + " Json ", + ["keyword", "exposing"] + ]], + ["punctuation", "("], + ["constant", "Decoder"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for import statement. diff --git a/docs/_style/prism-master/tests/languages/elm/keyword_feature.test b/docs/_style/prism-master/tests/languages/elm/keyword_feature.test new file mode 100644 index 0000000000..6f1132a4ec --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/keyword_feature.test @@ -0,0 +1,19 @@ +alias as case else +exposing if in +infixl infixr let +module of then +type + +---------------------------------------------------- + +[ + ["keyword", "alias"], ["keyword", "as"], ["keyword", "case"], ["keyword", "else"], + ["keyword", "exposing"], ["keyword", "if"], ["keyword", "in"], + ["keyword", "infixl"], ["keyword", "infixr"], ["keyword", "let"], + ["keyword", "module"], ["keyword", "of"], ["keyword", "then"], + ["keyword", "type"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/docs/_style/prism-master/tests/languages/elm/number_feature.test b/docs/_style/prism-master/tests/languages/elm/number_feature.test new file mode 100644 index 0000000000..c27dae9a62 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/number_feature.test @@ -0,0 +1,21 @@ +42 +3.14159 +2E3 +1.2e-4 +0.9e+1 +0xBadFace + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "2E3"], + ["number", "1.2e-4"], + ["number", "0.9e+1"], + ["number", "0xBadFace"] +] + +---------------------------------------------------- + +Checks for decimal and hexadecimal numbers. diff --git a/docs/_style/prism-master/tests/languages/elm/operator_feature.test b/docs/_style/prism-master/tests/languages/elm/operator_feature.test new file mode 100644 index 0000000000..ce120ec62a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/operator_feature.test @@ -0,0 +1,33 @@ +.. +reverse . sort ++ - * / +^ ^^ ** +&& || +< <= == /= +>= > | +++ : !! +<- -> += :: => +>> >>= >@> +~ ! @ + +---------------------------------------------------- + +[ + ["operator", ".."], + ["hvariable", "reverse"], ["operator", " . "], ["hvariable", "sort"], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "^"], ["operator", "^^"], ["operator", "**"], + ["operator", "&&"], ["operator", "||"], + ["operator", "<"], ["operator", "<="], ["operator", "=="], ["operator", "/="], + ["operator", ">="], ["operator", ">"], ["operator", "|"], + ["operator", "++"], ["operator", ":"], ["operator", "!!"], + ["operator", "<-"], ["operator", "->"], + ["operator", "="], ["operator", "::"], ["operator", "=>"], + ["operator", ">>"], ["operator", ">>="], ["operator", ">@>"], + ["operator", "~"], ["operator", "!"], ["operator", "@"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/docs/_style/prism-master/tests/languages/elm/string_feature.test b/docs/_style/prism-master/tests/languages/elm/string_feature.test new file mode 100644 index 0000000000..6b5ea8ddd9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/elm/string_feature.test @@ -0,0 +1,21 @@ +"" +"regular string" +"fo\"o" +"""foo + bar""" +"""foo -- comment + bar""" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"regular string\""], + ["string", "\"fo\\\"o\""], + ["string", "\"\"\"foo\r\n bar\"\"\""], + ["string", "\"\"\"foo -- comment\r\n bar\"\"\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erb/erb_feature.test b/docs/_style/prism-master/tests/languages/erb/erb_feature.test new file mode 100644 index 0000000000..cb86983d17 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erb/erb_feature.test @@ -0,0 +1,36 @@ +<%# comment %> +<%= render @products || "empty_list" %> +<% @books.each do |book| %> + +---------------------------------------------------- + +[ + ["erb", [ + ["delimiter", "<%"], + ["comment", "# comment "], + ["delimiter", "%>"] + ]], + ["erb", [ + ["delimiter", "<%="], + " render ", + ["variable", "@products"], + ["operator", "||"], + ["string", ["\"empty_list\""]], + ["delimiter", "%>"] + ]], + ["erb", [ + ["delimiter", "<%"], + ["variable", "@books"], + ["punctuation", "."], + ["keyword", "each"], + ["keyword", "do"], + ["operator", "|"], + "book", + ["operator", "|"], + ["delimiter", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for ERB tags. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erb/erb_in_markup_feature.test b/docs/_style/prism-master/tests/languages/erb/erb_in_markup_feature.test new file mode 100644 index 0000000000..20719ea8c6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erb/erb_in_markup_feature.test @@ -0,0 +1,48 @@ +
    +___ERB1___<%= 1 %>___ERB2___<%= 2 %> + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["attr-name", ["class"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ["erb", [ + ["delimiter", "<%="], + ["builtin", "Time"], + ["punctuation", "."], + "now", + ["punctuation", "."], + "strftime", + ["punctuation", "("], + ["string", ["'%A'"]], + ["punctuation", ")"], + ["delimiter", "%>"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "\r\n___ERB1___", + ["erb", [ + ["delimiter", "<%="], + ["number", "1"], + ["delimiter", "%>"] + ]], + "___ERB2___", + ["erb", [ + ["delimiter", "<%="], + ["number", "2"], + ["delimiter", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for ERB inside Markup diff --git a/docs/_style/prism-master/tests/languages/erlang/atom_feature.test b/docs/_style/prism-master/tests/languages/erlang/atom_feature.test new file mode 100644 index 0000000000..1761a8bb91 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/atom_feature.test @@ -0,0 +1,17 @@ +foo +foo@_bar +'foo bar' +'\'\\' + +---------------------------------------------------- + +[ + ["atom", "foo"], + ["atom", "foo@_bar"], + ["quoted-atom", "'foo bar'"], + ["quoted-atom", "'\\'\\\\'"] +] + +---------------------------------------------------- + +Checks for atoms and quoted atoms. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/boolean_feature.test b/docs/_style/prism-master/tests/languages/erlang/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/comment_feature.test b/docs/_style/prism-master/tests/languages/erlang/comment_feature.test new file mode 100644 index 0000000000..b879c5e5d5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/comment_feature.test @@ -0,0 +1,11 @@ +% foo bar + +---------------------------------------------------- + +[ + ["comment", "% foo bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/function_feature.test b/docs/_style/prism-master/tests/languages/erlang/function_feature.test new file mode 100644 index 0000000000..72d8857d15 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/function_feature.test @@ -0,0 +1,17 @@ +spawn( +foo@_bar( +'foo bar'( +'\'\\'( + +---------------------------------------------------- + +[ + ["function", "spawn"], ["punctuation", "("], + ["function", "foo@_bar"], ["punctuation", "("], + ["quoted-function", "'foo bar'"], ["punctuation", "("], + ["quoted-function", "'\\'\\\\'"], ["punctuation", "("] +] + +---------------------------------------------------- + +Checks for functions and quoted functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/keyword_feature.test b/docs/_style/prism-master/tests/languages/erlang/keyword_feature.test new file mode 100644 index 0000000000..3af1da3d39 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/keyword_feature.test @@ -0,0 +1,15 @@ +fun when case of +end if receive +after try catch + +---------------------------------------------------- + +[ + ["keyword", "fun"], ["keyword", "when"], ["keyword", "case"], ["keyword", "of"], + ["keyword", "end"], ["keyword", "if"], ["keyword", "receive"], + ["keyword", "after"], ["keyword", "try"], ["keyword", "catch"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/number_feature.test b/docs/_style/prism-master/tests/languages/erlang/number_feature.test new file mode 100644 index 0000000000..0e5890f3fa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/number_feature.test @@ -0,0 +1,25 @@ +42 +2#101 +16#1f +2.3 +2.3e3 +2.3e-3 +$A +$\n + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "2#101"], + ["number", "16#1f"], + ["number", "2.3"], + ["number", "2.3e3"], + ["number", "2.3e-3"], + ["number", "$A"], + ["number", "$\\n"] +] + +---------------------------------------------------- + +Checks for numbers and character codes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/operator_feature.test b/docs/_style/prism-master/tests/languages/erlang/operator_feature.test new file mode 100644 index 0000000000..addd5d3dd3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/operator_feature.test @@ -0,0 +1,27 @@ +== /= >= := +=:= =/= ++ ++ - -- += * / ! +<= < > +bnot div rem band +bor bxor bsl bsr +not and or xor +orelse andalso + +---------------------------------------------------- + +[ + ["operator", "=="], ["operator", "/="], ["operator", ">="], ["operator", ":="], + ["operator", "=:="], ["operator", "=/="], + ["operator", "+"], ["operator", "++"], ["operator", "-"], ["operator", "--"], + ["operator", "="], ["operator", "*"], ["operator", "/"], ["operator", "!"], + ["operator", "<="], ["operator", "<"], ["operator", ">"], + ["operator", "bnot"], ["operator", "div"], ["operator", "rem"], ["operator", "band"], + ["operator", "bor"], ["operator", "bxor"], ["operator", "bsl"], ["operator", "bsr"], + ["operator", "not"], ["operator", "and"], ["operator", "or"], ["operator", "xor"], + ["operator", "orelse"], ["operator", "andalso"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/string_feature.test b/docs/_style/prism-master/tests/languages/erlang/string_feature.test new file mode 100644 index 0000000000..42770f6156 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/string_feature.test @@ -0,0 +1,13 @@ +"" +"foo bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/erlang/variable_feature.test b/docs/_style/prism-master/tests/languages/erlang/variable_feature.test new file mode 100644 index 0000000000..f7492e4479 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/erlang/variable_feature.test @@ -0,0 +1,17 @@ +Foo +?Bar +_ +Foo@_bar + +---------------------------------------------------- + +[ + ["variable", "Foo"], + ["variable", "?Bar"], + ["variable", "_"], + ["variable", "Foo@_bar"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/flow/flow-punctuation_feature.test b/docs/_style/prism-master/tests/languages/flow/flow-punctuation_feature.test new file mode 100644 index 0000000000..ba0c900515 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/flow/flow-punctuation_feature.test @@ -0,0 +1,12 @@ +{| foo : string |} + +---------------------------------------------------- + +[ + ["flow-punctuation", "{|"], " foo ", ["punctuation", ":"], + ["type", "string"], ["flow-punctuation", "|}"] +] + +---------------------------------------------------- + +Checks for Flow specific punctuation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/flow/function-variable_feature.test b/docs/_style/prism-master/tests/languages/flow/function-variable_feature.test new file mode 100644 index 0000000000..cda25c97bf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/flow/function-variable_feature.test @@ -0,0 +1,20 @@ +foo = (a: number) : number => {} +bar = () : string => {} + +---------------------------------------------------- + +[ + ["function-variable", "foo"], ["operator", "="], + ["punctuation", "("], "a", ["punctuation", ":"], + ["type", "number"], ["punctuation", ")"], + ["punctuation", ":"], ["type", "number"], + ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"], + ["function-variable", "bar"], ["operator", "="], + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", ":"], ["type", "string"], + ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for function variables containing types. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/flow/keyword_feature.test b/docs/_style/prism-master/tests/languages/flow/keyword_feature.test new file mode 100644 index 0000000000..fc1ca2accb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/flow/keyword_feature.test @@ -0,0 +1,39 @@ +type +opaque +declare +Class +$await +$Diff +$Exact +$Keys +$ObjMap +$PropertyType +$Shape +$Record +$Supertype +$Subtype +$Enum + +---------------------------------------------------- + +[ + ["keyword", "type"], + ["keyword", "opaque"], + ["keyword", "declare"], + ["keyword", "Class"], + ["keyword", "$await"], + ["keyword", "$Diff"], + ["keyword", "$Exact"], + ["keyword", "$Keys"], + ["keyword", "$ObjMap"], + ["keyword", "$PropertyType"], + ["keyword", "$Shape"], + ["keyword", "$Record"], + ["keyword", "$Supertype"], + ["keyword", "$Subtype"], + ["keyword", "$Enum"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/flow/type_feature.test b/docs/_style/prism-master/tests/languages/flow/type_feature.test new file mode 100644 index 0000000000..53827c351a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/flow/type_feature.test @@ -0,0 +1,31 @@ +Number +number +String +string +Boolean +boolean +Function +any +mixed +null +void + +---------------------------------------------------- + +[ + ["type", "Number"], + ["type", "number"], + ["type", "String"], + ["type", "string"], + ["type", "Boolean"], + ["type", "boolean"], + ["type", "Function"], + ["type", "any"], + ["type", "mixed"], + ["type", "null"], + ["type", "void"] +] + +---------------------------------------------------- + +Checks for types. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran+pure/fortran_inclusion.test b/docs/_style/prism-master/tests/languages/fortran+pure/fortran_inclusion.test new file mode 100644 index 0000000000..176cad9ecf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran+pure/fortran_inclusion.test @@ -0,0 +1,18 @@ +%< -*- Fortran90 -*- +21_SHORT +%> + +---------------------------------------------------- + +[ + ["inline-lang-fortran", [ + ["delimiter", "%< "], + ["lang", "-*- Fortran90 -*-"], + ["number", "21_SHORT"], + ["delimiter", "%>"] + ]] +] + +---------------------------------------------------- + +Checks for Fortran in Pure. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/boolean_feature.test b/docs/_style/prism-master/tests/languages/fortran/boolean_feature.test new file mode 100644 index 0000000000..88bdb6bd10 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/boolean_feature.test @@ -0,0 +1,13 @@ +.TRUE. +.false. + +---------------------------------------------------- + +[ + ["boolean", ".TRUE."], + ["boolean", ".false."] +] + +---------------------------------------------------- + +Checks for boolean. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/comment_feature.test b/docs/_style/prism-master/tests/languages/fortran/comment_feature.test new file mode 100644 index 0000000000..51b66e8893 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/comment_feature.test @@ -0,0 +1,15 @@ +! +! foobar +! This "string" should not be highlighted + +---------------------------------------------------- + +[ + ["comment", "!"], + ["comment", "! foobar"], + ["comment", "! This \"string\" should not be highlighted"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/keyword_feature.test b/docs/_style/prism-master/tests/languages/fortran/keyword_feature.test new file mode 100644 index 0000000000..e3bb493bbe --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/keyword_feature.test @@ -0,0 +1,199 @@ +INTEGER +REAL +DOUBLE PRECISION +DOUBLEPRECISION +COMPLEX +CHARACTER +LOGICAL + +ALLOCATABLE +ALLOCATE +BACKSPACE +CALL +CASE +CLOSE +COMMON +CONTAINS +CONTINUE +CYCLE +DATA +DEALLOCATE +DIMENSION +DO +END +EQUIVALENCE +EXIT +EXTERNAL +FORMAT +GO TO +GOTO +IMPLICIT +IMPLICIT NONE +INQUIRE +INTENT +INTRINSIC +MODULE PROCEDURE +NAMELIST +NULLIFY +OPEN +OPTIONAL +PARAMETER +POINTER +PRINT +PRIVATE +PUBLIC +READ +RETURN +REWIND +SAVE +SELECT +STOP +TARGET +WHILE +WRITE + +BLOCK DATA +BLOCKDATA +END BLOCK DATA +ENDBLOCKDATA +DO +ENDDO +FILE +FORALL +FUNCTION +IF +END IF +INTERFACE +MODULE +PROGRAM +SELECT +SUBROUTINE +TYPE +WHERE + +ASSIGNMENT +DEFAULT +ELEMENTAL +ELSE +ELSEWHERE +ELSEIF +ENTRY +IN +INCLUDE +INOUT +KIND +NULL +ONLY +OPERATOR +OUT +PURE +RECURSIVE +RESULT +SEQUENCE +STAT +THEN +USE + +---------------------------------------------------- + +[ + ["keyword", "INTEGER"], + ["keyword", "REAL"], + ["keyword", "DOUBLE PRECISION"], + ["keyword", "DOUBLEPRECISION"], + ["keyword", "COMPLEX"], + ["keyword", "CHARACTER"], + ["keyword", "LOGICAL"], + + ["keyword", "ALLOCATABLE"], + ["keyword", "ALLOCATE"], + ["keyword", "BACKSPACE"], + ["keyword", "CALL"], + ["keyword", "CASE"], + ["keyword", "CLOSE"], + ["keyword", "COMMON"], + ["keyword", "CONTAINS"], + ["keyword", "CONTINUE"], + ["keyword", "CYCLE"], + ["keyword", "DATA"], + ["keyword", "DEALLOCATE"], + ["keyword", "DIMENSION"], + ["keyword", "DO"], + ["keyword", "END"], + ["keyword", "EQUIVALENCE"], + ["keyword", "EXIT"], + ["keyword", "EXTERNAL"], + ["keyword", "FORMAT"], + ["keyword", "GO TO"], + ["keyword", "GOTO"], + ["keyword", "IMPLICIT"], + ["keyword", "IMPLICIT NONE"], + ["keyword", "INQUIRE"], + ["keyword", "INTENT"], + ["keyword", "INTRINSIC"], + ["keyword", "MODULE PROCEDURE"], + ["keyword", "NAMELIST"], + ["keyword", "NULLIFY"], + ["keyword", "OPEN"], + ["keyword", "OPTIONAL"], + ["keyword", "PARAMETER"], + ["keyword", "POINTER"], + ["keyword", "PRINT"], + ["keyword", "PRIVATE"], + ["keyword", "PUBLIC"], + ["keyword", "READ"], + ["keyword", "RETURN"], + ["keyword", "REWIND"], + ["keyword", "SAVE"], + ["keyword", "SELECT"], + ["keyword", "STOP"], + ["keyword", "TARGET"], + ["keyword", "WHILE"], + ["keyword", "WRITE"], + + ["keyword", "BLOCK DATA"], + ["keyword", "BLOCKDATA"], + ["keyword", "END BLOCK DATA"], + ["keyword", "ENDBLOCKDATA"], + ["keyword", "DO"], + ["keyword", "ENDDO"], + ["keyword", "FILE"], + ["keyword", "FORALL"], + ["keyword", "FUNCTION"], + ["keyword", "IF"], + ["keyword", "END IF"], + ["keyword", "INTERFACE"], + ["keyword", "MODULE"], + ["keyword", "PROGRAM"], + ["keyword", "SELECT"], + ["keyword", "SUBROUTINE"], + ["keyword", "TYPE"], + ["keyword", "WHERE"], + + ["keyword", "ASSIGNMENT"], + ["keyword", "DEFAULT"], + ["keyword", "ELEMENTAL"], + ["keyword", "ELSE"], + ["keyword", "ELSEWHERE"], + ["keyword", "ELSEIF"], + ["keyword", "ENTRY"], + ["keyword", "IN"], + ["keyword", "INCLUDE"], + ["keyword", "INOUT"], + ["keyword", "KIND"], + ["keyword", "NULL"], + ["keyword", "ONLY"], + ["keyword", "OPERATOR"], + ["keyword", "OUT"], + ["keyword", "PURE"], + ["keyword", "RECURSIVE"], + ["keyword", "RESULT"], + ["keyword", "SEQUENCE"], + ["keyword", "STAT"], + ["keyword", "THEN"], + ["keyword", "USE"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/number_feature.test b/docs/_style/prism-master/tests/languages/fortran/number_feature.test new file mode 100644 index 0000000000..c7b4a4cf3c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/number_feature.test @@ -0,0 +1,37 @@ +473 +21_2 +21_SHORT +1976354279568241_8 +1.6E3 +0.45E-4 +10.93E7_QUAD +3E4 +B'01110' +B"010" +O'047' +O"642" +Z'F41A' +Z"00BC" + +---------------------------------------------------- + +[ + ["number", "473"], + ["number", "21_2"], + ["number", "21_SHORT"], + ["number", "1976354279568241_8"], + ["number", "1.6E3"], + ["number", "0.45E-4"], + ["number", "10.93E7_QUAD"], + ["number", "3E4"], + ["quoted-number", "B'01110'"], + ["quoted-number", "B\"010\""], + ["quoted-number", "O'047'"], + ["quoted-number", "O\"642\""], + ["quoted-number", "Z'F41A'"], + ["quoted-number", "Z\"00BC\""] +] + +---------------------------------------------------- + +Checks for numbers and quoted numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/operator_feature.test b/docs/_style/prism-master/tests/languages/fortran/operator_feature.test new file mode 100644 index 0000000000..d2d3003fab --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/operator_feature.test @@ -0,0 +1,25 @@ +** // => +== /= :: +< <= > >= ++ - * / = % +.EQ. .NE. .LT. .LE. +.GT. .GE. .NOT. .AND. +.OR. .EQV. .NEQV. +.foobar. + +---------------------------------------------------- + +[ + ["operator", "**"], ["operator", "//"], ["operator", "=>"], + ["operator", "=="], ["operator", "/="], ["operator", "::"], + ["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "="], ["operator", "%"], + ["operator", ".EQ."], ["operator", ".NE."], ["operator", ".LT."], ["operator", ".LE."], + ["operator", ".GT."], ["operator", ".GE."], ["operator", ".NOT."], ["operator", ".AND."], + ["operator", ".OR."], ["operator", ".EQV."], ["operator", ".NEQV."], + ["operator", ".foobar."] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fortran/string_feature.test b/docs/_style/prism-master/tests/languages/fortran/string_feature.test new file mode 100644 index 0000000000..3fa6f74aa2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fortran/string_feature.test @@ -0,0 +1,31 @@ +"" +'' +"foo ""bar"" baz" +'foo ''bar'' baz' +ITALICS_'foobar' +"foo & + &bar" +"foo & + ! Comment + &bar" + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["''"]], + ["string", ["\"foo \"\"bar\"\" baz\""]], + ["string", ["'foo ''bar'' baz'"]], + ["string", ["ITALICS_'foobar'"]], + ["string", ["\"foo &\r\n\t&bar\""]], + ["string", [ + "\"foo &\r\n\t", + ["comment", "! Comment"], + "\r\n\t&bar\"" + ]] +] + +---------------------------------------------------- + +Checks for strings and line continuation. +Also checks for comments inside strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fsharp/annotation_feature.test b/docs/_style/prism-master/tests/languages/fsharp/annotation_feature.test new file mode 100644 index 0000000000..3445236d0d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/annotation_feature.test @@ -0,0 +1,35 @@ +[] +[] + +---------------------------------------------------- + +[ + ["annotation", [ + ["punctuation", "[<"], + ["class-name", "Foo"], + ["punctuation", ">]"] + ]], + ["annotation", [ + ["punctuation", "[<"], + ["class-name", "Bar"], + ["annotation-content", [ + ["punctuation", "("], + ["string", "\"bar\""], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + ["class-name", "Foo"], + ["annotation-content", [ + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"] + ]], + ["punctuation", ">]"] + ]] +] + +---------------------------------------------------- + +Checks for annotations. diff --git a/docs/_style/prism-master/tests/languages/fsharp/class-name_feature.test b/docs/_style/prism-master/tests/languages/fsharp/class-name_feature.test new file mode 100644 index 0000000000..7939964246 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/class-name_feature.test @@ -0,0 +1,86 @@ +let func : HttpFunc = handler (Some >> Task.FromResult) + +type Base1() = + abstract member F : unit -> unit + default u.F() = + printfn "F Base1" + +type Derived1() = + inherit Base1() + override u.F() = + printfn "F Derived1" + +let d1 : Derived1 = Derived1() + +let base1 = d1 :> Base1 +let derived1 = base1 :?> Derived1 + +type PersonName = + | FirstOnly of string + | LastOnly of string + | FirstLast of string * string + +type Shape = + | Rectangle of height : float * width : float + | Circle of radius : float + +type MyInterface = + abstract member Add: int -> int -> int + abstract member Pi : float + +exception Error1 of string +exception Error2 of string * int + +---------------------------------------------------- + +[ + ["keyword", "let"], " func ", + ["punctuation", ":"], ["class-name", ["HttpFunc"]], + ["operator", "="], " handler ", ["punctuation", "("], + "Some ", ["operator", ">>"], " Task", ["punctuation", "."], "FromResult", + ["punctuation", ")"], + + ["keyword", "type"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + ["keyword", "abstract"], ["keyword", "member"], " F ", ["punctuation", ":"], + ["class-name", [ + "unit ", ["operator", "->"], " unit"] + ], + ["keyword", "default"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], + ["operator", "="], "\n printfn ", ["string", "\"F Base1\""], + + ["keyword", "type"], ["class-name", ["Derived1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + ["keyword", "inherit"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], + ["keyword", "override"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + "\n printfn ", ["string", "\"F Derived1\""], + + ["keyword", "let"], " d1 ", ["punctuation", ":"], ["class-name", ["Derived1"]], ["operator", "="], + ["function", "Derived1"], ["punctuation", "("], ["punctuation", ")"], + + ["keyword", "let"], " base1 ", ["operator", "="], " d1 ", ["operator", ":>"], ["class-name", ["Base1"]], + + ["keyword", "let"], " derived1 ", ["operator", "="], " base1 ", ["operator", ":?>"], ["class-name", ["Derived1"]], + + ["keyword", "type"], ["class-name", ["PersonName"]], ["operator", "="], + ["operator", "|"], " FirstOnly ", ["keyword", "of"], ["class-name", ["string"]], + ["operator", "|"], " LastOnly ", ["keyword", "of"], ["class-name", ["string"]], + ["operator", "|"], " FirstLast ", ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " string"]], + + ["keyword", "type"], ["class-name", ["Shape"]], ["operator", "="], + ["operator", "|"], " Rectangle ", ["keyword", "of"], + " height ", ["punctuation", ":"], ["class-name", ["float"]], ["operator", "*"], + " width ", ["punctuation", ":"], ["class-name", ["float"]], + ["operator", "|"], " Circle ", ["keyword", "of"], " radius ", ["punctuation", ":"], ["class-name", ["float"]], + + ["keyword", "type"], ["class-name", ["MyInterface"]], ["operator", "="], + ["keyword", "abstract"], ["keyword", "member"], " Add", ["punctuation", ":"], + ["class-name", ["int ", ["operator", "->"], " int ", ["operator", "->"], " int"]], + ["keyword", "abstract"], ["keyword", "member"], " Pi ", ["punctuation", ":"], ["class-name", ["float"]], + + ["keyword", "exception"], ["class-name", ["Error1"]], ["keyword", "of"], ["class-name", ["string"]], + + ["keyword", "exception"], ["class-name", ["Error2"]], ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " int"]] +] + +---------------------------------------------------- + +Checks for class-names. diff --git a/docs/_style/prism-master/tests/languages/fsharp/comment_feature.test b/docs/_style/prism-master/tests/languages/fsharp/comment_feature.test new file mode 100644 index 0000000000..ff9170b6b8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/comment_feature.test @@ -0,0 +1,16 @@ +// foobar +(**) +(* foo +bar *) + +---------------------------------------------------- + +[ + ["comment", "// foobar"], + ["comment", "(**)"], + ["comment", "(* foo\r\nbar *)"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fsharp/computation-expression_feature.test b/docs/_style/prism-master/tests/languages/fsharp/computation-expression_feature.test new file mode 100644 index 0000000000..a49c6e3535 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/computation-expression_feature.test @@ -0,0 +1,17 @@ +async {} +task {} +seq {} +foo {} + +---------------------------------------------------- + +[ + ["computation-expression", "async"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "task"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "seq"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "foo"], ["punctuation", "{"], ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for computation expressions. diff --git a/docs/_style/prism-master/tests/languages/fsharp/issue1480.test b/docs/_style/prism-master/tests/languages/fsharp/issue1480.test new file mode 100644 index 0000000000..2c692a33df --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/issue1480.test @@ -0,0 +1,36 @@ +let foo' = failWith "foo" + +let bar' = failWith "bar" + +let map (f: 'a -> 'b) (xs: 'a list): 'b list = failWith "not implemented" + +---------------------------------------------------- + +[ + ["keyword", "let"], " foo' ", ["operator", "="], " failWith ", ["string", "\"foo\""], + ["keyword", "let"], " bar' ", ["operator", "="], " failWith ", ["string", "\"bar\""], + + ["keyword", "let"], + " map ", + ["punctuation", "("], + "f", + ["punctuation", ":"], + " 'a ", + ["operator", "->"], + " 'b", + ["punctuation", ")"], + ["punctuation", "("], + "xs", + ["punctuation", ":"], + " 'a list", + ["punctuation", ")"], + ["punctuation", ":"], + " 'b list ", + ["operator", "="], + " failWith ", + ["string", "\"not implemented\""] +] + +---------------------------------------------------- + +Checks for apostrophes in names. See #1480. diff --git a/docs/_style/prism-master/tests/languages/fsharp/keyword_feature.test b/docs/_style/prism-master/tests/languages/fsharp/keyword_feature.test new file mode 100644 index 0000000000..17f058a5e3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/keyword_feature.test @@ -0,0 +1,73 @@ +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 let +let! match member module +mutable namespace +new; +not +null of; open or override +private public rec return +return! select static struct +then to true try type; +upcast use use! val void +when while with yield +yield! 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 + +---------------------------------------------------- + +[ + ["keyword", "abstract"], ["keyword", "and"], ["keyword", "as"], ["keyword", "assert"], + ["keyword", "base"], ["keyword", "begin"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "default"], + ["keyword", "delegate"], ["keyword", "do"], ["keyword", "done"], ["keyword", "downcast"], + ["keyword", "downto"], ["keyword", "elif"], ["keyword", "else"], ["keyword", "end"], + ["keyword", "exception"], ["punctuation", ";"], + ["keyword", "extern"], ["keyword", "false"], ["keyword", "finally"], + ["keyword", "for"], ["keyword", "fun"], ["keyword", "function"], ["keyword", "global"], + ["keyword", "if"], ["keyword", "in"], ["keyword", "inherit"], ["punctuation", ";"], ["keyword", "inline"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "internal"], ["keyword", "lazy"], ["keyword", "let"], + ["keyword", "let!"], ["keyword", "match"], ["keyword", "member"], ["keyword", "module"], + ["keyword", "mutable"], ["keyword", "namespace"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "not"], + ["keyword", "null"], ["keyword", "of"], ["punctuation", ";"], ["keyword", "open"], ["keyword", "or"], ["keyword", "override"], + ["keyword", "private"], ["keyword", "public"], ["keyword", "rec"], ["keyword", "return"], + ["keyword", "return!"], ["keyword", "select"], ["keyword", "static"], ["keyword", "struct"], + ["keyword", "then"], ["keyword", "to"], ["keyword", "true"], ["keyword", "try"], ["keyword", "type"], ["punctuation", ";"], + ["keyword", "upcast"], ["keyword", "use"], ["keyword", "use!"], ["keyword", "val"], ["keyword", "void"], + ["keyword", "when"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"], + ["keyword", "yield!"], ["keyword", "asr"], ["keyword", "land"], ["keyword", "lor"], ["keyword", "lsl"], + ["keyword", "lsr"], ["keyword", "lxor"], ["keyword", "mod"], ["keyword", "sig"], ["keyword", "atomic"], + ["keyword", "break"], ["keyword", "checked"], ["keyword", "component"], + ["keyword", "const"], ["keyword", "constraint"], ["keyword", "constructor"], + ["keyword", "continue"], ["keyword", "eager"], ["keyword", "event"], ["keyword", "external"], + ["keyword", "fixed"], ["keyword", "functor"], ["keyword", "include"], ["keyword", "method"], + ["keyword", "mixin"], ["keyword", "object"], ["keyword", "parallel"], ["keyword", "process"], + ["keyword", "protected"], ["keyword", "pure"], ["keyword", "sealed"], ["keyword", "tailcall"], + ["keyword", "trait"], ["punctuation", ";"], + ["keyword", "virtual"], ["keyword", "volatile"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/docs/_style/prism-master/tests/languages/fsharp/number_feature.test b/docs/_style/prism-master/tests/languages/fsharp/number_feature.test new file mode 100644 index 0000000000..f2f86ed288 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/number_feature.test @@ -0,0 +1,65 @@ +0xbabe +0xBABEun +0xflf +0xfLF + +0b1001 +0b1001y +0b1001uy + +42 +1.5 +2.3E+32 +2.3e-32 +4.14F +4.14f +0.7833M +0.7833m + +86y +86uy +86s +86us +86l +86u +86ul +86L +86UL +9999999999999999999999999999I + +---------------------------------------------------- + +[ + ["number", "0xbabe"], + ["number", "0xBABEun"], + ["number", "0xflf"], + ["number", "0xfLF"], + + ["number", "0b1001"], + ["number", "0b1001y"], + ["number", "0b1001uy"], + + ["number", "42"], + ["number", "1.5"], + ["number", "2.3E+32"], + ["number", "2.3e-32"], + ["number", "4.14F"], + ["number", "4.14f"], + ["number", "0.7833M"], + ["number", "0.7833m"], + + ["number", "86y"], + ["number", "86uy"], + ["number", "86s"], + ["number", "86us"], + ["number", "86l"], + ["number", "86u"], + ["number", "86ul"], + ["number", "86L"], + ["number", "86UL"], + ["number", "9999999999999999999999999999I"] +] + +---------------------------------------------------- + +Checks for decimal, hexadecimal and binary numbers, with all possible suffixes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fsharp/operator_feature.test b/docs/_style/prism-master/tests/languages/fsharp/operator_feature.test new file mode 100644 index 0000000000..7e15afc40d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/operator_feature.test @@ -0,0 +1,53 @@ + >= <= <> > < = + - * / % + >=? <=? <>? >? =? ?<=? ?<>? ?>? ?= ?<= ?<> ?> ?< ?= ?+ ?- ?* ?/ ?% + +** + +<- -> +.. +:: +:= +:> :? :?> +<< >> +<<< >>> ~~~ ^^^ &&& ||| +| || +<| <|| <||| +|> ||> |||> +~~ ~- ~+ + +? ^ ! +!= == +& && + +---------------------------------------------------- + +[ + ["operator", ">="], ["operator", "<="], ["operator", "<>"], ["operator", ">"], ["operator", "<"], ["operator", "="], ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "%"], + ["operator", ">=?"], ["operator", "<=?"], ["operator", "<>?"], ["operator", ">?"], ["operator", "=?"], ["operator", "?<=?"], ["operator", "?<>?"], ["operator", "?>?"], ["operator", "?="], ["operator", "?<="], ["operator", "?<>"], ["operator", "?>"], ["operator", "?<"], ["operator", "?="], ["operator", "?+"], ["operator", "?-"], ["operator", "?*"], ["operator", "?/"], ["operator", "?%"], + + ["operator", "**"], + + ["operator", "<-"], ["operator", "->"], + ["operator", ".."], + ["operator", "::"], + ["operator", ":="], + ["operator", ":>"], ["operator", ":?"], ["operator", ":?>"], + ["operator", "<<"], ["operator", ">>"], + ["operator", "<<<"], ["operator", ">>>"], ["operator", "~~~"], ["operator", "^^^"], ["operator", "&&&"], ["operator", "|||"], + ["operator", "|"], ["operator", "||"], + ["operator", "<|"], ["operator", "<||"], ["operator", "<|||"], + ["operator", "|>"], ["operator", "||>"], ["operator", "|||>"], + ["operator", "~~"], ["operator", "~-"], ["operator", "~+"], + + ["operator", "?"], ["operator", "^"], ["operator", "!"], + ["operator", "!="], ["operator", "=="], + ["operator", "&"], ["operator", "&&"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/docs/_style/prism-master/tests/languages/fsharp/preprocessor_feature.test b/docs/_style/prism-master/tests/languages/fsharp/preprocessor_feature.test new file mode 100644 index 0000000000..4ee06395f4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/preprocessor_feature.test @@ -0,0 +1,22 @@ +#if foo +#else +#endif + +#light +#line +#nowarn + +---------------------------------------------------- + +[ + ["preprocessor", ["#", ["directive", "if"], " foo"]], + ["preprocessor", ["#", ["directive", "else"]]], + ["preprocessor", ["#", ["directive", "endif"]]], + ["preprocessor", ["#", ["directive", "light"]]], + ["preprocessor", ["#", ["directive", "line"]]], + ["preprocessor", ["#", ["directive", "nowarn"]]] +] + +---------------------------------------------------- + +Checks for preprocessor directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/fsharp/string_feature.test b/docs/_style/prism-master/tests/languages/fsharp/string_feature.test new file mode 100644 index 0000000000..3c984a8c65 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/fsharp/string_feature.test @@ -0,0 +1,47 @@ +"" +"fo\"o" +"foo\ +bar" +"foo"B + +@"" +@"foo" +@"fo""o" +@"foo"B + +"""""" +"""fo""o" +bar""" +"""foo"""B + +'a' +'a'B +'\'' +'\\' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + ["string", "\"foo\\\r\nbar\""], + ["string", "\"foo\"B"], + + ["string", "@\"\""], + ["string", "@\"foo\""], + ["string", "@\"fo\"\"o\""], + ["string", "@\"foo\"B"], + + ["string", "\"\"\"\"\"\""], + ["string", "\"\"\"fo\"\"o\"\r\nbar\"\"\""], + ["string", "\"\"\"foo\"\"\"B"], + + ["string", "'a'"], + ["string", "'a'B"], + ["string", "'\\''"], + ["string", "'\\\\'"] +] + +---------------------------------------------------- + +Checks for normal strings, verbatim strings, triple-quoted strings and character literals. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gcode/checksum_feature.test b/docs/_style/prism-master/tests/languages/gcode/checksum_feature.test new file mode 100644 index 0000000000..d3ea45613a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gcode/checksum_feature.test @@ -0,0 +1,12 @@ +G28*22 + +---------------------------------------------------- + +[ + ["keyword", "G28"], + ["checksum", "*22"] +] + +---------------------------------------------------- + +Checks for checksums. diff --git a/docs/_style/prism-master/tests/languages/gcode/comment_feature.test b/docs/_style/prism-master/tests/languages/gcode/comment_feature.test new file mode 100644 index 0000000000..cb2533f895 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gcode/comment_feature.test @@ -0,0 +1,20 @@ +; foo +(Home some axes) +G28 (here come the axes to be homed) X + +---------------------------------------------------- + +[ + ["comment", "; foo"], + + ["comment", "(Home some axes)"], + + ["keyword", "G28"], + ["comment", "(here come the axes to be homed)"], + ["property", "X"] + +] + +---------------------------------------------------- + +Checks for comments. diff --git a/docs/_style/prism-master/tests/languages/gcode/keyword_feature.test b/docs/_style/prism-master/tests/languages/gcode/keyword_feature.test new file mode 100644 index 0000000000..d72d0760b2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gcode/keyword_feature.test @@ -0,0 +1,23 @@ +G00 +G200 +G84.1 + +M00 +M123 +M52.4 + +---------------------------------------------------- + +[ + ["keyword", "G00"], + ["keyword", "G200"], + ["keyword", "G84.1"], + + ["keyword", "M00"], + ["keyword", "M123"], + ["keyword", "M52.4"] +] + +---------------------------------------------------- + +Checks for G- and M-codes. diff --git a/docs/_style/prism-master/tests/languages/gcode/property_feature.test b/docs/_style/prism-master/tests/languages/gcode/property_feature.test new file mode 100644 index 0000000000..9dee88682d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gcode/property_feature.test @@ -0,0 +1,17 @@ +X123 +Y0.2 +Z-3.1415 +E420:420 + +---------------------------------------------------- + +[ + ["property", "X"], "123\n", + ["property", "Y"], "0.2\n", + ["property", "Z"], "-3.1415\n", + ["property", "E"], "420", ["punctuation", ":"], "420" +] + +---------------------------------------------------- + +Checks for all other codes except G- and M-codes. diff --git a/docs/_style/prism-master/tests/languages/gcode/string_feature.test b/docs/_style/prism-master/tests/languages/gcode/string_feature.test new file mode 100644 index 0000000000..d05306d7db --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gcode/string_feature.test @@ -0,0 +1,17 @@ +M587 S"MYROUTER" P"ABCxyz;"" 123" + +---------------------------------------------------- + +[ + ["keyword", "M587"], + + ["property", "S"], + ["string", "\"MYROUTER\""], + + ["property", "P"], + ["string", "\"ABCxyz;\"\" 123\""] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/docs/_style/prism-master/tests/languages/gedcom/level_feature.test b/docs/_style/prism-master/tests/languages/gedcom/level_feature.test new file mode 100644 index 0000000000..08c3963d83 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gedcom/level_feature.test @@ -0,0 +1,20 @@ +0 HEAD +1 CHAR ASCII +99 FOO bar + +---------------------------------------------------- + +[ + ["level", "0"], + ["tag", "HEAD"], + ["level", "1"], + ["tag", "CHAR"], + ["line-value", ["ASCII"]], + ["level", "99"], + ["tag", "FOO"], + ["line-value", ["bar"]] +] + +---------------------------------------------------- + +Checks for levels. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gedcom/line-value_feature.test b/docs/_style/prism-master/tests/languages/gedcom/line-value_feature.test new file mode 100644 index 0000000000..4ab43e728b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gedcom/line-value_feature.test @@ -0,0 +1,29 @@ +1 CHIL @CHILD1@ +2 PLAC ÁĆÉǴÍ,ḰĹḾŃÓ,ṔŔŚÚẂ,ÝŹáćé,ǵíḱĺḿ,ńóṕŕś,úẃýź +1 NAME code: 0313/COMMA ABOVE/ +2 DATE @#DGREGORIAN@ 31 DEC 1997 +2 CONT Copyright gedcom@@gedcom.org + +---------------------------------------------------- + +[ + ["level", "1"], + ["tag", "CHIL"], + ["line-value", [["pointer", "@CHILD1@"]]], + ["level", "2"], + ["tag", "PLAC"], + ["line-value", ["ÁĆÉǴÍ,ḰĹḾŃÓ,ṔŔŚÚẂ,ÝŹáćé,ǵíḱĺḿ,ńóṕŕś,úẃýź"]], + ["level", "1"], + ["tag", "NAME"], + ["line-value", ["code: 0313/COMMA ABOVE/"]], + ["level", "2"], + ["tag", "DATE"], + ["line-value", ["@#DGREGORIAN@ 31 DEC 1997"]], + ["level", "2"], + ["tag", "CONT"], + ["line-value", ["Copyright gedcom@@gedcom.org"]] +] + +---------------------------------------------------- + +Checks for line values. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gedcom/pointer_feature.test b/docs/_style/prism-master/tests/languages/gedcom/pointer_feature.test new file mode 100644 index 0000000000..f39ffb77a6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gedcom/pointer_feature.test @@ -0,0 +1,23 @@ +@f!@ +@foo_Bar@ +@_$!"$%&'()*+,-./:;<=>?[\]^`{|}~ #foobar@ +0 @SUBMITTER@ SUBM +1 FAMS @FAMILY@ + +---------------------------------------------------- + +[ + ["pointer", "@f!@"], + ["pointer", "@foo_Bar@"], + ["pointer", "@_$!\"$%&'()*+,-./:;<=>?[\\]^`{|}~ #foobar@"], + ["level", "0"], + ["pointer", "@SUBMITTER@"], + ["tag", "SUBM"], + ["level", "1"], + ["tag", "FAMS"], + ["line-value", [["pointer", "@FAMILY@"]]] +] + +---------------------------------------------------- + +Checks for pointers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gedcom/tag_feature.test b/docs/_style/prism-master/tests/languages/gedcom/tag_feature.test new file mode 100644 index 0000000000..2166f64484 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gedcom/tag_feature.test @@ -0,0 +1,25 @@ +0 HEAD +1 foo_bar +2 _ +3 @pointer@ _Sometag42 +4 247 + +---------------------------------------------------- + +[ + ["level", "0"], + ["tag", "HEAD"], + ["level", "1"], + ["tag", "foo_bar"], + ["level", "2"], + ["tag", "_"], + ["level", "3"], + ["pointer", "@pointer@"], + ["tag", "_Sometag42"], + ["level", "4"], + ["tag", "247"] +] + +---------------------------------------------------- + +Checks for tags. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/atrule_feature.test b/docs/_style/prism-master/tests/languages/gherkin/atrule_feature.test new file mode 100644 index 0000000000..23bc5408c5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/atrule_feature.test @@ -0,0 +1,1211 @@ +Scenario: foo + 'ach foobar + 'a foobar + 'ej foobar + 7 foobar + a foobar + A také foobar + A taktiež foobar + A tiež foobar + A zároveň foobar + Aber foobar + Ac foobar + Adott foobar + Akkor foobar + Ak foobar + Aleshores foobar + Ale foobar + Ali foobar + Allora foobar + Alors foobar + Als foobar + Ama foobar + Amennyiben foobar + Amikor foobar + Ampak foobar + an foobar + AN foobar + Ananging foobar + And y'all foobar + And foobar + Angenommen foobar + Anrhegedig a foobar + An foobar + Apabila foobar + Atès foobar + Atesa foobar + Atunci foobar + Avast! foobar + Aye foobar + A foobar + awer foobar + Bagi foobar + Banjur foobar + Bet foobar + Biết foobar + Blimey! foobar + Buh foobar + But at the end of the day I reckon foobar + But y'all foobar + But foobar + BUT foobar + Cal foobar + Când foobar + Cando foobar + Cand foobar + Ce foobar + Cuando foobar + Če foobar + Ða ðe foobar + Ða foobar + Dadas foobar + Dada foobar + Dados foobar + Dado foobar + DaH ghu' bejlu' foobar + dann foobar + Dann foobar + Dano foobar + Dan foobar + Dar foobar + Dat fiind foobar + Data foobar + Date fiind foobar + Date foobar + Dati fiind foobar + Dati foobar + Daţi fiind foobar + Dați fiind foobar + Dato foobar + DEN foobar + Den youse gotta foobar + Dengan foobar + De foobar + Diberi foobar + Diyelim ki foobar + Donada foobar + Donat foobar + Donitaĵo foobar + Do foobar + Dun foobar + Duota foobar + Ðurh foobar + Eeldades foobar + Ef foobar + Eğer ki foobar + Entao foobar + Então foobar + Entón foobar + Entonces foobar + En foobar + Epi foobar + E foobar + És foobar + Etant donnée foobar + Etant donné foobar + Et foobar + Étant données foobar + Étant donnée foobar + Étant donné foobar + Etant données foobar + Etant donnés foobar + Étant donnés foobar + Fakat foobar + Gangway! foobar + Gdy foobar + Gegeben seien foobar + Gegeben sei foobar + Gegeven foobar + Gegewe foobar + ghu' noblu' foobar + Gitt foobar + Given y'all foobar + Given foobar + Givet foobar + Givun foobar + Ha foobar + Cho foobar + I CAN HAZ foobar + In foobar + Ir foobar + It's just unbelievable foobar + I foobar + Ja foobar + Jeśli foobar + Jeżeli foobar + Kadar foobar + Kada foobar + Kad foobar + Kai foobar + Kaj foobar + Když foobar + Keď foobar + Kemudian foobar + Ketika foobar + Khi foobar + Kiedy foobar + Ko foobar + Kuid foobar + Kui foobar + Kun foobar + Lan foobar + latlh foobar + Le sa a foobar + Let go and haul foobar + Le foobar + Lè sa a foobar + Lè foobar + Logo foobar + Lorsqu'< foobar + Lorsque foobar + mä foobar + Maar foobar + Mais foobar + Mając foobar + Majd foobar + Maka foobar + Manawa foobar + Mas foobar + Ma foobar + Menawa foobar + Men foobar + Mutta foobar + Nalikaning foobar + Nalika foobar + Nanging foobar + Når foobar + När foobar + Nato foobar + Nhưng foobar + Niin foobar + Njuk foobar + O zaman foobar + Og foobar + Och foobar + Oletetaan foobar + Onda foobar + Ond foobar + Oraz foobar + Pak foobar + Pero foobar + Però foobar + Podano foobar + Pokiaľ foobar + Pokud foobar + Potem foobar + Potom foobar + Privzeto foobar + Pryd foobar + qaSDI' foobar + Quando foobar + Quand foobar + Quan foobar + Så foobar + Sed foobar + Se foobar + Siis foobar + Sipoze ke foobar + Sipoze Ke foobar + Sipoze foobar + Si foobar + Şi foobar + Și foobar + Soit foobar + Stel foobar + Tada foobar + Tad foobar + Takrat foobar + Tak foobar + Tapi foobar + Ter foobar + Tetapi foobar + Tha the foobar + Tha foobar + Then y'all foobar + Then foobar + Thì foobar + Thurh foobar + Toda foobar + Too right foobar + ugeholl foobar + Und foobar + Un foobar + Và foobar + vaj foobar + Vendar foobar + Ve foobar + wann foobar + Wanneer foobar + WEN foobar + Wenn foobar + When y'all foobar + When foobar + Wtedy foobar + Wun foobar + Y'know foobar + Yeah nah foobar + Yna foobar + Youse know like when foobar + Youse know when youse got foobar + Y foobar + Za predpokladu foobar + Za předpokladu foobar + Zadani foobar + Zadano foobar + Zadan foobar + Zadate foobar + Zadato foobar + Zakładając foobar + Zaradi foobar + Zatati foobar + Þa foobar + Þá foobar + Þa þe foobar + Þegar foobar + Þurh foobar + Αλλά foobar + Δεδομένου foobar + Και foobar + Όταν foobar + Τότε foobar + А також foobar + Агар foobar + Але foobar + Али foobar + Аммо foobar + А foobar + Әгәр foobar + Әйтик foobar + Әмма foobar + Бирок foobar + Ва foobar + Вә foobar + Дадено foobar + Дано foobar + Допустим foobar + Если foobar + Задате foobar + Задати foobar + Задато foobar + И foobar + І foobar + К тому же foobar + Када foobar + Кад foobar + Когато foobar + Когда foobar + Коли foobar + Ләкин foobar + Лекин foobar + Нәтиҗәдә foobar + Нехай foobar + Но foobar + Онда foobar + Припустимо, що foobar + Припустимо foobar + Пусть foobar + Также foobar + Та foobar + Тогда foobar + Тоді foobar + То foobar + Унда foobar + Һәм foobar + Якщо foobar + אבל foobar + אזי foobar + אז foobar + בהינתן foobar + וגם foobar + כאשר foobar + آنگاه foobar + اذاً foobar + اگر foobar + اما foobar + اور foobar + با فرض foobar + بالفرض foobar + بفرض foobar + پھر foobar + تب foobar + ثم foobar + جب foobar + عندما foobar + فرض کیا foobar + لكن foobar + لیکن foobar + متى foobar + هنگامی foobar + و foobar + अगर foobar + और foobar + कदा foobar + किन्तु foobar + चूंकि foobar + जब foobar + तथा foobar + तदा foobar + तब foobar + परन्तु foobar + पर foobar + यदि foobar + ਅਤੇ foobar + ਜਦੋਂ foobar + ਜਿਵੇਂ ਕਿ foobar + ਜੇਕਰ foobar + ਤਦ foobar + ਪਰ foobar + అప్పుడు foobar + ఈ పరిస్థితిలో foobar + కాని foobar + చెప్పబడినది foobar + మరియు foobar + ಆದರೆ foobar + ನಂತರ foobar + ನೀಡಿದ foobar + ಮತ್ತು foobar + ಸ್ಥಿತಿಯನ್ನು foobar + กำหนดให้ foobar + ดังนั้น foobar + แต่ foobar + เมื่อ foobar + และ foobar + 그러면< foobar + 그리고< foobar + 단< foobar + 만약< foobar + 만일< foobar + 먼저< foobar + 조건< foobar + 하지만< foobar + かつ< foobar + しかし< foobar + ただし< foobar + ならば< foobar + もし< foobar + 並且< foobar + 但し< foobar + 但是< foobar + 假如< foobar + 假定< foobar + 假設< foobar + 假设< foobar + 前提< foobar + 同时< foobar + 同時< foobar + 并且< foobar + 当< foobar + 當< foobar + 而且< foobar + 那么< foobar + 那麼< foobar + +---------------------------------------------------- + +[ + ["scenario", [["keyword", "Scenario:"], ["important", " foo"]]], + ["atrule", "'ach"], + " foobar\r\n\t", + ["atrule", "'a"], + " foobar\r\n\t", + ["atrule", "'ej"], + " foobar\r\n\t", + ["atrule", "7"], + " foobar\r\n\t", + ["atrule", "a"], + " foobar\r\n\t", + ["atrule", "A také"], + " foobar\r\n\t", + ["atrule", "A taktiež"], + " foobar\r\n\t", + ["atrule", "A tiež"], + " foobar\r\n\t", + ["atrule", "A zároveň"], + " foobar\r\n\t", + ["atrule", "Aber"], + " foobar\r\n\t", + ["atrule", "Ac"], + " foobar\r\n\t", + ["atrule", "Adott"], + " foobar\r\n\t", + ["atrule", "Akkor"], + " foobar\r\n\t", + ["atrule", "Ak"], + " foobar\r\n\t", + ["atrule", "Aleshores"], + " foobar\r\n\t", + ["atrule", "Ale"], + " foobar\r\n\t", + ["atrule", "Ali"], + " foobar\r\n\t", + ["atrule", "Allora"], + " foobar\r\n\t", + ["atrule", "Alors"], + " foobar\r\n\t", + ["atrule", "Als"], + " foobar\r\n\t", + ["atrule", "Ama"], + " foobar\r\n\t", + ["atrule", "Amennyiben"], + " foobar\r\n\t", + ["atrule", "Amikor"], + " foobar\r\n\t", + ["atrule", "Ampak"], + " foobar\r\n\t", + ["atrule", "an"], + " foobar\r\n\t", + ["atrule", "AN"], + " foobar\r\n\t", + ["atrule", "Ananging"], + " foobar\r\n\t", + ["atrule", "And y'all"], + " foobar\r\n\t", + ["atrule", "And"], + " foobar\r\n\t", + ["atrule", "Angenommen"], + " foobar\r\n\t", + ["atrule", "Anrhegedig a"], + " foobar\r\n\t", + ["atrule", "An"], + " foobar\r\n\t", + ["atrule", "Apabila"], + " foobar\r\n\t", + ["atrule", "Atès"], + " foobar\r\n\t", + ["atrule", "Atesa"], + " foobar\r\n\t", + ["atrule", "Atunci"], + " foobar\r\n\t", + ["atrule", "Avast!"], + " foobar\r\n\t", + ["atrule", "Aye"], + " foobar\r\n\t", + ["atrule", "A"], + " foobar\r\n\t", + ["atrule", "awer"], + " foobar\r\n\t", + ["atrule", "Bagi"], + " foobar\r\n\t", + ["atrule", "Banjur"], + " foobar\r\n\t", + ["atrule", "Bet"], + " foobar\r\n\t", + ["atrule", "Biết"], + " foobar\r\n\t", + ["atrule", "Blimey!"], + " foobar\r\n\t", + ["atrule", "Buh"], + " foobar\r\n\t", + ["atrule", "But at the end of the day I reckon"], + " foobar\r\n\t", + ["atrule", "But y'all"], + " foobar\r\n\t", + ["atrule", "But"], + " foobar\r\n\t", + ["atrule", "BUT"], + " foobar\r\n\t", + ["atrule", "Cal"], + " foobar\r\n\t", + ["atrule", "Când"], + " foobar\r\n\t", + ["atrule", "Cando"], + " foobar\r\n\t", + ["atrule", "Cand"], + " foobar\r\n\t", + ["atrule", "Ce"], + " foobar\r\n\t", + ["atrule", "Cuando"], + " foobar\r\n\t", + ["atrule", "Če"], + " foobar\r\n\t", + ["atrule", "Ða ðe"], + " foobar\r\n\t", + ["atrule", "Ða"], + " foobar\r\n\t", + ["atrule", "Dadas"], + " foobar\r\n\t", + ["atrule", "Dada"], + " foobar\r\n\t", + ["atrule", "Dados"], + " foobar\r\n\t", + ["atrule", "Dado"], + " foobar\r\n\t", + ["atrule", "DaH ghu' bejlu'"], + " foobar\r\n\t", + ["atrule", "dann"], + " foobar\r\n\t", + ["atrule", "Dann"], + " foobar\r\n\t", + ["atrule", "Dano"], + " foobar\r\n\t", + ["atrule", "Dan"], + " foobar\r\n\t", + ["atrule", "Dar"], + " foobar\r\n\t", + ["atrule", "Dat fiind"], + " foobar\r\n\t", + ["atrule", "Data"], + " foobar\r\n\t", + ["atrule", "Date fiind"], + " foobar\r\n\t", + ["atrule", "Date"], + " foobar\r\n\t", + ["atrule", "Dati fiind"], + " foobar\r\n\t", + ["atrule", "Dati"], + " foobar\r\n\t", + ["atrule", "Daţi fiind"], + " foobar\r\n\t", + ["atrule", "Dați fiind"], + " foobar\r\n\t", + ["atrule", "Dato"], + " foobar\r\n\t", + ["atrule", "DEN"], + " foobar\r\n\t", + ["atrule", "Den youse gotta"], + " foobar\r\n\t", + ["atrule", "Dengan"], + " foobar\r\n\t", + ["atrule", "De"], + " foobar\r\n\t", + ["atrule", "Diberi"], + " foobar\r\n\t", + ["atrule", "Diyelim ki"], + " foobar\r\n\t", + ["atrule", "Donada"], + " foobar\r\n\t", + ["atrule", "Donat"], + " foobar\r\n\t", + ["atrule", "Donitaĵo"], + " foobar\r\n\t", + ["atrule", "Do"], + " foobar\r\n\t", + ["atrule", "Dun"], + " foobar\r\n\t", + ["atrule", "Duota"], + " foobar\r\n\t", + ["atrule", "Ðurh"], + " foobar\r\n\t", + ["atrule", "Eeldades"], + " foobar\r\n\t", + ["atrule", "Ef"], + " foobar\r\n\t", + ["atrule", "Eğer ki"], + " foobar\r\n\t", + ["atrule", "Entao"], + " foobar\r\n\t", + ["atrule", "Então"], + " foobar\r\n\t", + ["atrule", "Entón"], + " foobar\r\n\t", + ["atrule", "Entonces"], + " foobar\r\n\t", + ["atrule", "En"], + " foobar\r\n\t", + ["atrule", "Epi"], + " foobar\r\n\t", + ["atrule", "E"], + " foobar\r\n\t", + ["atrule", "És"], + " foobar\r\n\t", + ["atrule", "Etant donnée"], + " foobar\r\n\t", + ["atrule", "Etant donné"], + " foobar\r\n\t", + ["atrule", "Et"], + " foobar\r\n\t", + ["atrule", "Étant données"], + " foobar\r\n\t", + ["atrule", "Étant donnée"], + " foobar\r\n\t", + ["atrule", "Étant donné"], + " foobar\r\n\t", + ["atrule", "Etant données"], + " foobar\r\n\t", + ["atrule", "Etant donnés"], + " foobar\r\n\t", + ["atrule", "Étant donnés"], + " foobar\r\n\t", + ["atrule", "Fakat"], + " foobar\r\n\t", + ["atrule", "Gangway!"], + " foobar\r\n\t", + ["atrule", "Gdy"], + " foobar\r\n\t", + ["atrule", "Gegeben seien"], + " foobar\r\n\t", + ["atrule", "Gegeben sei"], + " foobar\r\n\t", + ["atrule", "Gegeven"], + " foobar\r\n\t", + ["atrule", "Gegewe"], + " foobar\r\n\t", + ["atrule", "ghu' noblu'"], + " foobar\r\n\t", + ["atrule", "Gitt"], + " foobar\r\n\t", + ["atrule", "Given y'all"], + " foobar\r\n\t", + ["atrule", "Given"], + " foobar\r\n\t", + ["atrule", "Givet"], + " foobar\r\n\t", + ["atrule", "Givun"], + " foobar\r\n\t", + ["atrule", "Ha"], + " foobar\r\n\t", + ["atrule", "Cho"], + " foobar\r\n\t", + ["atrule", "I CAN HAZ"], + " foobar\r\n\t", + ["atrule", "In"], + " foobar\r\n\t", + ["atrule", "Ir"], + " foobar\r\n\t", + ["atrule", "It's just unbelievable"], + " foobar\r\n\t", + ["atrule", "I"], + " foobar\r\n\t", + ["atrule", "Ja"], + " foobar\r\n\t", + ["atrule", "Jeśli"], + " foobar\r\n\t", + ["atrule", "Jeżeli"], + " foobar\r\n\t", + ["atrule", "Kadar"], + " foobar\r\n\t", + ["atrule", "Kada"], + " foobar\r\n\t", + ["atrule", "Kad"], + " foobar\r\n\t", + ["atrule", "Kai"], + " foobar\r\n\t", + ["atrule", "Kaj"], + " foobar\r\n\t", + ["atrule", "Když"], + " foobar\r\n\t", + ["atrule", "Keď"], + " foobar\r\n\t", + ["atrule", "Kemudian"], + " foobar\r\n\t", + ["atrule", "Ketika"], + " foobar\r\n\t", + ["atrule", "Khi"], + " foobar\r\n\t", + ["atrule", "Kiedy"], + " foobar\r\n\t", + ["atrule", "Ko"], + " foobar\r\n\t", + ["atrule", "Kuid"], + " foobar\r\n\t", + ["atrule", "Kui"], + " foobar\r\n\t", + ["atrule", "Kun"], + " foobar\r\n\t", + ["atrule", "Lan"], + " foobar\r\n\t", + ["atrule", "latlh"], + " foobar\r\n\t", + ["atrule", "Le sa a"], + " foobar\r\n\t", + ["atrule", "Let go and haul"], + " foobar\r\n\t", + ["atrule", "Le"], + " foobar\r\n\t", + ["atrule", "Lè sa a"], + " foobar\r\n\t", + ["atrule", "Lè"], + " foobar\r\n\t", + ["atrule", "Logo"], + " foobar\r\n\t", + ["atrule", "Lorsqu'<"], + " foobar\r\n\t", + ["atrule", "Lorsque"], + " foobar\r\n\t", + ["atrule", "mä"], + " foobar\r\n\t", + ["atrule", "Maar"], + " foobar\r\n\t", + ["atrule", "Mais"], + " foobar\r\n\t", + ["atrule", "Mając"], + " foobar\r\n\t", + ["atrule", "Majd"], + " foobar\r\n\t", + ["atrule", "Maka"], + " foobar\r\n\t", + ["atrule", "Manawa"], + " foobar\r\n\t", + ["atrule", "Mas"], + " foobar\r\n\t", + ["atrule", "Ma"], + " foobar\r\n\t", + ["atrule", "Menawa"], + " foobar\r\n\t", + ["atrule", "Men"], + " foobar\r\n\t", + ["atrule", "Mutta"], + " foobar\r\n\t", + ["atrule", "Nalikaning"], + " foobar\r\n\t", + ["atrule", "Nalika"], + " foobar\r\n\t", + ["atrule", "Nanging"], + " foobar\r\n\t", + ["atrule", "Når"], + " foobar\r\n\t", + ["atrule", "När"], + " foobar\r\n\t", + ["atrule", "Nato"], + " foobar\r\n\t", + ["atrule", "Nhưng"], + " foobar\r\n\t", + ["atrule", "Niin"], + " foobar\r\n\t", + ["atrule", "Njuk"], + " foobar\r\n\t", + ["atrule", "O zaman"], + " foobar\r\n\t", + ["atrule", "Og"], + " foobar\r\n\t", + ["atrule", "Och"], + " foobar\r\n\t", + ["atrule", "Oletetaan"], + " foobar\r\n\t", + ["atrule", "Onda"], + " foobar\r\n\t", + ["atrule", "Ond"], + " foobar\r\n\t", + ["atrule", "Oraz"], + " foobar\r\n\t", + ["atrule", "Pak"], + " foobar\r\n\t", + ["atrule", "Pero"], + " foobar\r\n\t", + ["atrule", "Però"], + " foobar\r\n\t", + ["atrule", "Podano"], + " foobar\r\n\t", + ["atrule", "Pokiaľ"], + " foobar\r\n\t", + ["atrule", "Pokud"], + " foobar\r\n\t", + ["atrule", "Potem"], + " foobar\r\n\t", + ["atrule", "Potom"], + " foobar\r\n\t", + ["atrule", "Privzeto"], + " foobar\r\n\t", + ["atrule", "Pryd"], + " foobar\r\n\t", + ["atrule", "qaSDI'"], + " foobar\r\n\t", + ["atrule", "Quando"], + " foobar\r\n\t", + ["atrule", "Quand"], + " foobar\r\n\t", + ["atrule", "Quan"], + " foobar\r\n\t", + ["atrule", "Så"], + " foobar\r\n\t", + ["atrule", "Sed"], + " foobar\r\n\t", + ["atrule", "Se"], + " foobar\r\n\t", + ["atrule", "Siis"], + " foobar\r\n\t", + ["atrule", "Sipoze ke"], + " foobar\r\n\t", + ["atrule", "Sipoze Ke"], + " foobar\r\n\t", + ["atrule", "Sipoze"], + " foobar\r\n\t", + ["atrule", "Si"], + " foobar\r\n\t", + ["atrule", "Şi"], + " foobar\r\n\t", + ["atrule", "Și"], + " foobar\r\n\t", + ["atrule", "Soit"], + " foobar\r\n\t", + ["atrule", "Stel"], + " foobar\r\n\t", + ["atrule", "Tada"], + " foobar\r\n\t", + ["atrule", "Tad"], + " foobar\r\n\t", + ["atrule", "Takrat"], + " foobar\r\n\t", + ["atrule", "Tak"], + " foobar\r\n\t", + ["atrule", "Tapi"], + " foobar\r\n\t", + ["atrule", "Ter"], + " foobar\r\n\t", + ["atrule", "Tetapi"], + " foobar\r\n\t", + ["atrule", "Tha the"], + " foobar\r\n\t", + ["atrule", "Tha"], + " foobar\r\n\t", + ["atrule", "Then y'all"], + " foobar\r\n\t", + ["atrule", "Then"], + " foobar\r\n\t", + ["atrule", "Thì"], + " foobar\r\n\t", + ["atrule", "Thurh"], + " foobar\r\n\t", + ["atrule", "Toda"], + " foobar\r\n\t", + ["atrule", "Too right"], + " foobar\r\n\t", + ["atrule", "ugeholl"], + " foobar\r\n\t", + ["atrule", "Und"], + " foobar\r\n\t", + ["atrule", "Un"], + " foobar\r\n\t", + ["atrule", "Và"], + " foobar\r\n\t", + ["atrule", "vaj"], + " foobar\r\n\t", + ["atrule", "Vendar"], + " foobar\r\n\t", + ["atrule", "Ve"], + " foobar\r\n\t", + ["atrule", "wann"], + " foobar\r\n\t", + ["atrule", "Wanneer"], + " foobar\r\n\t", + ["atrule", "WEN"], + " foobar\r\n\t", + ["atrule", "Wenn"], + " foobar\r\n\t", + ["atrule", "When y'all"], + " foobar\r\n\t", + ["atrule", "When"], + " foobar\r\n\t", + ["atrule", "Wtedy"], + " foobar\r\n\t", + ["atrule", "Wun"], + " foobar\r\n\t", + ["atrule", "Y'know"], + " foobar\r\n\t", + ["atrule", "Yeah nah"], + " foobar\r\n\t", + ["atrule", "Yna"], + " foobar\r\n\t", + ["atrule", "Youse know like when"], + " foobar\r\n\t", + ["atrule", "Youse know when youse got"], + " foobar\r\n\t", + ["atrule", "Y"], + " foobar\r\n\t", + ["atrule", "Za predpokladu"], + " foobar\r\n\t", + ["atrule", "Za předpokladu"], + " foobar\r\n\t", + ["atrule", "Zadani"], + " foobar\r\n\t", + ["atrule", "Zadano"], + " foobar\r\n\t", + ["atrule", "Zadan"], + " foobar\r\n\t", + ["atrule", "Zadate"], + " foobar\r\n\t", + ["atrule", "Zadato"], + " foobar\r\n\t", + ["atrule", "Zakładając"], + " foobar\r\n\t", + ["atrule", "Zaradi"], + " foobar\r\n\t", + ["atrule", "Zatati"], + " foobar\r\n\t", + ["atrule", "Þa"], + " foobar\r\n\t", + ["atrule", "Þá"], + " foobar\r\n\t", + ["atrule", "Þa þe"], + " foobar\r\n\t", + ["atrule", "Þegar"], + " foobar\r\n\t", + ["atrule", "Þurh"], + " foobar\r\n\t", + ["atrule", "Αλλά"], + " foobar\r\n\t", + ["atrule", "Δεδομένου"], + " foobar\r\n\t", + ["atrule", "Και"], + " foobar\r\n\t", + ["atrule", "Όταν"], + " foobar\r\n\t", + ["atrule", "Τότε"], + " foobar\r\n\t", + ["atrule", "А також"], + " foobar\r\n\t", + ["atrule", "Агар"], + " foobar\r\n\t", + ["atrule", "Але"], + " foobar\r\n\t", + ["atrule", "Али"], + " foobar\r\n\t", + ["atrule", "Аммо"], + " foobar\r\n\t", + ["atrule", "А"], + " foobar\r\n\t", + ["atrule", "Әгәр"], + " foobar\r\n\t", + ["atrule", "Әйтик"], + " foobar\r\n\t", + ["atrule", "Әмма"], + " foobar\r\n\t", + ["atrule", "Бирок"], + " foobar\r\n\t", + ["atrule", "Ва"], + " foobar\r\n\t", + ["atrule", "Вә"], + " foobar\r\n\t", + ["atrule", "Дадено"], + " foobar\r\n\t", + ["atrule", "Дано"], + " foobar\r\n\t", + ["atrule", "Допустим"], + " foobar\r\n\t", + ["atrule", "Если"], + " foobar\r\n\t", + ["atrule", "Задате"], + " foobar\r\n\t", + ["atrule", "Задати"], + " foobar\r\n\t", + ["atrule", "Задато"], + " foobar\r\n\t", + ["atrule", "И"], + " foobar\r\n\t", + ["atrule", "І"], + " foobar\r\n\t", + ["atrule", "К тому же"], + " foobar\r\n\t", + ["atrule", "Када"], + " foobar\r\n\t", + ["atrule", "Кад"], + " foobar\r\n\t", + ["atrule", "Когато"], + " foobar\r\n\t", + ["atrule", "Когда"], + " foobar\r\n\t", + ["atrule", "Коли"], + " foobar\r\n\t", + ["atrule", "Ләкин"], + " foobar\r\n\t", + ["atrule", "Лекин"], + " foobar\r\n\t", + ["atrule", "Нәтиҗәдә"], + " foobar\r\n\t", + ["atrule", "Нехай"], + " foobar\r\n\t", + ["atrule", "Но"], + " foobar\r\n\t", + ["atrule", "Онда"], + " foobar\r\n\t", + ["atrule", "Припустимо, що"], + " foobar\r\n\t", + ["atrule", "Припустимо"], + " foobar\r\n\t", + ["atrule", "Пусть"], + " foobar\r\n\t", + ["atrule", "Также"], + " foobar\r\n\t", + ["atrule", "Та"], + " foobar\r\n\t", + ["atrule", "Тогда"], + " foobar\r\n\t", + ["atrule", "Тоді"], + " foobar\r\n\t", + ["atrule", "То"], + " foobar\r\n\t", + ["atrule", "Унда"], + " foobar\r\n\t", + ["atrule", "Һәм"], + " foobar\r\n\t", + ["atrule", "Якщо"], + " foobar\r\n\t", + ["atrule", "אבל"], + " foobar\r\n\t", + ["atrule", "אזי"], + " foobar\r\n\t", + ["atrule", "אז"], + " foobar\r\n\t", + ["atrule", "בהינתן"], + " foobar\r\n\t", + ["atrule", "וגם"], + " foobar\r\n\t", + ["atrule", "כאשר"], + " foobar\r\n\t", + ["atrule", "آنگاه"], + " foobar\r\n\t", + ["atrule", "اذاً"], + " foobar\r\n\t", + ["atrule", "اگر"], + " foobar\r\n\t", + ["atrule", "اما"], + " foobar\r\n\t", + ["atrule", "اور"], + " foobar\r\n\t", + ["atrule", "با فرض"], + " foobar\r\n\t", + ["atrule", "بالفرض"], + " foobar\r\n\t", + ["atrule", "بفرض"], + " foobar\r\n\t", + ["atrule", "پھر"], + " foobar\r\n\t", + ["atrule", "تب"], + " foobar\r\n\t", + ["atrule", "ثم"], + " foobar\r\n\t", + ["atrule", "جب"], + " foobar\r\n\t", + ["atrule", "عندما"], + " foobar\r\n\t", + ["atrule", "فرض کیا"], + " foobar\r\n\t", + ["atrule", "لكن"], + " foobar\r\n\t", + ["atrule", "لیکن"], + " foobar\r\n\t", + ["atrule", "متى"], + " foobar\r\n\t", + ["atrule", "هنگامی"], + " foobar\r\n\t", + ["atrule", "و"], + " foobar\r\n\t", + ["atrule", "अगर"], + " foobar\r\n\t", + ["atrule", "और"], + " foobar\r\n\t", + ["atrule", "कदा"], + " foobar\r\n\t", + ["atrule", "किन्तु"], + " foobar\r\n\t", + ["atrule", "चूंकि"], + " foobar\r\n\t", + ["atrule", "जब"], + " foobar\r\n\t", + ["atrule", "तथा"], + " foobar\r\n\t", + ["atrule", "तदा"], + " foobar\r\n\t", + ["atrule", "तब"], + " foobar\r\n\t", + ["atrule", "परन्तु"], + " foobar\r\n\t", + ["atrule", "पर"], + " foobar\r\n\t", + ["atrule", "यदि"], + " foobar\r\n\t", + ["atrule", "ਅਤੇ"], + " foobar\r\n\t", + ["atrule", "ਜਦੋਂ"], + " foobar\r\n\t", + ["atrule", "ਜਿਵੇਂ ਕਿ"], + " foobar\r\n\t", + ["atrule", "ਜੇਕਰ"], + " foobar\r\n\t", + ["atrule", "ਤਦ"], + " foobar\r\n\t", + ["atrule", "ਪਰ"], + " foobar\r\n\t", + ["atrule", "అప్పుడు"], + " foobar\r\n\t", + ["atrule", "ఈ పరిస్థితిలో"], + " foobar\r\n\t", + ["atrule", "కాని"], + " foobar\r\n\t", + ["atrule", "చెప్పబడినది"], + " foobar\r\n\t", + ["atrule", "మరియు"], + " foobar\r\n\t", + ["atrule", "ಆದರೆ"], + " foobar\r\n\t", + ["atrule", "ನಂತರ"], + " foobar\r\n\t", + ["atrule", "ನೀಡಿದ"], + " foobar\r\n\t", + ["atrule", "ಮತ್ತು"], + " foobar\r\n\t", + ["atrule", "ಸ್ಥಿತಿಯನ್ನು"], + " foobar\r\n\t", + ["atrule", "กำหนดให้"], + " foobar\r\n\t", + ["atrule", "ดังนั้น"], + " foobar\r\n\t", + ["atrule", "แต่"], + " foobar\r\n\t", + ["atrule", "เมื่อ"], + " foobar\r\n\t", + ["atrule", "และ"], + " foobar\r\n\t", + ["atrule", "그러면<"], + " foobar\r\n\t", + ["atrule", "그리고<"], + " foobar\r\n\t", + ["atrule", "단<"], + " foobar\r\n\t", + ["atrule", "만약<"], + " foobar\r\n\t", + ["atrule", "만일<"], + " foobar\r\n\t", + ["atrule", "먼저<"], + " foobar\r\n\t", + ["atrule", "조건<"], + " foobar\r\n\t", + ["atrule", "하지만<"], + " foobar\r\n\t", + ["atrule", "かつ<"], + " foobar\r\n\t", + ["atrule", "しかし<"], + " foobar\r\n\t", + ["atrule", "ただし<"], + " foobar\r\n\t", + ["atrule", "ならば<"], + " foobar\r\n\t", + ["atrule", "もし<"], + " foobar\r\n\t", + ["atrule", "並且<"], + " foobar\r\n\t", + ["atrule", "但し<"], + " foobar\r\n\t", + ["atrule", "但是<"], + " foobar\r\n\t", + ["atrule", "假如<"], + " foobar\r\n\t", + ["atrule", "假定<"], + " foobar\r\n\t", + ["atrule", "假設<"], + " foobar\r\n\t", + ["atrule", "假设<"], + " foobar\r\n\t", + ["atrule", "前提<"], + " foobar\r\n\t", + ["atrule", "同时<"], + " foobar\r\n\t", + ["atrule", "同時<"], + " foobar\r\n\t", + ["atrule", "并且<"], + " foobar\r\n\t", + ["atrule", "当<"], + " foobar\r\n\t", + ["atrule", "當<"], + " foobar\r\n\t", + ["atrule", "而且<"], + " foobar\r\n\t", + ["atrule", "那么<"], + " foobar\r\n\t", + ["atrule", "那麼<"], + " foobar" +] + +---------------------------------------------------- + +Checks for at-rules in all languages. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/comment_feature.test b/docs/_style/prism-master/tests/languages/gherkin/comment_feature.test new file mode 100644 index 0000000000..ce88cc95a1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/comment_feature.test @@ -0,0 +1,15 @@ +# +# foo bar + # foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# foo bar"], + ["comment", "# foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/feature_feature.test b/docs/_style/prism-master/tests/languages/gherkin/feature_feature.test new file mode 100644 index 0000000000..774dd363c8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/feature_feature.test @@ -0,0 +1,196 @@ +Ability: foobar +baz +Ahoy matey!: +Arwedd: foobar +Aspekt: foobar +Besigheid Behoefte: foobar +Business Need: foobar +Caracteristica: foobar +Característica: foobar +Egenskab: foobar +Egenskap: foobar +Eiginleiki: foobar +Feature: foobar +Fīča: foobar +Fitur: foobar +Fonctionnalité: foobar +Fonksyonalite: foobar +Funcionalidade: foobar +Funcionalitat: foobar +Functionalitate: foobar +Funcţionalitate: foobar +Funcționalitate: foobar +Functionaliteit: foobar +Fungsi: foobar +Funkcia: foobar +Funkcija: foobar +Funkcionalitāte: foobar +Funkcionalnost: foobar +Funkcja: foobar +Funksie: foobar +Funktionalität: foobar +Funktionalitéit: foobar +Funzionalità: foobar +Hwaet: foobar +Hwæt: foobar +Jellemző: foobar +Karakteristik: foobar +laH: foobar +Lastnost: foobar +Mak: foobar +Mogucnost: foobar +Mogućnost: foobar +Moznosti: foobar +Možnosti: foobar +OH HAI: foobar +Omadus: foobar +Ominaisuus: foobar +Osobina: foobar +Özellik: foobar +perbogh: foobar +poQbogh malja': foobar +Potrzeba biznesowa: foobar +Požadavek: foobar +Požiadavka: foobar +Pretty much: foobar +Qap: foobar +Qu'meH 'ut: foobar +Savybė: foobar +Tính năng: foobar +Trajto: foobar +Vermoë: foobar +Vlastnosť: foobar +Właściwość: foobar +Značilnost: foobar +Δυνατότητα: foobar +Λειτουργία: foobar +Могућност: foobar +Мөмкинлек: foobar +Особина: foobar +Свойство: foobar +Үзенчәлеклелек: foobar +Функционал: foobar +Функционалност: foobar +Функция: foobar +Функціонал: foobar +תכונה: foobar +خاصية: foobar +خصوصیت: foobar +صلاحیت: foobar +کاروبار کی ضرورت: foobar +وِیژگی: foobar +रूप लेख: foobar +ਖਾਸੀਅਤ: foobar +ਨਕਸ਼ ਨੁਹਾਰ: foobar +ਮੁਹਾਂਦਰਾ: foobar +గుణము: foobar +ಹೆಚ್ಚಳ: foobar +ความต้องการทางธุรกิจ: foobar +ความสามารถ: foobar +โครงหลัก: foobar +기능: foobar +フィーチャ: foobar +功能: foobar +機能: foobar + +---------------------------------------------------- + +[ + ["feature", [["keyword", "Ability:"], ["important", " foobar"], "\r\nbaz\r\n"]], + ["feature", [["keyword", "Ahoy matey!:"]]], + ["feature", [["keyword", "Arwedd:"], ["important", " foobar"]]], + ["feature", [["keyword", "Aspekt:"], ["important", " foobar"]]], + ["feature", [["keyword", "Besigheid Behoefte:"], ["important", " foobar"]]], + ["feature", [["keyword", "Business Need:"], ["important", " foobar"]]], + ["feature", [["keyword", "Caracteristica:"], ["important", " foobar"]]], + ["feature", [["keyword", "Característica:"], ["important", " foobar"]]], + ["feature", [["keyword", "Egenskab:"], ["important", " foobar"]]], + ["feature", [["keyword", "Egenskap:"], ["important", " foobar"]]], + ["feature", [["keyword", "Eiginleiki:"], ["important", " foobar"]]], + ["feature", [["keyword", "Feature:"], ["important", " foobar"]]], + ["feature", [["keyword", "Fīča:"], ["important", " foobar"]]], + ["feature", [["keyword", "Fitur:"], ["important", " foobar"]]], + ["feature", [["keyword", "Fonctionnalité:"], ["important", " foobar"]]], + ["feature", [["keyword", "Fonksyonalite:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funcionalidade:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funcionalitat:"], ["important", " foobar"]]], + ["feature", [["keyword", "Functionalitate:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funcţionalitate:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funcționalitate:"], ["important", " foobar"]]], + ["feature", [["keyword", "Functionaliteit:"], ["important", " foobar"]]], + ["feature", [["keyword", "Fungsi:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funkcia:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funkcija:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funkcionalitāte:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funkcionalnost:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funkcja:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funksie:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funktionalität:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funktionalitéit:"], ["important", " foobar"]]], + ["feature", [["keyword", "Funzionalità:"], ["important", " foobar"]]], + ["feature", [["keyword", "Hwaet:"], ["important", " foobar"]]], + ["feature", [["keyword", "Hwæt:"], ["important", " foobar"]]], + ["feature", [["keyword", "Jellemző:"], ["important", " foobar"]]], + ["feature", [["keyword", "Karakteristik:"], ["important", " foobar"]]], + ["feature", [["keyword", "laH:"], ["important", " foobar"]]], + ["feature", [["keyword", "Lastnost:"], ["important", " foobar"]]], + ["feature", [["keyword", "Mak:"], ["important", " foobar"]]], + ["feature", [["keyword", "Mogucnost:"], ["important", " foobar"]]], + ["feature", [["keyword", "Mogućnost:"], ["important", " foobar"]]], + ["feature", [["keyword", "Moznosti:"], ["important", " foobar"]]], + ["feature", [["keyword", "Možnosti:"], ["important", " foobar"]]], + ["feature", [["keyword", "OH HAI:"], ["important", " foobar"]]], + ["feature", [["keyword", "Omadus:"], ["important", " foobar"]]], + ["feature", [["keyword", "Ominaisuus:"], ["important", " foobar"]]], + ["feature", [["keyword", "Osobina:"], ["important", " foobar"]]], + ["feature", [["keyword", "Özellik:"], ["important", " foobar"]]], + ["feature", [["keyword", "perbogh:"], ["important", " foobar"]]], + ["feature", [["keyword", "poQbogh malja':"], ["important", " foobar"]]], + ["feature", [["keyword", "Potrzeba biznesowa:"], ["important", " foobar"]]], + ["feature", [["keyword", "Požadavek:"], ["important", " foobar"]]], + ["feature", [["keyword", "Požiadavka:"], ["important", " foobar"]]], + ["feature", [["keyword", "Pretty much:"], ["important", " foobar"]]], + ["feature", [["keyword", "Qap:"], ["important", " foobar"]]], + ["feature", [["keyword", "Qu'meH 'ut:"], ["important", " foobar"]]], + ["feature", [["keyword", "Savybė:"], ["important", " foobar"]]], + ["feature", [["keyword", "Tính năng:"], ["important", " foobar"]]], + ["feature", [["keyword", "Trajto:"], ["important", " foobar"]]], + ["feature", [["keyword", "Vermoë:"], ["important", " foobar"]]], + ["feature", [["keyword", "Vlastnosť:"], ["important", " foobar"]]], + ["feature", [["keyword", "Właściwość:"], ["important", " foobar"]]], + ["feature", [["keyword", "Značilnost:"], ["important", " foobar"]]], + ["feature", [["keyword", "Δυνατότητα:"], ["important", " foobar"]]], + ["feature", [["keyword", "Λειτουργία:"], ["important", " foobar"]]], + ["feature", [["keyword", "Могућност:"], ["important", " foobar"]]], + ["feature", [["keyword", "Мөмкинлек:"], ["important", " foobar"]]], + ["feature", [["keyword", "Особина:"], ["important", " foobar"]]], + ["feature", [["keyword", "Свойство:"], ["important", " foobar"]]], + ["feature", [["keyword", "Үзенчәлеклелек:"], ["important", " foobar"]]], + ["feature", [["keyword", "Функционал:"], ["important", " foobar"]]], + ["feature", [["keyword", "Функционалност:"], ["important", " foobar"]]], + ["feature", [["keyword", "Функция:"], ["important", " foobar"]]], + ["feature", [["keyword", "Функціонал:"], ["important", " foobar"]]], + ["feature", [["keyword", "תכונה:"], ["important", " foobar"]]], + ["feature", [["keyword", "خاصية:"], ["important", " foobar"]]], + ["feature", [["keyword", "خصوصیت:"], ["important", " foobar"]]], + ["feature", [["keyword", "صلاحیت:"], ["important", " foobar"]]], + ["feature", [["keyword", "کاروبار کی ضرورت:"], ["important", " foobar"]]], + ["feature", [["keyword", "وِیژگی:"], ["important", " foobar"]]], + ["feature", [["keyword", "रूप लेख:"], ["important", " foobar"]]], + ["feature", [["keyword", "ਖਾਸੀਅਤ:"], ["important", " foobar"]]], + ["feature", [["keyword", "ਨਕਸ਼ ਨੁਹਾਰ:"], ["important", " foobar"]]], + ["feature", [["keyword", "ਮੁਹਾਂਦਰਾ:"], ["important", " foobar"]]], + ["feature", [["keyword", "గుణము:"], ["important", " foobar"]]], + ["feature", [["keyword", "ಹೆಚ್ಚಳ:"], ["important", " foobar"]]], + ["feature", [["keyword", "ความต้องการทางธุรกิจ:"], ["important", " foobar"]]], + ["feature", [["keyword", "ความสามารถ:"], ["important", " foobar"]]], + ["feature", [["keyword", "โครงหลัก:"], ["important", " foobar"]]], + ["feature", [["keyword", "기능:"], ["important", " foobar"]]], + ["feature", [["keyword", "フィーチャ:"], ["important", " foobar"]]], + ["feature", [["keyword", "功能:"], ["important", " foobar"]]], + ["feature", [["keyword", "機能:"], ["important", " foobar"]]] +] + +---------------------------------------------------- + +Checks for features in all languages. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/outline_feature.test b/docs/_style/prism-master/tests/languages/gherkin/outline_feature.test new file mode 100644 index 0000000000..19fc54f940 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/outline_feature.test @@ -0,0 +1,11 @@ + + +---------------------------------------------------- + +[ + ["outline", ""] +] + +---------------------------------------------------- + +Checks for single outlines. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/pystring_feature.test b/docs/_style/prism-master/tests/languages/gherkin/pystring_feature.test new file mode 100644 index 0000000000..17fd2b4d46 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/pystring_feature.test @@ -0,0 +1,20 @@ +""" +foo +bar +""" + +''' +foo +bar +''' + +---------------------------------------------------- + +[ + ["pystring", "\"\"\"\r\nfoo\r\nbar\r\n\"\"\""], + ["pystring", "'''\r\nfoo\r\nbar\r\n'''"] +] + +---------------------------------------------------- + +Checks for pystrings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/scenario_feature.test b/docs/_style/prism-master/tests/languages/gherkin/scenario_feature.test new file mode 100644 index 0000000000..0979c698c5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/scenario_feature.test @@ -0,0 +1,581 @@ +Abstract Scenario: foobar +Abstrakt Scenario: foobar +Achtergrond: foobar +Aer: foobar +Ær: foobar +Agtergrond: foobar +All y'all: foobar +Antecedentes: foobar +Antecedents: foobar +Atburðarás: foobar +Atburðarásir: foobar +Awww, look mate: foobar +B4: foobar +Background: foobar +Baggrund: foobar +Bakgrund: foobar +Bakgrunn: foobar +Bakgrunnur: foobar +Beispiele: foobar +Beispiller: foobar +Bối cảnh: foobar +Cefndir: foobar +Cenario: foobar +Cenário: foobar +Cenario de Fundo: foobar +Cenário de Fundo: foobar +Cenarios: foobar +Cenários: foobar +Contesto: foobar +Context: foobar +Contexte: foobar +Contexto: foobar +Conto: foobar +Contoh: foobar +Contone: foobar +Dæmi: foobar +Dasar: foobar +Dead men tell no tales: foobar +Delineacao do Cenario: foobar +Delineação do Cenário: foobar +Dis is what went down: foobar +Dữ liệu: foobar +Dyagram senaryo: foobar +Dyagram Senaryo: foobar +Egzanp: foobar +Ejemplos: foobar +Eksempler: foobar +Ekzemploj: foobar +Enghreifftiau: foobar +Esbozo do escenario: foobar +Escenari: foobar +Escenario: foobar +Esempi: foobar +Esquema de l'escenari: foobar +Esquema del escenario: foobar +Esquema do Cenario: foobar +Esquema do Cenário: foobar +Examples: foobar +EXAMPLZ: foobar +Exempel: foobar +Exemple: foobar +Exemples: foobar +Exemplos: foobar +First off: foobar +Fono: foobar +Forgatókönyv: foobar +Forgatókönyv vázlat: foobar +Fundo: foobar +Geçmiş: foobar +ghantoH: foobar +Grundlage: foobar +Hannergrond: foobar +Háttér: foobar +Heave to: foobar +Istorik: foobar +Juhtumid: foobar +Keadaan: foobar +Khung kịch bản: foobar +Khung tình huống: foobar +Kịch bản: foobar +Koncept: foobar +Konsep skenario: foobar +Kontèks: foobar +Kontekst: foobar +Kontekstas: foobar +Konteksts: foobar +Kontext: foobar +Konturo de la scenaro: foobar +Latar Belakang: foobar +lut: foobar +lut chovnatlh: foobar +lutmey: foobar +Lýsing Atburðarásar: foobar +Lýsing Dæma: foobar +Menggariskan Senario: foobar +MISHUN: foobar +MISHUN SRSLY: foobar +mo': foobar +Náčrt Scenára: foobar +Náčrt Scénáře: foobar +Náčrt Scenáru: foobar +Oris scenarija: foobar +Örnekler: foobar +Osnova: foobar +Osnova Scenára: foobar +Osnova scénáře: foobar +Osnutek: foobar +Ozadje: foobar +Paraugs: foobar +Pavyzdžiai: foobar +Példák: foobar +Piemēri: foobar +Plan du scénario: foobar +Plan du Scénario: foobar +Plan senaryo: foobar +Plan Senaryo: foobar +Plang vum Szenario: foobar +Pozadí: foobar +Pozadie: foobar +Pozadina: foobar +Príklady: foobar +Příklady: foobar +Primer: foobar +Primeri: foobar +Primjeri: foobar +Przykłady: foobar +Raamstsenaarium: foobar +Reckon it's like: foobar +Rerefons: foobar +Scenár: foobar +Scénář: foobar +Scenarie: foobar +Scenarij: foobar +Scenarijai: foobar +Scenarijaus šablonas: foobar +Scenariji: foobar +Scenārijs: foobar +Scenārijs pēc parauga: foobar +Scenarijus: foobar +Scenario: foobar +Scénario: foobar +Scenario Amlinellol: foobar +Scenario Outline: foobar +Scenario Template: foobar +Scenariomal: foobar +Scenariomall: foobar +Scenarios: foobar +Scenariu: foobar +Scenariusz: foobar +Scenaro: foobar +Schema dello scenario: foobar +Se ðe: foobar +Se the: foobar +Se þe: foobar +Senario: foobar +Senaryo: foobar +Senaryo deskripsyon: foobar +Senaryo Deskripsyon: foobar +Senaryo taslağı: foobar +Shiver me timbers: foobar +Situācija: foobar +Situai: foobar +Situasie: foobar +Situasie Uiteensetting: foobar +Skenario: foobar +Skenario konsep: foobar +Skica: foobar +Structura scenariu: foobar +Structură scenariu: foobar +Struktura scenarija: foobar +Stsenaarium: foobar +Swa: foobar +Swa hwaer swa: foobar +Swa hwær swa: foobar +Szablon scenariusza: foobar +Szenario: foobar +Szenariogrundriss: foobar +Tapaukset: foobar +Tapaus: foobar +Tapausaihio: foobar +Taust: foobar +Tausta: foobar +Template Keadaan: foobar +Template Senario: foobar +Template Situai: foobar +The thing of it is: foobar +Tình huống: foobar +Variantai: foobar +Voorbeelde: foobar +Voorbeelden: foobar +Wharrimean is: foobar +Yo-ho-ho: foobar +You'll wanna: foobar +Założenia: foobar +Παραδείγματα: foobar +Περιγραφή Σεναρίου: foobar +Σενάρια: foobar +Σενάριο: foobar +Υπόβαθρο: foobar +Кереш: foobar +Контекст: foobar +Концепт: foobar +Мисаллар: foobar +Мисоллар: foobar +Основа: foobar +Передумова: foobar +Позадина: foobar +Предистория: foobar +Предыстория: foobar +Приклади: foobar +Пример: foobar +Примери: foobar +Примеры: foobar +Рамка на сценарий: foobar +Скица: foobar +Структура сценарија: foobar +Структура сценария: foobar +Структура сценарію: foobar +Сценарий: foobar +Сценарий структураси: foobar +Сценарийның төзелеше: foobar +Сценарији: foobar +Сценарио: foobar +Сценарій: foobar +Тарих: foobar +Үрнәкләр: foobar +דוגמאות: foobar +רקע: foobar +תבנית תרחיש: foobar +תרחיש: foobar +الخلفية: foobar +الگوی سناریو: foobar +امثلة: foobar +پس منظر: foobar +زمینه: foobar +سناریو: foobar +سيناريو: foobar +سيناريو مخطط: foobar +مثالیں: foobar +منظر نامے کا خاکہ: foobar +منظرنامہ: foobar +نمونه ها: foobar +उदाहरण: foobar +परिदृश्य: foobar +परिदृश्य रूपरेखा: foobar +पृष्ठभूमि: foobar +ਉਦਾਹਰਨਾਂ: foobar +ਪਟਕਥਾ: foobar +ਪਟਕਥਾ ਢਾਂਚਾ: foobar +ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ: foobar +ਪਿਛੋਕੜ: foobar +ఉదాహరణలు: foobar +కథనం: foobar +నేపథ్యం: foobar +సన్నివేశం: foobar +ಉದಾಹರಣೆಗಳು: foobar +ಕಥಾಸಾರಾಂಶ: foobar +ವಿವರಣೆ: foobar +ಹಿನ್ನೆಲೆ: foobar +โครงสร้างของเหตุการณ์: foobar +ชุดของตัวอย่าง: foobar +ชุดของเหตุการณ์: foobar +แนวคิด: foobar +สรุปเหตุการณ์: foobar +เหตุการณ์: foobar +배경: foobar +시나리오: foobar +시나리오 개요: foobar +예: foobar +サンプル: foobar +シナリオ: foobar +シナリオアウトライン: foobar +シナリオテンプレ: foobar +シナリオテンプレート: foobar +テンプレ: foobar +例: foobar +例子: foobar +剧本: foobar +剧本大纲: foobar +劇本: foobar +劇本大綱: foobar +场景: foobar +场景大纲: foobar +場景: foobar +場景大綱: foobar +背景: foobar + +---------------------------------------------------- + +[ + ["scenario", [["keyword", "Abstract Scenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Abstrakt Scenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Achtergrond:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Aer:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Ær:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Agtergrond:"], ["important", " foobar"]]], + ["scenario", [["keyword", "All y'all:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Antecedentes:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Antecedents:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Atburðarás:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Atburðarásir:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Awww, look mate:"], ["important", " foobar"]]], + ["scenario", [["keyword", "B4:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Background:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Baggrund:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Bakgrund:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Bakgrunn:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Bakgrunnur:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Beispiele:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Beispiller:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Bối cảnh:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cefndir:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenário:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenario de Fundo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenário de Fundo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenarios:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Cenários:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Contesto:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Context:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Contexte:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Contexto:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Conto:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Contoh:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Contone:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dæmi:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dasar:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dead men tell no tales:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Delineacao do Cenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Delineação do Cenário:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dis is what went down:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dữ liệu:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dyagram senaryo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Dyagram Senaryo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Egzanp:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Ejemplos:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Eksempler:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Ekzemploj:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Enghreifftiau:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esbozo do escenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Escenari:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Escenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esempi:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esquema de l'escenari:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esquema del escenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esquema do Cenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Esquema do Cenário:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Examples:"], ["important", " foobar"]]], + ["scenario", [["keyword", "EXAMPLZ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Exempel:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Exemple:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Exemples:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Exemplos:"], ["important", " foobar"]]], + ["scenario", [["keyword", "First off:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Fono:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Forgatókönyv:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Forgatókönyv vázlat:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Fundo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Geçmiş:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ghantoH:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Grundlage:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Hannergrond:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Háttér:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Heave to:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Istorik:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Juhtumid:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Keadaan:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Khung kịch bản:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Khung tình huống:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Kịch bản:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Koncept:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Konsep skenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Kontèks:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Kontekst:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Kontekstas:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Konteksts:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Kontext:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Konturo de la scenaro:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Latar Belakang:"], ["important", " foobar"]]], + ["scenario", [["keyword", "lut:"], ["important", " foobar"]]], + ["scenario", [["keyword", "lut chovnatlh:"], ["important", " foobar"]]], + ["scenario", [["keyword", "lutmey:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Lýsing Atburðarásar:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Lýsing Dæma:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Menggariskan Senario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "MISHUN:"], ["important", " foobar"]]], + ["scenario", [["keyword", "MISHUN SRSLY:"], ["important", " foobar"]]], + ["scenario", [["keyword", "mo':"], ["important", " foobar"]]], + ["scenario", [["keyword", "Náčrt Scenára:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Náčrt Scénáře:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Náčrt Scenáru:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Oris scenarija:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Örnekler:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Osnova:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Osnova Scenára:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Osnova scénáře:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Osnutek:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Ozadje:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Paraugs:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Pavyzdžiai:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Példák:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Piemēri:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Plan du scénario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Plan du Scénario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Plan senaryo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Plan Senaryo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Plang vum Szenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Pozadí:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Pozadie:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Pozadina:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Príklady:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Příklady:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Primer:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Primeri:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Primjeri:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Przykłady:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Raamstsenaarium:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Reckon it's like:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Rerefons:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenár:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scénář:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarie:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarij:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarijai:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarijaus šablonas:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenariji:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenārijs:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenārijs pēc parauga:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarijus:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scénario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenario Amlinellol:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenario Outline:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenario Template:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenariomal:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenariomall:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenarios:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenariu:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenariusz:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Scenaro:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Schema dello scenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Se ðe:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Se the:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Se þe:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Senario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Senaryo:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Senaryo deskripsyon:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Senaryo Deskripsyon:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Senaryo taslağı:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Shiver me timbers:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Situācija:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Situai:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Situasie:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Situasie Uiteensetting:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Skenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Skenario konsep:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Skica:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Structura scenariu:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Structură scenariu:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Struktura scenarija:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Stsenaarium:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Swa:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Swa hwaer swa:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Swa hwær swa:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Szablon scenariusza:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Szenario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Szenariogrundriss:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Tapaukset:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Tapaus:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Tapausaihio:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Taust:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Tausta:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Template Keadaan:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Template Senario:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Template Situai:"], ["important", " foobar"]]], + ["scenario", [["keyword", "The thing of it is:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Tình huống:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Variantai:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Voorbeelde:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Voorbeelden:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Wharrimean is:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Yo-ho-ho:"], ["important", " foobar"]]], + ["scenario", [["keyword", "You'll wanna:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Założenia:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Παραδείγματα:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Περιγραφή Σεναρίου:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Σενάρια:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Σενάριο:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Υπόβαθρο:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Кереш:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Контекст:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Концепт:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Мисаллар:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Мисоллар:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Основа:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Передумова:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Позадина:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Предистория:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Предыстория:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Приклади:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Пример:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Примери:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Примеры:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Рамка на сценарий:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Скица:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Структура сценарија:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Структура сценария:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Структура сценарію:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарий:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарий структураси:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарийның төзелеше:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарији:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарио:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Сценарій:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Тарих:"], ["important", " foobar"]]], + ["scenario", [["keyword", "Үрнәкләр:"], ["important", " foobar"]]], + ["scenario", [["keyword", "דוגמאות:"], ["important", " foobar"]]], + ["scenario", [["keyword", "רקע:"], ["important", " foobar"]]], + ["scenario", [["keyword", "תבנית תרחיש:"], ["important", " foobar"]]], + ["scenario", [["keyword", "תרחיש:"], ["important", " foobar"]]], + ["scenario", [["keyword", "الخلفية:"], ["important", " foobar"]]], + ["scenario", [["keyword", "الگوی سناریو:"], ["important", " foobar"]]], + ["scenario", [["keyword", "امثلة:"], ["important", " foobar"]]], + ["scenario", [["keyword", "پس منظر:"], ["important", " foobar"]]], + ["scenario", [["keyword", "زمینه:"], ["important", " foobar"]]], + ["scenario", [["keyword", "سناریو:"], ["important", " foobar"]]], + ["scenario", [["keyword", "سيناريو:"], ["important", " foobar"]]], + ["scenario", [["keyword", "سيناريو مخطط:"], ["important", " foobar"]]], + ["scenario", [["keyword", "مثالیں:"], ["important", " foobar"]]], + ["scenario", [["keyword", "منظر نامے کا خاکہ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "منظرنامہ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "نمونه ها:"], ["important", " foobar"]]], + ["scenario", [["keyword", "उदाहरण:"], ["important", " foobar"]]], + ["scenario", [["keyword", "परिदृश्य:"], ["important", " foobar"]]], + ["scenario", [["keyword", "परिदृश्य रूपरेखा:"], ["important", " foobar"]]], + ["scenario", [["keyword", "पृष्ठभूमि:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ਉਦਾਹਰਨਾਂ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ਪਟਕਥਾ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ਪਟਕਥਾ ਢਾਂਚਾ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ਪਿਛੋਕੜ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ఉదాహరణలు:"], ["important", " foobar"]]], + ["scenario", [["keyword", "కథనం:"], ["important", " foobar"]]], + ["scenario", [["keyword", "నేపథ్యం:"], ["important", " foobar"]]], + ["scenario", [["keyword", "సన్నివేశం:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ಉದಾಹರಣೆಗಳು:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ಕಥಾಸಾರಾಂಶ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ವಿವರಣೆ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ಹಿನ್ನೆಲೆ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "โครงสร้างของเหตุการณ์:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ชุดของตัวอย่าง:"], ["important", " foobar"]]], + ["scenario", [["keyword", "ชุดของเหตุการณ์:"], ["important", " foobar"]]], + ["scenario", [["keyword", "แนวคิด:"], ["important", " foobar"]]], + ["scenario", [["keyword", "สรุปเหตุการณ์:"], ["important", " foobar"]]], + ["scenario", [["keyword", "เหตุการณ์:"], ["important", " foobar"]]], + ["scenario", [["keyword", "배경:"], ["important", " foobar"]]], + ["scenario", [["keyword", "시나리오:"], ["important", " foobar"]]], + ["scenario", [["keyword", "시나리오 개요:"], ["important", " foobar"]]], + ["scenario", [["keyword", "예:"], ["important", " foobar"]]], + ["scenario", [["keyword", "サンプル:"], ["important", " foobar"]]], + ["scenario", [["keyword", "シナリオ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "シナリオアウトライン:"], ["important", " foobar"]]], + ["scenario", [["keyword", "シナリオテンプレ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "シナリオテンプレート:"], ["important", " foobar"]]], + ["scenario", [["keyword", "テンプレ:"], ["important", " foobar"]]], + ["scenario", [["keyword", "例:"], ["important", " foobar"]]], + ["scenario", [["keyword", "例子:"], ["important", " foobar"]]], + ["scenario", [["keyword", "剧本:"], ["important", " foobar"]]], + ["scenario", [["keyword", "剧本大纲:"], ["important", " foobar"]]], + ["scenario", [["keyword", "劇本:"], ["important", " foobar"]]], + ["scenario", [["keyword", "劇本大綱:"], ["important", " foobar"]]], + ["scenario", [["keyword", "场景:"], ["important", " foobar"]]], + ["scenario", [["keyword", "场景大纲:"], ["important", " foobar"]]], + ["scenario", [["keyword", "場景:"], ["important", " foobar"]]], + ["scenario", [["keyword", "場景大綱:"], ["important", " foobar"]]], + ["scenario", [["keyword", "背景:"], ["important", " foobar"]]] +] + +---------------------------------------------------- + +Checks for scenarios in all languages. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/string_feature.test b/docs/_style/prism-master/tests/languages/gherkin/string_feature.test new file mode 100644 index 0000000000..bcb152f788 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/string_feature.test @@ -0,0 +1,29 @@ +"" +"foobar" +"foobaz" +'' +'foobar' +'foobaz' + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["\"foobar\""]], + ["string", [ + "\"foo", + ["outline", ""], + "baz\"" + ]], + ["string", ["''"]], + ["string", ["'foobar'"]], + ["string", [ + "'foo", + ["outline", ""], + "baz'" + ]] +] + +---------------------------------------------------- + +Checks for double-quoted and single-quoted strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/table_feature.test b/docs/_style/prism-master/tests/languages/gherkin/table_feature.test new file mode 100644 index 0000000000..00eaef858c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/table_feature.test @@ -0,0 +1,40 @@ +Examples: foo +| start | eat | left | +| | 5 | 7 | + | 20 | 5 | 15 | + +---------------------------------------------------- + +[ + ["scenario", [["keyword", "Examples:"], ["important", " foo"]]], + ["table-head", [ + ["punctuation", "|"], + ["th", " start "], + ["punctuation", "|"], + ["th", " eat "], + ["punctuation", "|"], + ["th", " left "], + ["punctuation", "|"] + ]], + ["table-body", [ + ["punctuation", "|"], + ["outline", ""], + ["punctuation", "|"], + ["td", " 5 "], + ["punctuation", "|"], + ["td", " 7 "], + ["punctuation", "|"], + + ["punctuation", "|"], + ["td", " 20 "], + ["punctuation", "|"], + ["td", " 5 "], + ["punctuation", "|"], + ["td", " 15 "], + ["punctuation", "|"] + ]] +] + +---------------------------------------------------- + +Checks for table heads and table bodies. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/gherkin/tag_feature.test b/docs/_style/prism-master/tests/languages/gherkin/tag_feature.test new file mode 100644 index 0000000000..51026ea1b1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/gherkin/tag_feature.test @@ -0,0 +1,17 @@ +@important +@billing @bicker @annoy + @foo + +---------------------------------------------------- + +[ + ["tag", "@important"], + ["tag", "@billing"], + ["tag", "@bicker"], + ["tag", "@annoy"], + ["tag", "@foo"] +] + +---------------------------------------------------- + +Checks for tags. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/command_feature.test b/docs/_style/prism-master/tests/languages/git/command_feature.test new file mode 100644 index 0000000000..488f0be392 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/command_feature.test @@ -0,0 +1,15 @@ +$ git add file.txt +foo@foobar ~ $ git diff --cached +$ git log -p -i + +---------------------------------------------------- + +[ + ["command", ["$ git add file.txt"]], + ["command", ["foo@foobar ~ $ git diff", ["parameter", " --cached"]]], + ["command", ["$ git log", ["parameter", " -p"], ["parameter", " -i"]]] +] + +---------------------------------------------------- + +Checks for git commands, with and without parameters. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/comment_feature.test b/docs/_style/prism-master/tests/languages/git/comment_feature.test new file mode 100644 index 0000000000..c3d0358e78 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/comment_feature.test @@ -0,0 +1,17 @@ +# On branch gh-pages +# Changes to be committed: +# (use "git reset HEAD ..." to unstage) +# + +---------------------------------------------------- + +[ + ["comment", "# On branch gh-pages"], + ["comment", "# Changes to be committed:"], + ["comment", "# (use \"git reset HEAD ...\" to unstage)"], + ["comment", "#"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/commit_sha1_feature.test b/docs/_style/prism-master/tests/languages/git/commit_sha1_feature.test new file mode 100644 index 0000000000..fbc58ed2bd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/commit_sha1_feature.test @@ -0,0 +1,15 @@ +commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09 +commit 87edc4ad8c71b95f6e46f736eb98b742859abd95 +commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d + +---------------------------------------------------- + +[ + ["commit_sha1", "commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09"], + ["commit_sha1", "commit 87edc4ad8c71b95f6e46f736eb98b742859abd95"], + ["commit_sha1", "commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d"] +] + +---------------------------------------------------- + +Checks for commit SHA1. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/coord_feature.test b/docs/_style/prism-master/tests/languages/git/coord_feature.test new file mode 100644 index 0000000000..8d8c5e2b48 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/coord_feature.test @@ -0,0 +1,13 @@ +@@ -1 +1,2 @@ +@@@ -98,20 -98,12 +98,20 @@@ + +---------------------------------------------------- + +[ + ["coord", "@@ -1 +1,2 @@"], + ["coord", "@@@ -98,20 -98,12 +98,20 @@@"] +] + +---------------------------------------------------- + +Checks for coords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/diff_feature.test b/docs/_style/prism-master/tests/languages/git/diff_feature.test new file mode 100644 index 0000000000..b93fb1812c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/diff_feature.test @@ -0,0 +1,31 @@ +-Here's my tetx file ++Here's my text file ++And this is the second line + +––– a/web/js/lazy.js ++++ b/web/js/lazy.js + +- if (url !== null && url !== '' && typeof url !== 'undefined') { ++ if (url === null || url === '' || typeof url === 'undefined') { ++ return; ++ } ++ + +---------------------------------------------------- + +[ + ["deleted", "-Here's my tetx file"], + ["inserted", "+Here's my text file"], + ["inserted", "+And this is the second line"], + ["deleted", "––– a/web/js/lazy.js"], + ["inserted", "+++ b/web/js/lazy.js"], + ["deleted", "- if (url !== null && url !== '' && typeof url !== 'undefined') {"], + ["inserted", "+ if (url === null || url === '' || typeof url === 'undefined') {"], + ["inserted", "+ return;"], + ["inserted", "+ }"], + ["inserted", "+"] +] + +---------------------------------------------------- + +Checks for inserted and deleted lines in git diff output. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/git/string_feature.test b/docs/_style/prism-master/tests/languages/git/string_feature.test new file mode 100644 index 0000000000..ebff3bf525 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/git/string_feature.test @@ -0,0 +1,17 @@ +"" +"foo" +'' +'bar' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "''"], + ["string", "'bar'"] +] + +---------------------------------------------------- + +Checks for double-quoted and single-quoted strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/glsl/comment_feature.test b/docs/_style/prism-master/tests/languages/glsl/comment_feature.test new file mode 100644 index 0000000000..b45a6bd5c8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/glsl/comment_feature.test @@ -0,0 +1,21 @@ +/**/ +/* foo +bar */ +// +// foo +// foo\ +bar + +---------------------------------------------------- + +[ + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"], + ["comment", "//"], + ["comment", "// foo"], + ["comment", "// foo\\\r\nbar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/glsl/keyword_feature.test b/docs/_style/prism-master/tests/languages/glsl/keyword_feature.test new file mode 100644 index 0000000000..e07768ca17 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/glsl/keyword_feature.test @@ -0,0 +1,263 @@ +attribute +const +uniform +varying +buffer +shared +coherent +volatile +restrict +readonly +writeonly +atomic_uint +layout +centroid +flat +smooth +noperspective +patch +sample +break +continue +do +for +while +switch +case +default +if +else +subroutine +in +out +inout +float +double +int +void +bool +true +false +invariant +precise +discard +return +mat2 mat3 mat4 +mat2x2 mat2x3 mat2x4 +mat3x2 mat3x3 mat3x4 +mat4x2 mat4x3 mat4x4 +dmat2 dmat3 dmat4 +dmat2x2 dmat2x3 dmat2x4 +dmat3x2 dmat3x3 dmat3x4 +dmat4x2 dmat4x3 dmat4x4 +vec2 vec3 vec4 +ivec2 ivec3 ivec4 +bvec2 bvec3 bvec4 +dvec2 dvec3 dvec4 +uvec2 uvec3 uvec4 +uint +lowp +mediump +highp +precision +sampler1D sampler2D sampler3D +isampler1D isampler2D isampler3D +usampler1D usampler2D usampler3D +samplerCube isamplerCube usamplerCube +sampler1DShadow sampler2DShadow +samplerCubeShadow +sampler1DArray sampler2DArray +isampler1DArray isampler2DArray +usampler1DArray usampler2DArray +sampler1DArrayShadow sampler2DArrayShadow +sampler2DRect isampler2DRect usampler2DRect +sampler2DRectShadow +samplerBuffer isamplerBuffer usamplerBuffer +sampler2DMS isampler2DMS usampler2DMS +sampler2DMSArray isampler2DMSArray usampler2DMSArray +samplerCubeArray isamplerCubeArray usamplerCubeArray +samplerCubeArrayShadow +image1D image2D image3D +iimage1D iimage2D iimage3D +uimage1D uimage2D uimage3D +image2DRect iimage2DRect uimage2DRect +imageCube iimageCube uimageCube +imageBuffer iimageBuffer uimageBuffer +image1DArray image2DArray +iimage1DArray iimage2DArray +uimage1DArray uimage2DArray +imageCubeArray iimageCubeArray uimageCubeArray +image2DMS iimage2DMS uimage2DMS +image2DMSArray iimage2DMSArray uimage2DMSArray +struct +common +partition +active +asm +class; +union +enum +typedef +template +this +resource +goto +inline +noinline +public +static +extern +external +interface; +long +short +half +fixed +unsigned +superp +input +output +hvec2 hvec3 hvec4 +fvec2 fvec3 fvec4 +sampler3DRect +filter +sizeof +cast +namespace +using + +---------------------------------------------------- + +[ + ["keyword", "attribute"], + ["keyword", "const"], + ["keyword", "uniform"], + ["keyword", "varying"], + ["keyword", "buffer"], + ["keyword", "shared"], + ["keyword", "coherent"], + ["keyword", "volatile"], + ["keyword", "restrict"], + ["keyword", "readonly"], + ["keyword", "writeonly"], + ["keyword", "atomic_uint"], + ["keyword", "layout"], + ["keyword", "centroid"], + ["keyword", "flat"], + ["keyword", "smooth"], + ["keyword", "noperspective"], + ["keyword", "patch"], + ["keyword", "sample"], + ["keyword", "break"], + ["keyword", "continue"], + ["keyword", "do"], + ["keyword", "for"], + ["keyword", "while"], + ["keyword", "switch"], + ["keyword", "case"], + ["keyword", "default"], + ["keyword", "if"], + ["keyword", "else"], + ["keyword", "subroutine"], + ["keyword", "in"], + ["keyword", "out"], + ["keyword", "inout"], + ["keyword", "float"], + ["keyword", "double"], + ["keyword", "int"], + ["keyword", "void"], + ["keyword", "bool"], + ["keyword", "true"], + ["keyword", "false"], + ["keyword", "invariant"], + ["keyword", "precise"], + ["keyword", "discard"], + ["keyword", "return"], + ["keyword", "mat2"], ["keyword", "mat3"], ["keyword", "mat4"], + ["keyword", "mat2x2"], ["keyword", "mat2x3"], ["keyword", "mat2x4"], + ["keyword", "mat3x2"], ["keyword", "mat3x3"], ["keyword", "mat3x4"], + ["keyword", "mat4x2"], ["keyword", "mat4x3"], ["keyword", "mat4x4"], + ["keyword", "dmat2"], ["keyword", "dmat3"], ["keyword", "dmat4"], + ["keyword", "dmat2x2"], ["keyword", "dmat2x3"], ["keyword", "dmat2x4"], + ["keyword", "dmat3x2"], ["keyword", "dmat3x3"], ["keyword", "dmat3x4"], + ["keyword", "dmat4x2"], ["keyword", "dmat4x3"], ["keyword", "dmat4x4"], + ["keyword", "vec2"], ["keyword", "vec3"], ["keyword", "vec4"], + ["keyword", "ivec2"], ["keyword", "ivec3"], ["keyword", "ivec4"], + ["keyword", "bvec2"], ["keyword", "bvec3"], ["keyword", "bvec4"], + ["keyword", "dvec2"], ["keyword", "dvec3"], ["keyword", "dvec4"], + ["keyword", "uvec2"], ["keyword", "uvec3"], ["keyword", "uvec4"], + ["keyword", "uint"], + ["keyword", "lowp"], + ["keyword", "mediump"], + ["keyword", "highp"], + ["keyword", "precision"], + ["keyword", "sampler1D"], ["keyword", "sampler2D"], ["keyword", "sampler3D"], + ["keyword", "isampler1D"], ["keyword", "isampler2D"], ["keyword", "isampler3D"], + ["keyword", "usampler1D"], ["keyword", "usampler2D"], ["keyword", "usampler3D"], + ["keyword", "samplerCube"], ["keyword", "isamplerCube"], ["keyword", "usamplerCube"], + ["keyword", "sampler1DShadow"], ["keyword", "sampler2DShadow"], + ["keyword", "samplerCubeShadow"], + ["keyword", "sampler1DArray"], ["keyword", "sampler2DArray"], + ["keyword", "isampler1DArray"], ["keyword", "isampler2DArray"], + ["keyword", "usampler1DArray"], ["keyword", "usampler2DArray"], + ["keyword", "sampler1DArrayShadow"], ["keyword", "sampler2DArrayShadow"], + ["keyword", "sampler2DRect"], ["keyword", "isampler2DRect"], ["keyword", "usampler2DRect"], + ["keyword", "sampler2DRectShadow"], + ["keyword", "samplerBuffer"], ["keyword", "isamplerBuffer"], ["keyword", "usamplerBuffer"], + ["keyword", "sampler2DMS"], ["keyword", "isampler2DMS"], ["keyword", "usampler2DMS"], + ["keyword", "sampler2DMSArray"], ["keyword", "isampler2DMSArray"], ["keyword", "usampler2DMSArray"], + ["keyword", "samplerCubeArray"], ["keyword", "isamplerCubeArray"], ["keyword", "usamplerCubeArray"], + ["keyword", "samplerCubeArrayShadow"], + ["keyword", "image1D"], ["keyword", "image2D"], ["keyword", "image3D"], + ["keyword", "iimage1D"], ["keyword", "iimage2D"], ["keyword", "iimage3D"], + ["keyword", "uimage1D"], ["keyword", "uimage2D"], ["keyword", "uimage3D"], + ["keyword", "image2DRect"], ["keyword", "iimage2DRect"], ["keyword", "uimage2DRect"], + ["keyword", "imageCube"], ["keyword", "iimageCube"], ["keyword", "uimageCube"], + ["keyword", "imageBuffer"], ["keyword", "iimageBuffer"], ["keyword", "uimageBuffer"], + ["keyword", "image1DArray"], ["keyword", "image2DArray"], + ["keyword", "iimage1DArray"], ["keyword", "iimage2DArray"], + ["keyword", "uimage1DArray"], ["keyword", "uimage2DArray"], + ["keyword", "imageCubeArray"], ["keyword", "iimageCubeArray"], ["keyword", "uimageCubeArray"], + ["keyword", "image2DMS"], ["keyword", "iimage2DMS"], ["keyword", "uimage2DMS"], + ["keyword", "image2DMSArray"], ["keyword", "iimage2DMSArray"], ["keyword", "uimage2DMSArray"], + ["keyword", "struct"], + ["keyword", "common"], + ["keyword", "partition"], + ["keyword", "active"], + ["keyword", "asm"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "union"], + ["keyword", "enum"], + ["keyword", "typedef"], + ["keyword", "template"], + ["keyword", "this"], + ["keyword", "resource"], + ["keyword", "goto"], + ["keyword", "inline"], + ["keyword", "noinline"], + ["keyword", "public"], + ["keyword", "static"], + ["keyword", "extern"], + ["keyword", "external"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "long"], + ["keyword", "short"], + ["keyword", "half"], + ["keyword", "fixed"], + ["keyword", "unsigned"], + ["keyword", "superp"], + ["keyword", "input"], + ["keyword", "output"], + ["keyword", "hvec2"], ["keyword", "hvec3"], ["keyword", "hvec4"], + ["keyword", "fvec2"], ["keyword", "fvec3"], ["keyword", "fvec4"], + ["keyword", "sampler3DRect"], + ["keyword", "filter"], + ["keyword", "sizeof"], + ["keyword", "cast"], + ["keyword", "namespace"], + ["keyword", "using"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/glsl/number_feature.test b/docs/_style/prism-master/tests/languages/glsl/number_feature.test new file mode 100644 index 0000000000..20ac4d1109 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/glsl/number_feature.test @@ -0,0 +1,31 @@ +0xBadFace +42 +3.14159 +3e8 +3.6e-7 +4.7E+12 +4u +42U +3.1l +42f +2.0LF + +---------------------------------------------------- + +[ + ["number", "0xBadFace"], + ["number", "42"], + ["number", "3.14159"], + ["number", "3e8"], + ["number", "3.6e-7"], + ["number", "4.7E+12"], + ["number", "4u"], + ["number", "42U"], + ["number", "3.1l"], + ["number", "42f"], + ["number", "2.0LF"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/glsl/preprocessor_feature.test b/docs/_style/prism-master/tests/languages/glsl/preprocessor_feature.test new file mode 100644 index 0000000000..a720d35063 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/glsl/preprocessor_feature.test @@ -0,0 +1,35 @@ +#define +#undef +#if +#ifdef +#ifndef +#else +#elif +#endif +#error +#pragma +#extension +#version +#line + +---------------------------------------------------- + +[ + ["preprocessor", "#define"], + ["preprocessor", "#undef"], + ["preprocessor", "#if"], + ["preprocessor", "#ifdef"], + ["preprocessor", "#ifndef"], + ["preprocessor", "#else"], + ["preprocessor", "#elif"], + ["preprocessor", "#endif"], + ["preprocessor", "#error"], + ["preprocessor", "#pragma"], + ["preprocessor", "#extension"], + ["preprocessor", "#version"], + ["preprocessor", "#line"] +] + +---------------------------------------------------- + +Checks for preprocessor instructions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/boolean_feature.test b/docs/_style/prism-master/tests/languages/go/boolean_feature.test new file mode 100644 index 0000000000..1ee1192625 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/boolean_feature.test @@ -0,0 +1,19 @@ +_ +iota +nil +true +false + +---------------------------------------------------- + +[ + ["boolean", "_"], + ["boolean", "iota"], + ["boolean", "nil"], + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for all boolean values. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/builtin_feature.test b/docs/_style/prism-master/tests/languages/go/builtin_feature.test new file mode 100644 index 0000000000..414018fe02 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/builtin_feature.test @@ -0,0 +1,79 @@ +bool +byte +complex64 +complex128 +error +float32 +float64 +rune +string +int +int8 +int16 +int32 +int64 +uint +uint8 +uint16 +uint32 +uint64 +uintptr +append +cap +close +complex +copy +delete +imag +len +make +new +panic +print +println +real +recover + +---------------------------------------------------- + +[ + ["builtin", "bool"], + ["builtin", "byte"], + ["builtin", "complex64"], + ["builtin", "complex128"], + ["builtin", "error"], + ["builtin", "float32"], + ["builtin", "float64"], + ["builtin", "rune"], + ["builtin", "string"], + ["builtin", "int"], + ["builtin", "int8"], + ["builtin", "int16"], + ["builtin", "int32"], + ["builtin", "int64"], + ["builtin", "uint"], + ["builtin", "uint8"], + ["builtin", "uint16"], + ["builtin", "uint32"], + ["builtin", "uint64"], + ["builtin", "uintptr"], + ["builtin", "append"], + ["builtin", "cap"], + ["builtin", "close"], + ["builtin", "complex"], + ["builtin", "copy"], + ["builtin", "delete"], + ["builtin", "imag"], + ["builtin", "len"], + ["builtin", "make"], + ["builtin", "new"], + ["builtin", "panic"], + ["builtin", "print"], + ["builtin", "println"], + ["builtin", "real"], + ["builtin", "recover"] +] + +---------------------------------------------------- + +Checks for all builtins. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/keyword_feature.test b/docs/_style/prism-master/tests/languages/go/keyword_feature.test new file mode 100644 index 0000000000..a2799f73f1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/keyword_feature.test @@ -0,0 +1,59 @@ +break +case +chan +const +continue +default +defer +else +fallthrough +for +func +go +goto +if +import +interface +map +package +range +return +select +struct +switch +type +var + +---------------------------------------------------- + +[ + ["keyword", "break"], + ["keyword", "case"], + ["keyword", "chan"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "default"], + ["keyword", "defer"], + ["keyword", "else"], + ["keyword", "fallthrough"], + ["keyword", "for"], + ["keyword", "func"], + ["keyword", "go"], + ["keyword", "goto"], + ["keyword", "if"], + ["keyword", "import"], + ["keyword", "interface"], + ["keyword", "map"], + ["keyword", "package"], + ["keyword", "range"], + ["keyword", "return"], + ["keyword", "select"], + ["keyword", "struct"], + ["keyword", "switch"], + ["keyword", "type"], + ["keyword", "var"] +] + +---------------------------------------------------- + +Checks for all keywords \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/number_feature.test b/docs/_style/prism-master/tests/languages/go/number_feature.test new file mode 100644 index 0000000000..f21b3e8750 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/number_feature.test @@ -0,0 +1,43 @@ +42 +0600 +0xBadFace +170141183460469231731687303715884105727 +72.40 +072.40 +2.71828 +1.e+0 +6.67428e-11 +1E6 +0i +011i +0.i +2.71828i +1.e+0i +6.67428e-11i +1E6i + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0600"], + ["number", "0xBadFace"], + ["number", "170141183460469231731687303715884105727"], + ["number", "72.40"], + ["number", "072.40"], + ["number", "2.71828"], + ["number", "1.e+0"], + ["number", "6.67428e-11"], + ["number", "1E6"], + ["number", "0i"], + ["number", "011i"], + ["number", "0.i"], + ["number", "2.71828i"], + ["number", "1.e+0i"], + ["number", "6.67428e-11i"], + ["number", "1E6i"] +] + +---------------------------------------------------- + +Checks for integers, floats and imaginary numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/operator_feature.test b/docs/_style/prism-master/tests/languages/go/operator_feature.test new file mode 100644 index 0000000000..cda538614a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/operator_feature.test @@ -0,0 +1,27 @@ +* / % ^ ! = +*= /= %= ^= != == ++ += ++ +- -= -- +| |= || +& &= && &^ &^= +> >> >>= >= +< << <<= <= <- +:= ... + +---------------------------------------------------- + +[ + ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "^"], ["operator", "!"], ["operator", "="], + ["operator", "*="], ["operator", "/="], ["operator", "%="], ["operator", "^="], ["operator", "!="], ["operator", "=="], + ["operator", "+"], ["operator", "+="], ["operator", "++"], + ["operator", "-"], ["operator", "-="], ["operator", "--"], + ["operator", "|"], ["operator", "|="], ["operator", "||"], + ["operator", "&"], ["operator", "&="], ["operator", "&&"], ["operator", "&^"], ["operator", "&^="], + ["operator", ">"], ["operator", ">>"], ["operator", ">>="], ["operator", ">="], + ["operator", "<"], ["operator", "<<"], ["operator", "<<="], ["operator", "<="], ["operator", "<-"], + ["operator", ":="], ["operator", "..."] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/go/string_feature.test b/docs/_style/prism-master/tests/languages/go/string_feature.test new file mode 100644 index 0000000000..97e3960b72 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/go/string_feature.test @@ -0,0 +1,37 @@ +'a' +'ä' +'本' +'\t' +'\xff' +'\u12e4' + +`abc` +`\n +\n` +"\n" +"\"" +"Hello, world!\n" +"日本語" +"\xff\u00FF" + +---------------------------------------------------- + +[ + ["string", "'a'"], + ["string", "'ä'"], + ["string", "'本'"], + ["string", "'\\t'"], + ["string", "'\\xff'"], + ["string", "'\\u12e4'"], + ["string", "`abc`"], + ["string", "`\\n\r\n\\n`"], + ["string", "\"\\n\""], + ["string", "\"\\\"\""], + ["string", "\"Hello, world!\\n\""], + ["string", "\"日本語\""], + ["string", "\"\\xff\\u00FF\""] +] + +---------------------------------------------------- + +Checks for runes and strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/attr-name_feature.test b/docs/_style/prism-master/tests/languages/graphql/attr-name_feature.test new file mode 100644 index 0000000000..7f976e6d50 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/attr-name_feature.test @@ -0,0 +1,27 @@ +{ + zuck: user(id: 4) { + name + } +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["attr-name", "zuck"], + ["punctuation", ":"], + " user", + ["punctuation", "("], + ["attr-name", "id"], + ["punctuation", ":"], + ["number", "4"], + ["punctuation", ")"], + ["punctuation", "{"], + "\r\n\t\tname\r\n\t", + ["punctuation", "}"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for aliases, parameter names, etc. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/boolean_feature.test b/docs/_style/prism-master/tests/languages/graphql/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/comment_feature.test b/docs/_style/prism-master/tests/languages/graphql/comment_feature.test new file mode 100644 index 0000000000..054d6023d1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/comment_feature.test @@ -0,0 +1,13 @@ +# +# foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/directive_feature.test b/docs/_style/prism-master/tests/languages/graphql/directive_feature.test new file mode 100644 index 0000000000..ca9b70048a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/directive_feature.test @@ -0,0 +1,13 @@ +@skip +@include + +---------------------------------------------------- + +[ + ["directive", "@skip"], + ["directive", "@include"] +] + +---------------------------------------------------- + +Checks for directives \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/keyword_feature.test b/docs/_style/prism-master/tests/languages/graphql/keyword_feature.test new file mode 100644 index 0000000000..06d16f2abf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/keyword_feature.test @@ -0,0 +1,24 @@ +query +fragment +mutation +fragment foo on Bar +... on Foo + +---------------------------------------------------- + +[ + ["keyword", "query"], + ["keyword", "fragment"], + ["keyword", "mutation"], + ["keyword", "fragment"], + " foo ", + ["keyword", "on"], + " Bar\r\n", + ["operator", "..."], + ["keyword", "on"], + " Foo" +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/number_feature.test b/docs/_style/prism-master/tests/languages/graphql/number_feature.test new file mode 100644 index 0000000000..c58cc24d91 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/number_feature.test @@ -0,0 +1,23 @@ +0 +42 +-5 +3.14159 +5e4 +6E-78 +0.3e+1 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "42"], + ["number", "-5"], + ["number", "3.14159"], + ["number", "5e4"], + ["number", "6E-78"], + ["number", "0.3e+1"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/string_feature.test b/docs/_style/prism-master/tests/languages/graphql/string_feature.test new file mode 100644 index 0000000000..a3d26be33a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/string_feature.test @@ -0,0 +1,15 @@ +"" +"foo bar" +"foo\"bar\\baz" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo bar\""], + ["string", "\"foo\\\"bar\\\\baz\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/graphql/variable_feature.test b/docs/_style/prism-master/tests/languages/graphql/variable_feature.test new file mode 100644 index 0000000000..642d173e8a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/graphql/variable_feature.test @@ -0,0 +1,13 @@ +$foo +$Foo_bar42 + +---------------------------------------------------- + +[ + ["variable", "$foo"], + ["variable", "$Foo_bar42"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/annotation_feature.test b/docs/_style/prism-master/tests/languages/groovy/annotation_feature.test new file mode 100644 index 0000000000..f956c52798 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/annotation_feature.test @@ -0,0 +1,17 @@ +@BaseScript MyBaseClass baseScript +@DelegatesTo(EmailSpec) + +---------------------------------------------------- + +[ + ["annotation", "@BaseScript"], + " MyBaseClass baseScript\r\n", + ["annotation", "@DelegatesTo"], + ["punctuation", "("], + "EmailSpec", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for annotations. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/issue1049.js b/docs/_style/prism-master/tests/languages/groovy/issue1049.js new file mode 100644 index 0000000000..2ce81537a2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/issue1049.js @@ -0,0 +1,8 @@ +module.exports = { + '"&"': '"&amp;"', + '"&&"': '"&amp;&amp;"', + '"<"': '"&lt;"', + '"<<"': '"&lt;&lt;"', + '"&lt;"': '"&amp;lt;"', + '">"': '"&gt;"', +}; diff --git a/docs/_style/prism-master/tests/languages/groovy/keyword_feature.test b/docs/_style/prism-master/tests/languages/groovy/keyword_feature.test new file mode 100644 index 0000000000..57b7e16419 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/keyword_feature.test @@ -0,0 +1,61 @@ +as def in abstract +assert boolean break +byte case catch char +class; +const continue +default do double else +enum +extends; +final +finally float for goto +if +implements; +import +instanceof; +int +interface; +long native +new; +package private protected +public return short +static strictfp super +switch synchronized this +throw throws +trait; +transient +try void volatile while + +---------------------------------------------------- + +[ + ["keyword", "as"], ["keyword", "def"], ["keyword", "in"], ["keyword", "abstract"], + ["keyword", "assert"], ["keyword", "boolean"], ["keyword", "break"], + ["keyword", "byte"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "char"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], ["keyword", "continue"], + ["keyword", "default"], ["keyword", "do"], ["keyword", "double"], ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "final"], + ["keyword", "finally"], ["keyword", "float"], ["keyword", "for"], ["keyword", "goto"], + ["keyword", "if"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "import"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "int"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "long"], ["keyword", "native"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "package"], ["keyword", "private"], ["keyword", "protected"], + ["keyword", "public"], ["keyword", "return"], ["keyword", "short"], + ["keyword", "static"], ["keyword", "strictfp"], ["keyword", "super"], + ["keyword", "switch"], ["keyword", "synchronized"], ["keyword", "this"], + ["keyword", "throw"], ["keyword", "throws"], + ["keyword", "trait"], ["punctuation", ";"], + ["keyword", "transient"], + ["keyword", "try"], ["keyword", "void"], ["keyword", "volatile"], ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/number_feature.test b/docs/_style/prism-master/tests/languages/groovy/number_feature.test new file mode 100644 index 0000000000..bd12ff9df0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/number_feature.test @@ -0,0 +1,43 @@ +0b0110 +0b0110_1111_0000 +0b01G 0b01L 0b01I +0b01D 0b01F + +0xBABE +0xBad_Face +0x1.8p1 +0xa.fp-2 + +42_000 +3.14_15_9 +1.2e3 +3E+1 +4E-2 +42g 42l 42i +42d 42f + +---------------------------------------------------- + +[ + ["number", "0b0110"], + ["number", "0b0110_1111_0000"], + ["number", "0b01G"], ["number", "0b01L"], ["number", "0b01I"], + ["number", "0b01D"], ["number", "0b01F"], + + ["number", "0xBABE"], + ["number", "0xBad_Face"], + ["number", "0x1.8p1"], + ["number", "0xa.fp-2"], + + ["number", "42_000"], + ["number", "3.14_15_9"], + ["number", "1.2e3"], + ["number", "3E+1"], + ["number", "4E-2"], + ["number", "42g"], ["number", "42l"], ["number", "42i"], + ["number", "42d"], ["number", "42f"] +] + +---------------------------------------------------- + +Checks for binary, hexadecimal and decimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/operator_feature.test b/docs/_style/prism-master/tests/languages/groovy/operator_feature.test new file mode 100644 index 0000000000..cce07a9912 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/operator_feature.test @@ -0,0 +1,45 @@ +~ += == =~ ==~ +? ?. ?: +* ** *. *= **= +. .@ .& +5..8 +5..<8 +- -- -= -> ++ ++ += +! != +< << <<= <= <=> +> >> >>> >>= >>>= >= +& && &= +| || |= +/ +/= +^ ^= +% %= + +---------------------------------------------------- + +[ + ["operator", "~"], + ["operator", "="], ["operator", "=="], ["operator", "=~"], ["operator", "==~"], + ["operator", "?"], ["operator", "?."], ["operator", "?:"], + ["operator", "*"], ["operator", "**"], ["operator", "*."], ["operator", "*="], ["operator", "**="], + ["operator", "."], ["operator", ".@"], ["operator", ".&"], + ["number", "5"], ["operator", ".."], ["number", "8"], + ["number", "5"], ["operator", "..<"], ["number", "8"], + ["operator", "-"], ["operator", "--"], ["operator", "-="], ["operator", "->"], + ["operator", "+"], ["operator", "++"], ["operator", "+="], + ["operator", "!"], ["operator", "!="], + ["operator", "<"], ["operator", "<<"], ["operator", "<<="], ["operator", "<="], ["operator", "<=>"], + ["operator", ">"], ["operator", ">>"], ["operator", ">>>"], ["operator", ">>="], ["operator", ">>>="], ["operator", ">="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], + ["operator", "|"], ["operator", "||"], ["operator", "|="], + ["operator", "/"], + ["operator", "/="], + ["operator", "^"], ["operator", "^="], + ["operator", "%"], ["operator", "%="] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/shebang_feature.test b/docs/_style/prism-master/tests/languages/groovy/shebang_feature.test new file mode 100644 index 0000000000..c5806ebbb3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/shebang_feature.test @@ -0,0 +1,13 @@ +#!foobar +#!/usr/bin/env groovy + +---------------------------------------------------- + +[ + ["shebang", "#!foobar"], + ["shebang", "#!/usr/bin/env groovy"] +] + +---------------------------------------------------- + +Check for shebang comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/spock-block_feature.test b/docs/_style/prism-master/tests/languages/groovy/spock-block_feature.test new file mode 100644 index 0000000000..5cc72fe830 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/spock-block_feature.test @@ -0,0 +1,25 @@ +setup: +given: +when: +then: +and: +cleanup: +expect: +where: + +---------------------------------------------------- + +[ + ["spock-block", "setup:"], + ["spock-block", "given:"], + ["spock-block", "when:"], + ["spock-block", "then:"], + ["spock-block", "and:"], + ["spock-block", "cleanup:"], + ["spock-block", "expect:"], + ["spock-block", "where:"] +] + +---------------------------------------------------- + +Checks for all spock blocks. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/string-interpolation_feature.js b/docs/_style/prism-master/tests/languages/groovy/string-interpolation_feature.js new file mode 100644 index 0000000000..ddecdfd74f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/string-interpolation_feature.js @@ -0,0 +1,28 @@ +module.exports = { + // Double quoted: interpolation + '"$foo"': '"$foo"', + '"${42}"': '"${42}"', + // Triple double quoted: interpolation + '"""$foo"""': '"""$foo"""', + '"""${42}"""': '"""${42}"""', + // Slashy string: interpolation + '/$foo/': '/$foo/', + '/${42}/': '/${42}/', + // Dollar slashy string: interpolation + '$/$foo/$': '$/$foo/$', + '$/${42}/$': '$/${42}/$', + + // Double quoted: no interpolation (escaped) + '"\\$foo \\${42}"': '"\\$foo \\${42}"', + // Triple double quoted: no interpolation (escaped) + '"""\\$foo \\${42}"""': '"""\\$foo \\${42}"""', + // Slashy string: no interpolation (escaped) + '/\\$foo \\${42}/': '/\\$foo \\${42}/', + // Dollar slashy string: no interpolation (escaped) + '$/$$foo $${42}/$': '$/$$foo $${42}/$', + + // Single quoted string: no interpolation + '\'$foo ${42}\'': '\'$foo ${42}\'', + // Triple single quoted string: no interpolation + '\'\'\'$foo ${42}\'\'\'': '\'\'\'$foo ${42}\'\'\'' +}; \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/groovy/string_feature.test b/docs/_style/prism-master/tests/languages/groovy/string_feature.test new file mode 100644 index 0000000000..639db8255f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/groovy/string_feature.test @@ -0,0 +1,60 @@ +"""""" +"""foo""" +"""foo +bar""" + +'''''' +'''foo''' +'''foo +bar''' + +"" +"fo\"o" +'' +'fo\'o' + +/foo/ +/fo\/o/ + +$/fo$/$o/$ +$/foo +bar/$ +"foo /* comment */ bar" +'foo // bar' +'''foo +/* comment */ +bar''' +"""foo +// comment +bar""" + +---------------------------------------------------- + +[ + ["string", "\"\"\"\"\"\""], + ["string", "\"\"\"foo\"\"\""], + ["string", "\"\"\"foo\r\nbar\"\"\""], + ["string", "''''''"], + ["string", "'''foo'''"], + ["string", "'''foo\r\nbar'''"], + + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + ["string", "''"], + ["string", "'fo\\'o'"], + + ["string", "/foo/"], + ["string", "/fo\\/o/"], + + ["string", "$/fo$/$o/$"], + ["string", "$/foo\r\nbar/$"], + ["string", "\"foo /* comment */ bar\""], + ["string", "'foo // bar'"], + ["string", "'''foo\r\n/* comment */\r\nbar'''"], + ["string", "\"\"\"foo\r\n// comment\r\nbar\"\"\""] +] + +---------------------------------------------------- + +Checks for single quoted, triple single quoted, double quoted, +triple double quoted, slashy and dollar slashy strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haml/code_feature.test b/docs/_style/prism-master/tests/languages/haml/code_feature.test new file mode 100644 index 0000000000..51315e62c1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/code_feature.test @@ -0,0 +1,19 @@ +~ 42 +- 42 += 42 +&= 42 +!= 42 + +---------------------------------------------------- + +[ + ["punctuation", "~"], ["code", [["number", "42"]]], + ["punctuation", "-"], ["code", [["number", "42"]]], + ["punctuation", "="], ["code", [["number", "42"]]], + ["punctuation", "&="], ["code", [["number", "42"]]], + ["punctuation", "!="], ["code", [["number", "42"]]] +] + +---------------------------------------------------- + +Checks for single-line code. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haml/doctype_feature.test b/docs/_style/prism-master/tests/languages/haml/doctype_feature.test new file mode 100644 index 0000000000..5f5a731bcd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/doctype_feature.test @@ -0,0 +1,15 @@ +!!! +!!! 5 +!!! Strict + +---------------------------------------------------- + +[ + ["doctype", "!!!"], + ["doctype", "!!! 5"], + ["doctype", "!!! Strict"] +] + +---------------------------------------------------- + +Checks for doctypes. diff --git a/docs/_style/prism-master/tests/languages/haml/interpolation_feature.test b/docs/_style/prism-master/tests/languages/haml/interpolation_feature.test new file mode 100644 index 0000000000..ed13c87a81 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/interpolation_feature.test @@ -0,0 +1,21 @@ +#{ 42 } +#{ "foobar" } + +---------------------------------------------------- + +[ + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + ["interpolation", [ + ["delimiter", "#{"], + ["string", ["\"foobar\""]], + ["delimiter", "}"] + ]] +] + +---------------------------------------------------- + +Checks for interpolation in plain text. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haml/multiline-code_feature.test b/docs/_style/prism-master/tests/languages/haml/multiline-code_feature.test new file mode 100644 index 0000000000..06cb2b439d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/multiline-code_feature.test @@ -0,0 +1,58 @@ + ~ 1, + 1, + 1 +~ 2 | + 2 | + 2 | + +- 3, + 3, + 3 + - 4 | + 4 | + 4 | + + = 5, + 5, + 5 += 6 | + 6 | + 6 | + +&= 7, + 7, + 7 + &= 8 | + 8 | + 8 | + +!= 9, + 9, + 9 +!= 10 | + 10 | + 10 | + +---------------------------------------------------- + +[ + ["punctuation", "~"], ["multiline-code", [["number", "1"], ["punctuation", ","], ["number", "1"], ["punctuation", ","], ["number", "1"]]], + ["punctuation", "~"], ["multiline-code", [["number", "2"], ["operator", "|"], ["number", "2"], ["operator", "|"], ["number", "2"], ["operator", "|"]]], + + ["punctuation", "-"], ["multiline-code", [["number", "3"], ["punctuation", ","], ["number", "3"], ["punctuation", ","], ["number", "3"]]], + ["punctuation", "-"], ["multiline-code", [["number", "4"], ["operator", "|"], ["number", "4"], ["operator", "|"], ["number", "4"], ["operator", "|"]]], + + ["punctuation", "="], ["multiline-code", [["number", "5"], ["punctuation", ","], ["number", "5"], ["punctuation", ","], ["number", "5"]]], + ["punctuation", "="], ["multiline-code", [["number", "6"], ["operator", "|"], ["number", "6"], ["operator", "|"], ["number", "6"], ["operator", "|"]]], + + ["punctuation", "&="], ["multiline-code", [["number", "7"], ["punctuation", ","], ["number", "7"], ["punctuation", ","], ["number", "7"]]], + ["punctuation", "&="], ["multiline-code", [["number", "8"], ["operator", "|"], ["number", "8"], ["operator", "|"], ["number", "8"], ["operator", "|"]]], + + ["punctuation", "!="], ["multiline-code", [["number", "9"], ["punctuation", ","], ["number", "9"], ["punctuation", ","], ["number", "9"]]], + ["punctuation", "!="], ["multiline-code", [["number", "10"], ["operator", "|"], ["number", "10"], ["operator", "|"], ["number", "10"], ["operator", "|"]]] +] + +---------------------------------------------------- + +Checks for inline code, with all possible prefixes, some not indented, some +indented with two spaces, some indented with one tab. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haml/multiline-comment_feature.test b/docs/_style/prism-master/tests/languages/haml/multiline-comment_feature.test new file mode 100644 index 0000000000..809aaffa3b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/multiline-comment_feature.test @@ -0,0 +1,46 @@ +/ + +/ foo + +/foo + bar + + /foo + bar + + /foo + bar + +-# + +-# foo + +-#foo + bar + + -#foo + bar + + -#foo + bar + +---------------------------------------------------- + +[ + ["multiline-comment", "/"], + ["multiline-comment", "/ foo"], + ["multiline-comment", "/foo\r\n bar"], + ["multiline-comment", "/foo\r\n bar"], + ["multiline-comment", "/foo\r\n\t bar"], + + ["multiline-comment", "-#"], + ["multiline-comment", "-# foo"], + ["multiline-comment", "-#foo\r\n bar"], + ["multiline-comment", "-#foo\r\n bar"], + ["multiline-comment", "-#foo\r\n\t bar"] +] + +---------------------------------------------------- + +Checks for multi-line comments, not indented, indented with two spaces and +indented with one tab. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haml/tag_feature.test b/docs/_style/prism-master/tests/languages/haml/tag_feature.test new file mode 100644 index 0000000000..a1e0c0de8d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haml/tag_feature.test @@ -0,0 +1,161 @@ +%one + %two + +%div#things +%div.articles +%div.article.title + +%script{:type => "text/javascript", + :src => "javascripts/script_#{42}"} + +%div{:id => [@item.type, @item.number]} + +%a(title=@title href=href) +%input(selected) + +%html{html_attrs('fr-fr')} + +%div[@user, :greeting] + %bar[290]/ + +%div#Article.article.entry{:id => @article.number} + +#collection + .item + +%br/ +%blockquote< +%img> + +---------------------------------------------------- + +[ + ["tag", ["%one"]], + ["tag", ["%two"]], + + ["tag", ["%div#things"]], + ["tag", ["%div.articles"]], + ["tag", ["%div.article.title"]], + + ["tag", [ + "%script", + ["attributes", [ + ["punctuation", "{"], + ["symbol", ":type"], + ["operator", "="], ["operator", ">"], + ["string", ["\"text/javascript\""]], + ["punctuation", ","], + ["symbol", ":src"], + ["operator", "="], ["operator", ">"], + ["string", [ + "\"javascripts/script_", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "42"], + ["delimiter", "}"] + ]], + "\"" + ]], + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + "%div", + ["attributes", [ + ["punctuation", "{"], + ["symbol", ":id"], + ["operator", "="], ["operator", ">"], + ["punctuation", "["], + ["variable", "@item"], + ["punctuation", "."], + "type", + ["punctuation", ","], + ["variable", "@item"], + ["punctuation", "."], + "number", + ["punctuation", "]"], + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + "%a", + ["attributes", [ + ["punctuation", "("], + ["attr-name", "title"], + ["punctuation", "="], + ["attr-value", "@title"], + ["attr-name", "href"], + ["punctuation", "="], + ["attr-value", "href"], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + "%input", + ["attributes", [ + ["punctuation", "("], + ["attr-name", "selected"], + ["punctuation", ")"] + ]] + ]], + + ["tag", [ + "%html", + ["attributes", [ + ["punctuation", "{"], + "html_attrs", + ["punctuation", "("], + ["string", ["'fr-fr'"]], + ["punctuation", ")"], + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + "%div", + ["attributes", [ + ["punctuation", "["], + ["variable", "@user"], + ["punctuation", ","], + ["symbol", ":greeting"], + ["punctuation", "]"] + ]] + ]], + ["tag", [ + "%bar", + ["attributes", [ + ["punctuation", "["], + ["number", "290"], + ["punctuation", "]"] + ]], + "/" + ]], + + ["tag", [ + "%div#Article.article.entry", + ["attributes", [ + ["punctuation", "{"], + ["symbol", ":id"], + ["operator", "="], ["operator", ">"], + ["variable", "@article"], + ["punctuation", "."], + "number", + ["punctuation", "}"] + ]] + ]], + + ["tag", ["#collection"]], + ["tag", [".item"]], + + ["tag", ["%br/"]], + ["tag", ["%blockquote", ["punctuation", "<"]]], + ["tag", ["%img", ["punctuation", ">"]]] +] + +---------------------------------------------------- + +Checks for tags: basic element names, attributes, html-style attributes, +attribute methods, boolean attributes, class and id shortcuts, +implicit div elements, empty tags and whitespace removal. diff --git a/docs/_style/prism-master/tests/languages/handlebars+pug/handlebars_inclusion.test b/docs/_style/prism-master/tests/languages/handlebars+pug/handlebars_inclusion.test new file mode 100644 index 0000000000..c69751fd06 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars+pug/handlebars_inclusion.test @@ -0,0 +1,15 @@ +:handlebars + {{!comment}} + +---------------------------------------------------- + +[ + ["filter-handlebars", [ + ["filter-name", ":handlebars"], + ["comment", "{{!comment}}"] + ]] +] + +---------------------------------------------------- + +Checks for handlebars filter in Jade. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/block_feature.test b/docs/_style/prism-master/tests/languages/handlebars/block_feature.test new file mode 100644 index 0000000000..dd2c74e9c7 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/block_feature.test @@ -0,0 +1,23 @@ +{{#each comments}}{{/each}} +{{~#if isActive~}}{{~/if~}} + +---------------------------------------------------- + +[ + ["handlebars", [ + ["delimiter", "{{"], ["block", "#each"], ["variable", "comments"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["block", "/each"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["punctuation", "~"], ["block", "#if"], ["variable", "isActive"], ["punctuation", "~"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["punctuation", "~"], ["block", "/if"], ["punctuation", "~"], ["delimiter", "}}"] + ]] +] + +---------------------------------------------------- + +Checks for block helpers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/boolean_feature.test b/docs/_style/prism-master/tests/languages/handlebars/boolean_feature.test new file mode 100644 index 0000000000..1f252a1450 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/boolean_feature.test @@ -0,0 +1,17 @@ +{{ true }} +{{{ false }}} + +---------------------------------------------------- + +[ + ["handlebars", [ + ["delimiter", "{{"], ["boolean", "true"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], ["boolean", "false"], ["delimiter", "}}}"] + ]] +] + +---------------------------------------------------- + +Checks for all booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/comment_feature.test b/docs/_style/prism-master/tests/languages/handlebars/comment_feature.test new file mode 100644 index 0000000000..c0fffb9f56 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/comment_feature.test @@ -0,0 +1,19 @@ +{{! foobar}} +{{!-- foo bar baz --}} +{{! foo +bar }} +{{!-- foo +bar --}} + +---------------------------------------------------- + +[ + ["handlebars", [["comment", "{{! foobar}}"]]], + ["handlebars", [["comment", "{{!-- foo bar baz --}}"]]], + ["handlebars", [["comment", "{{! foo\r\nbar }}"]]], + ["handlebars", [["comment", "{{!-- foo\r\nbar --}}"]]] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/handlebars_in_markup_feature.test b/docs/_style/prism-master/tests/languages/handlebars/handlebars_in_markup_feature.test new file mode 100644 index 0000000000..d9591ba4af --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/handlebars_in_markup_feature.test @@ -0,0 +1,59 @@ +
    {{{intro}}}
    +
    +___HANDLEBARS1___{{{intro}}} +{{!
    }} + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], + ["variable", "intro"], + ["delimiter", "}}}"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["attr-name", ["class"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ["handlebars", [ + ["delimiter", "{{"], + ["variable", "foo"], + ["delimiter", "}}"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "\r\n___HANDLEBARS1___", + ["handlebars", [ + ["delimiter", "{{{"], + ["variable", "intro"], + ["delimiter", "}}}"] + ]], + ["handlebars", [ + ["comment", "{{!
    }}"] + ]] +] + +---------------------------------------------------- + +Checks for Handlebars in Markup. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/number_feature.test b/docs/_style/prism-master/tests/languages/handlebars/number_feature.test new file mode 100644 index 0000000000..aa894ec501 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/number_feature.test @@ -0,0 +1,29 @@ +{{ 0xBadFace }} +{{{ 42 }}} +{{{ 4e2 }}} +{{ 3.5e+1 }} +{{ 0.15e-9 }} + +---------------------------------------------------- + +[ + ["handlebars", [ + ["delimiter", "{{"], ["number", "0xBadFace"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], ["number", "42"], ["delimiter", "}}}"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], ["number", "4e2"], ["delimiter", "}}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["number", "3.5e+1"], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["number", "0.15e-9"], ["delimiter", "}}"] + ]] +] + +---------------------------------------------------- + +Checks for decimal and hexadecimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/handlebars/string_feature.test b/docs/_style/prism-master/tests/languages/handlebars/string_feature.test new file mode 100644 index 0000000000..f9f9d707a6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/handlebars/string_feature.test @@ -0,0 +1,25 @@ +{{ "" }} +{{{''}}} +{{{"foobar"}}} +{{ 'foobar' }} + +---------------------------------------------------- + +[ + ["handlebars", [ + ["delimiter", "{{"], ["string", "\"\""], ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], ["string", "''"], ["delimiter", "}}}"] + ]], + ["handlebars", [ + ["delimiter", "{{{"], ["string", "\"foobar\""], ["delimiter", "}}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], ["string", "'foobar'"], ["delimiter", "}}"] + ]] +] + +---------------------------------------------------- + +Checks for strings \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/builtin_feature.test b/docs/_style/prism-master/tests/languages/haskell/builtin_feature.test new file mode 100644 index 0000000000..c50ca40bb2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/builtin_feature.test @@ -0,0 +1,137 @@ +abs acos acosh all and +any appendFile approxRational +asTypeOf asin asinh atan +atan2 atanh basicIORun break +catch ceiling chr compare +concat concatMap const +cos cosh curry cycle +decodeFloat denominator +digitToInt div divMod +drop dropWhile either +elem encodeFloat enumFrom +enumFromThen enumFromThenTo +enumFromTo error even exp +exponent fail filter flip +floatDigits floatRadix +floatRange floor fmap +foldl foldl1 foldr foldr1 +fromDouble fromEnum fromInt +fromInteger fromIntegral +fromRational fst gcd +getChar getContents getLine +group head id inRange index +init intToDigit interact +ioError isAlpha isAlphaNum +isAscii isControl isDenormalized +isDigit isHexDigit isIEEE +isInfinite isLower isNaN +isNegativeZero isOctDigit +isPrint isSpace isUpper iterate +last lcm length lex +lexDigits lexLitChar lines +log logBase lookup map +mapM mapM_ max maxBound +maximum maybe min minBound +minimum mod negate not +notElem null numerator odd +or ord otherwise pack pi +pred primExitWith print +product properFraction +putChar putStr putStrLn quot +quotRem range rangeSize read +readDec readFile readFloat readHex +readIO readInt readList +readLitChar readLn readOct +readParen readSigned reads +readsPrec realToFrac recip +rem repeat replicate return +reverse round scaleFloat +scanl scanl1 scanr scanr1 +seq sequence sequence_ show +showChar showInt showList +showLitChar showParen showSigned +showString shows showsPrec +significand signum sin sinh +snd sort span splitAt sqrt +subtract succ sum tail take +takeWhile tan tanh threadToIOResult +toEnum toInt toInteger +toLower toRational toUpper +truncate uncurry undefined +unlines until unwords +unzip unzip3 userError words +writeFile zip zip3 zipWith +zipWith3 + +---------------------------------------------------- + +[ + ["builtin", "abs"], ["builtin", "acos"], ["builtin", "acosh"], ["builtin", "all"], ["builtin", "and"], + ["builtin", "any"], ["builtin", "appendFile"], ["builtin", "approxRational"], + ["builtin", "asTypeOf"], ["builtin", "asin"], ["builtin", "asinh"], ["builtin", "atan"], + ["builtin", "atan2"], ["builtin", "atanh"], ["builtin", "basicIORun"], ["builtin", "break"], + ["builtin", "catch"], ["builtin", "ceiling"], ["builtin", "chr"], ["builtin", "compare"], + ["builtin", "concat"], ["builtin", "concatMap"], ["builtin", "const"], + ["builtin", "cos"], ["builtin", "cosh"], ["builtin", "curry"], ["builtin", "cycle"], + ["builtin", "decodeFloat"], ["builtin", "denominator"], + ["builtin", "digitToInt"], ["builtin", "div"], ["builtin", "divMod"], + ["builtin", "drop"], ["builtin", "dropWhile"], ["builtin", "either"], + ["builtin", "elem"], ["builtin", "encodeFloat"], ["builtin", "enumFrom"], + ["builtin", "enumFromThen"], ["builtin", "enumFromThenTo"], + ["builtin", "enumFromTo"], ["builtin", "error"], ["builtin", "even"], ["builtin", "exp"], + ["builtin", "exponent"], ["builtin", "fail"], ["builtin", "filter"], ["builtin", "flip"], + ["builtin", "floatDigits"], ["builtin", "floatRadix"], + ["builtin", "floatRange"], ["builtin", "floor"], ["builtin", "fmap"], + ["builtin", "foldl"], ["builtin", "foldl1"], ["builtin", "foldr"], ["builtin", "foldr1"], + ["builtin", "fromDouble"], ["builtin", "fromEnum"], ["builtin", "fromInt"], + ["builtin", "fromInteger"], ["builtin", "fromIntegral"], + ["builtin", "fromRational"], ["builtin", "fst"], ["builtin", "gcd"], + ["builtin", "getChar"], ["builtin", "getContents"], ["builtin", "getLine"], + ["builtin", "group"], ["builtin", "head"], ["builtin", "id"], ["builtin", "inRange"], ["builtin", "index"], + ["builtin", "init"], ["builtin", "intToDigit"], ["builtin", "interact"], + ["builtin", "ioError"], ["builtin", "isAlpha"], ["builtin", "isAlphaNum"], + ["builtin", "isAscii"], ["builtin", "isControl"], ["builtin", "isDenormalized"], + ["builtin", "isDigit"], ["builtin", "isHexDigit"], ["builtin", "isIEEE"], + ["builtin", "isInfinite"], ["builtin", "isLower"], ["builtin", "isNaN"], + ["builtin", "isNegativeZero"], ["builtin", "isOctDigit"], + ["builtin", "isPrint"], ["builtin", "isSpace"], ["builtin", "isUpper"], ["builtin", "iterate"], + ["builtin", "last"], ["builtin", "lcm"], ["builtin", "length"], ["builtin", "lex"], + ["builtin", "lexDigits"], ["builtin", "lexLitChar"], ["builtin", "lines"], + ["builtin", "log"], ["builtin", "logBase"], ["builtin", "lookup"], ["builtin", "map"], + ["builtin", "mapM"], ["builtin", "mapM_"], ["builtin", "max"], ["builtin", "maxBound"], + ["builtin", "maximum"], ["builtin", "maybe"], ["builtin", "min"], ["builtin", "minBound"], + ["builtin", "minimum"], ["builtin", "mod"], ["builtin", "negate"], ["builtin", "not"], + ["builtin", "notElem"], ["builtin", "null"], ["builtin", "numerator"], ["builtin", "odd"], + ["builtin", "or"], ["builtin", "ord"], ["builtin", "otherwise"], ["builtin", "pack"], ["builtin", "pi"], + ["builtin", "pred"], ["builtin", "primExitWith"], ["builtin", "print"], + ["builtin", "product"], ["builtin", "properFraction"], + ["builtin", "putChar"], ["builtin", "putStr"], ["builtin", "putStrLn"], ["builtin", "quot"], + ["builtin", "quotRem"], ["builtin", "range"], ["builtin", "rangeSize"], ["builtin", "read"], + ["builtin", "readDec"], ["builtin", "readFile"], ["builtin", "readFloat"], ["builtin", "readHex"], + ["builtin", "readIO"], ["builtin", "readInt"], ["builtin", "readList"], + ["builtin", "readLitChar"], ["builtin", "readLn"], ["builtin", "readOct"], + ["builtin", "readParen"], ["builtin", "readSigned"], ["builtin", "reads"], + ["builtin", "readsPrec"], ["builtin", "realToFrac"], ["builtin", "recip"], + ["builtin", "rem"], ["builtin", "repeat"], ["builtin", "replicate"], ["builtin", "return"], + ["builtin", "reverse"], ["builtin", "round"], ["builtin", "scaleFloat"], + ["builtin", "scanl"], ["builtin", "scanl1"], ["builtin", "scanr"], ["builtin", "scanr1"], + ["builtin", "seq"], ["builtin", "sequence"], ["builtin", "sequence_"], ["builtin", "show"], + ["builtin", "showChar"], ["builtin", "showInt"], ["builtin", "showList"], + ["builtin", "showLitChar"], ["builtin", "showParen"], ["builtin", "showSigned"], + ["builtin", "showString"], ["builtin", "shows"], ["builtin", "showsPrec"], + ["builtin", "significand"], ["builtin", "signum"], ["builtin", "sin"], ["builtin", "sinh"], + ["builtin", "snd"], ["builtin", "sort"], ["builtin", "span"], ["builtin", "splitAt"], ["builtin", "sqrt"], + ["builtin", "subtract"], ["builtin", "succ"], ["builtin", "sum"], ["builtin", "tail"], ["builtin", "take"], + ["builtin", "takeWhile"], ["builtin", "tan"], ["builtin", "tanh"], ["builtin", "threadToIOResult"], + ["builtin", "toEnum"], ["builtin", "toInt"], ["builtin", "toInteger"], + ["builtin", "toLower"], ["builtin", "toRational"], ["builtin", "toUpper"], + ["builtin", "truncate"], ["builtin", "uncurry"], ["builtin", "undefined"], + ["builtin", "unlines"], ["builtin", "until"], ["builtin", "unwords"], + ["builtin", "unzip"], ["builtin", "unzip3"], ["builtin", "userError"], ["builtin", "words"], + ["builtin", "writeFile"], ["builtin", "zip"], ["builtin", "zip3"], ["builtin", "zipWith"], + ["builtin", "zipWith3"] +] + +---------------------------------------------------- + +Checks for all builtin. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/char_feature.test b/docs/_style/prism-master/tests/languages/haskell/char_feature.test new file mode 100644 index 0000000000..e4dedc444a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/char_feature.test @@ -0,0 +1,17 @@ +'a' +'\n' +'\23' +'\xFE' + +---------------------------------------------------- + +[ + ["char", "'a'"], + ["char", "'\\n'"], + ["char", "'\\23'"], + ["char", "'\\xFE'"] +] + +---------------------------------------------------- + +Checks for chars. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/comment_feature.test b/docs/_style/prism-master/tests/languages/haskell/comment_feature.test new file mode 100644 index 0000000000..d8c8cdda20 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/comment_feature.test @@ -0,0 +1,14 @@ +-- foo +{- foo +bar -} + +---------------------------------------------------- + +[ + ["comment", "-- foo"], + ["comment", "{- foo\r\nbar -}"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/constant_feature.test b/docs/_style/prism-master/tests/languages/haskell/constant_feature.test new file mode 100644 index 0000000000..06f25f10e5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/constant_feature.test @@ -0,0 +1,15 @@ +Foo +Foo.Bar +Baz.Foobar_42 + +---------------------------------------------------- + +[ + ["constant", "Foo"], + ["constant", "Foo.Bar"], + ["constant", "Baz.Foobar_42"] +] + +---------------------------------------------------- + +Checks for constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/hvariable_feature.test b/docs/_style/prism-master/tests/languages/haskell/hvariable_feature.test new file mode 100644 index 0000000000..defa3ba74d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/hvariable_feature.test @@ -0,0 +1,15 @@ +foo +Foo.bar +Baz.foobar_42 + +---------------------------------------------------- + +[ + ["hvariable", "foo"], + ["hvariable", "Foo.bar"], + ["hvariable", "Baz.foobar_42"] +] + +---------------------------------------------------- + +Checks for hvariables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/import_statement_feature.test b/docs/_style/prism-master/tests/languages/haskell/import_statement_feature.test new file mode 100644 index 0000000000..120fbe7511 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/import_statement_feature.test @@ -0,0 +1,35 @@ +import Foo +import qualified Foobar +import Foo_42.Bar as Foobar +import Foo.Bar as Foo.Baz hiding + +---------------------------------------------------- + +[ + ["import_statement", [ + ["keyword", "import"], + " Foo" + ]], + ["import_statement", [ + ["keyword", "import"], + ["keyword", "qualified"], + " Foobar" + ]], + ["import_statement", [ + ["keyword", "import"], + " Foo_42.Bar ", + ["keyword", "as"], + " Foobar" + ]], + ["import_statement", [ + ["keyword", "import"], + " Foo.Bar ", + ["keyword", "as"], + " Foo.Baz ", + ["keyword", "hiding"] + ]] +] + +---------------------------------------------------- + +Checks for import statement. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/keyword_feature.test b/docs/_style/prism-master/tests/languages/haskell/keyword_feature.test new file mode 100644 index 0000000000..0fb3657923 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/keyword_feature.test @@ -0,0 +1,19 @@ +case class data deriving +do else if in infixl +infixr instance let +module newtype of +primitive then type where + +---------------------------------------------------- + +[ + ["keyword", "case"], ["keyword", "class"], ["keyword", "data"], ["keyword", "deriving"], + ["keyword", "do"], ["keyword", "else"], ["keyword", "if"], ["keyword", "in"], ["keyword", "infixl"], + ["keyword", "infixr"], ["keyword", "instance"], ["keyword", "let"], + ["keyword", "module"], ["keyword", "newtype"], ["keyword", "of"], + ["keyword", "primitive"], ["keyword", "then"], ["keyword", "type"], ["keyword", "where"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/number_feature.test b/docs/_style/prism-master/tests/languages/haskell/number_feature.test new file mode 100644 index 0000000000..f45a0f2869 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/number_feature.test @@ -0,0 +1,23 @@ +42 +3.14159 +2E3 +1.2e-4 +0.9e+1 +0o47 +0xBadFace + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "2E3"], + ["number", "1.2e-4"], + ["number", "0.9e+1"], + ["number", "0o47"], + ["number", "0xBadFace"] +] + +---------------------------------------------------- + +Checks for decimal, octal and hexadecimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/operator_feature.test b/docs/_style/prism-master/tests/languages/haskell/operator_feature.test new file mode 100644 index 0000000000..9cd8339fbf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/operator_feature.test @@ -0,0 +1,37 @@ +.. +reverse . sort +`foo` +`Foo.bar` ++ - * / +^ ^^ ** +&& || +< <= == /= +>= > \ | +++ : !! +\\ <- -> += :: => +>> >>= >@> +~ ! @ + +---------------------------------------------------- + +[ + ["operator", ".."], + ["builtin", "reverse"], ["operator", " . "], ["builtin", "sort"], + ["operator", "`foo`"], + ["operator", "`Foo.bar`"], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "^"], ["operator", "^^"], ["operator", "**"], + ["operator", "&&"], ["operator", "||"], + ["operator", "<"], ["operator", "<="], ["operator", "=="], ["operator", "/="], + ["operator", ">="], ["operator", ">"], ["operator", "\\"], ["operator", "|"], + ["operator", "++"], ["operator", ":"], ["operator", "!!"], + ["operator", "\\\\"], ["operator", "<-"], ["operator", "->"], + ["operator", "="], ["operator", "::"], ["operator", "=>"], + ["operator", ">>"], ["operator", ">>="], ["operator", ">@>"], + ["operator", "~"], ["operator", "!"], ["operator", "@"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haskell/string_feature.test b/docs/_style/prism-master/tests/languages/haskell/string_feature.test new file mode 100644 index 0000000000..49c2cfbf23 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haskell/string_feature.test @@ -0,0 +1,19 @@ +"" +"fo\"o" +"foo \ + \ bar" +"foo -- comment \ + \ bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + ["string", "\"foo \\\r\n \\ bar\""], + ["string", "\"foo -- comment \\\r\n \\ bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/keyword_feature.test b/docs/_style/prism-master/tests/languages/haxe/keyword_feature.test new file mode 100644 index 0000000000..6a26bd0962 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/keyword_feature.test @@ -0,0 +1,93 @@ +this +abstract +as +break +case +cast +catch +class +continue +default +do +dynamic +else +enum +extends +extern +from +for +function +if +implements +import +in +inline +interface +macro +new +null +override +public +private +return +static +super +switch +throw +to +try +typedef +using +var +while + +---------------------------------------------------- + +[ + ["keyword", "this"], + ["keyword", "abstract"], + ["keyword", "as"], + ["keyword", "break"], + ["keyword", "case"], + ["keyword", "cast"], + ["keyword", "catch"], + ["keyword", "class"], + ["keyword", "continue"], + ["keyword", "default"], + ["keyword", "do"], + ["keyword", "dynamic"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "extends"], + ["keyword", "extern"], + ["keyword", "from"], + ["keyword", "for"], + ["keyword", "function"], + ["keyword", "if"], + ["keyword", "implements"], + ["keyword", "import"], + ["keyword", "in"], + ["keyword", "inline"], + ["keyword", "interface"], + ["keyword", "macro"], + ["keyword", "new"], + ["keyword", "null"], + ["keyword", "override"], + ["keyword", "public"], + ["keyword", "private"], + ["keyword", "return"], + ["keyword", "static"], + ["keyword", "super"], + ["keyword", "switch"], + ["keyword", "throw"], + ["keyword", "to"], + ["keyword", "try"], + ["keyword", "typedef"], + ["keyword", "using"], + ["keyword", "var"], + ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/metadata_feature.test b/docs/_style/prism-master/tests/languages/haxe/metadata_feature.test new file mode 100644 index 0000000000..312114d9a5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/metadata_feature.test @@ -0,0 +1,15 @@ +@author("Nicolas") +@debug +@:noCompletion + +---------------------------------------------------- + +[ + ["metadata", "@author"], ["punctuation", "("], ["string", ["\"Nicolas\""]], ["punctuation", ")"], + ["metadata", "@debug"], + ["metadata", "@:noCompletion"] +] + +---------------------------------------------------- + +Checks for metadata. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/operator_feature.test b/docs/_style/prism-master/tests/languages/haxe/operator_feature.test new file mode 100644 index 0000000000..6963f80066 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/operator_feature.test @@ -0,0 +1,29 @@ +... ++ ++ +- -- -> += == +! != +& && +| || +< <= << +> >= >> +* / % ~ ^ + +---------------------------------------------------- + +[ + ["operator", "..."], + ["operator", "+"], ["operator", "++"], + ["operator", "-"], ["operator", "--"], ["operator", "->"], + ["operator", "="], ["operator", "=="], + ["operator", "!"], ["operator", "!="], + ["operator", "&"], ["operator", "&&"], + ["operator", "|"], ["operator", "||"], + ["operator", "<"], ["operator", "<="], ["operator", "<<"], + ["operator", ">"], ["operator", ">="], ["operator", ">>"], + ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "~"], ["operator", "^"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/preprocessor_feature.test b/docs/_style/prism-master/tests/languages/haxe/preprocessor_feature.test new file mode 100644 index 0000000000..3cadacf654 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/preprocessor_feature.test @@ -0,0 +1,17 @@ +#if +#elseif +#else +#end + +---------------------------------------------------- + +[ + ["preprocessor", "#if"], + ["preprocessor", "#elseif"], + ["preprocessor", "#else"], + ["preprocessor", "#end"] +] + +---------------------------------------------------- + +Checks for preprocessor directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/regex_feature.test b/docs/_style/prism-master/tests/languages/haxe/regex_feature.test new file mode 100644 index 0000000000..577cab7b9a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/regex_feature.test @@ -0,0 +1,15 @@ +~/ha\/xe/i +~/[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z][A-Z][A-Z]?/i +~/(dog|fox)/igmsu + +---------------------------------------------------- + +[ + ["regex", "~/ha\\/xe/i"], + ["regex", "~/[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z][A-Z][A-Z]?/i"], + ["regex", "~/(dog|fox)/igmsu"] +] + +---------------------------------------------------- + +Checks for regexes. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/reification_feature.test b/docs/_style/prism-master/tests/languages/haxe/reification_feature.test new file mode 100644 index 0000000000..6d382b7cc6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/reification_feature.test @@ -0,0 +1,16 @@ +$e +${4+2} + +---------------------------------------------------- + +[ + ["reification", "$e"], + ["reification", "$"], + ["punctuation", "{"], + ["number", "4"], ["operator", "+"], ["number", "2"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for reification. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/haxe/string_feature.test b/docs/_style/prism-master/tests/languages/haxe/string_feature.test new file mode 100644 index 0000000000..61f1985fcc --- /dev/null +++ b/docs/_style/prism-master/tests/languages/haxe/string_feature.test @@ -0,0 +1,37 @@ +"" +"Foo +\"bar\" +baz" +"$bar ${4+2}" +'' +'Foo +\'bar\' +baz' + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["\"Foo\r\n\\\"bar\\\"\r\nbaz\""]], + ["string", [ + "\"", + ["interpolation", [ + ["interpolation", "$bar"] + ]], + ["interpolation", [ + ["interpolation", "$"], + ["punctuation", "{"], + ["number", "4"], + ["operator", "+"], + ["number", "2"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", ["''"]], + ["string", ["'Foo\r\n\\'bar\\'\r\nbaz'"]] +] + +---------------------------------------------------- + +Checks for strings and string interpolation. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/hpkp/safe_maxage_feature.test b/docs/_style/prism-master/tests/languages/hpkp/safe_maxage_feature.test new file mode 100644 index 0000000000..169f23cd5e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hpkp/safe_maxage_feature.test @@ -0,0 +1,12 @@ +max-age=31536000 + +---------------------------------------------------- + +[ + ["directive", "max-age="], + ["safe", "31536000"] +] + +---------------------------------------------------- + +Checks for HPKP with a "safe" max-age. diff --git a/docs/_style/prism-master/tests/languages/hpkp/sha256_pin_feature.test b/docs/_style/prism-master/tests/languages/hpkp/sha256_pin_feature.test new file mode 100644 index 0000000000..45adf1c878 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hpkp/sha256_pin_feature.test @@ -0,0 +1,11 @@ +pin-sha256="EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4=" + +---------------------------------------------------- + +[ + ["directive", "pin-sha256=\"EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4=\""] +] + +---------------------------------------------------- + +Checks for HPKP with a sha256 pin. diff --git a/docs/_style/prism-master/tests/languages/hpkp/unsafe_maxage_feature.test b/docs/_style/prism-master/tests/languages/hpkp/unsafe_maxage_feature.test new file mode 100644 index 0000000000..4f1ff96158 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hpkp/unsafe_maxage_feature.test @@ -0,0 +1,12 @@ +max-age=123 + +---------------------------------------------------- + +[ + ["directive", "max-age="], + ["unsafe", "123"] +] + +---------------------------------------------------- + +Checks for HPKP with an "unsafe" max-age. diff --git a/docs/_style/prism-master/tests/languages/hsts/include_subdomains_feature.test b/docs/_style/prism-master/tests/languages/hsts/include_subdomains_feature.test new file mode 100644 index 0000000000..e889e84c4c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hsts/include_subdomains_feature.test @@ -0,0 +1,11 @@ +includeSubDomains + +---------------------------------------------------- + +[ + ["directive", "includeSubDomains"] +] + +---------------------------------------------------- + +Checks for HSTS with the includeSubDomains directive. diff --git a/docs/_style/prism-master/tests/languages/hsts/preload_feature.test b/docs/_style/prism-master/tests/languages/hsts/preload_feature.test new file mode 100644 index 0000000000..2a390a03d8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hsts/preload_feature.test @@ -0,0 +1,11 @@ +preload + +---------------------------------------------------- + +[ + ["directive", "preload"] +] + +---------------------------------------------------- + +Checks for HSTS with the preload directive. diff --git a/docs/_style/prism-master/tests/languages/hsts/safe_maxage_feature.test b/docs/_style/prism-master/tests/languages/hsts/safe_maxage_feature.test new file mode 100644 index 0000000000..6797fff3b1 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hsts/safe_maxage_feature.test @@ -0,0 +1,12 @@ +max-age=31536000 + +---------------------------------------------------- + +[ + ["directive", "max-age="], + ["safe", "31536000"] +] + +---------------------------------------------------- + +Checks for HSTS with a "safe" max-age. diff --git a/docs/_style/prism-master/tests/languages/hsts/unsafe_maxage_feature.test b/docs/_style/prism-master/tests/languages/hsts/unsafe_maxage_feature.test new file mode 100644 index 0000000000..dba69dc304 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/hsts/unsafe_maxage_feature.test @@ -0,0 +1,12 @@ +max-age=123 + +---------------------------------------------------- + +[ + ["directive", "max-age="], + ["unsafe", "123"] +] + +---------------------------------------------------- + +Checks for HSTS with an "unsafe" max-age. diff --git a/docs/_style/prism-master/tests/languages/http/header-name_feature.test b/docs/_style/prism-master/tests/languages/http/header-name_feature.test new file mode 100644 index 0000000000..cd2612fa66 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/http/header-name_feature.test @@ -0,0 +1,24 @@ +Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 +Accept-Encoding: gzip, deflate +Server: GitHub.com +Date: Mon, 22 Dec 2014 18:25:30 GMT +Content-Type: text/html; charset=utf-8 + +---------------------------------------------------- + +[ + ["header-name", "Accept-Language:"], + " fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3\r\n", + ["header-name", "Accept-Encoding:"], + " gzip, deflate\r\n", + ["header-name", "Server:"], + " GitHub.com\r\n", + ["header-name", "Date:"], + " Mon, 22 Dec 2014 18:25:30 GMT\r\n", + ["header-name", "Content-Type:"], + " text/html; charset=utf-8" +] + +---------------------------------------------------- + +Checks for header names. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/http/request-line_feature.test b/docs/_style/prism-master/tests/languages/http/request-line_feature.test new file mode 100644 index 0000000000..70db1a9f38 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/http/request-line_feature.test @@ -0,0 +1,56 @@ +POST http://example.com HTTP/1.0 +GET http://localhost:9999/foo.html HTTP/1.1 +PUT http://www.example.com HTTP/2.0 +DELETE https://example.com HTTP/1.1 +OPTIONS https://www.example.com HTTP/1.1 +PATCH http://example.com HTTP/1.0 +TRACE http://example.com HTTP/1.0 +CONNECT http://example.com HTTP/1.0 +GET /path/to/foo.html HTTP/1.1 + +---------------------------------------------------- + +[ + ["request-line", [ + ["property", "POST"], + " http://example.com HTTP/1.0" + ]], + ["request-line", [ + ["property", "GET"], + " http://localhost", + ["attr-name", ":9999"], + "/foo.html HTTP/1.1" + ]], + ["request-line", [ + ["property", "PUT"], + " http://www.example.com HTTP/2.0" + ]], + ["request-line", [ + ["property", "DELETE"], + " https://example.com HTTP/1.1" + ]], + ["request-line", [ + ["property", "OPTIONS"], + " https://www.example.com HTTP/1.1" + ]], + ["request-line", [ + ["property", "PATCH"], + " http://example.com HTTP/1.0" + ]], + ["request-line", [ + ["property", "TRACE"], + " http://example.com HTTP/1.0" + ]], + ["request-line", [ + ["property", "CONNECT"], + " http://example.com HTTP/1.0" + ]], + ["request-line", [ + ["property", "GET"], + " /path/to/foo.html HTTP/1.1" + ]] +] + +---------------------------------------------------- + +Checks for request lines. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/http/response-status_feature.test b/docs/_style/prism-master/tests/languages/http/response-status_feature.test new file mode 100644 index 0000000000..7384ff2a89 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/http/response-status_feature.test @@ -0,0 +1,29 @@ +HTTP/1.0 200 OK +HTTP/1.1 403 Forbidden +HTTP/1.1 404 Not Found +HTTP/1.0 418 I'm a teapot + +---------------------------------------------------- + +[ + ["response-status", [ + "HTTP/1.0 ", + ["property", "200 OK"] + ]], + ["response-status", [ + "HTTP/1.1 ", + ["property", "403 Forbidden"] + ]], + ["response-status", [ + "HTTP/1.1 ", + ["property", "404 Not Found"] + ]], + ["response-status", [ + "HTTP/1.0 ", + ["property", "418 I'm a teapot"] + ]] +] + +---------------------------------------------------- + +Checks for response statuses. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/comment_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/comment_feature.test new file mode 100644 index 0000000000..65211e27fa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/comment_feature.test @@ -0,0 +1,17 @@ +'Foobar +' Foobar +REMFoobar +REM Foobar + +---------------------------------------------------- + +[ + ["comment", "'Foobar"], + ["comment", "' Foobar"], + ["comment", "REMFoobar"], + ["comment", "REM Foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/function_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/function_feature.test new file mode 100644 index 0000000000..6cc325b6f0 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/function_feature.test @@ -0,0 +1,59 @@ +ABS +ANA +ASC +BIN +BTN +DEC +FREE +HELP +HEX +I2CR +I2CW +IN +INKEY +LEN +LINE +PEEK +RND +SCR +SOUND +STR +TICK +USR +VER +VPEEK +ZER + +---------------------------------------------------- + +[ + ["function", "ABS"], + ["function", "ANA"], + ["function", "ASC"], + ["function", "BIN"], + ["function", "BTN"], + ["function", "DEC"], + ["function", "FREE"], + ["function", "HELP"], + ["function", "HEX"], + ["function", "I2CR"], + ["function", "I2CW"], + ["function", "IN"], + ["function", "INKEY"], + ["function", "LEN"], + ["function", "LINE"], + ["function", "PEEK"], + ["function", "RND"], + ["function", "SCR"], + ["function", "SOUND"], + ["function", "STR"], + ["function", "TICK"], + ["function", "USR"], + ["function", "VER"], + ["function", "VPEEK"], + ["function", "ZER"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/keyword_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/keyword_feature.test new file mode 100644 index 0000000000..71d83a480c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/keyword_feature.test @@ -0,0 +1,119 @@ +BEEP +BPS +CASE +CLEAR +CLK +CLO +CLP +CLS +CLT +CLV +CONT +COPY +ELSE +END +FILE +FILES +FOR +GOSUB +GSB +GOTO +IF +INPUT +KBD +LED +LET +LIST +LOAD +LOCATE +LRUN +NEW +NEXT +OUT +RIGHT +PLAY +POKE +PRINT +PWM +RENUM +RESET +RETURN +RTN +RUN +SAVE +SCROLL +SLEEP +SRND +STEP +STOP +SUB +TEMPO +THEN +TO +UART +VIDEO +WAIT + +---------------------------------------------------- + +[ + ["keyword", "BEEP"], + ["keyword", "BPS"], + ["keyword", "CASE"], + ["keyword", "CLEAR"], + ["keyword", "CLK"], + ["keyword", "CLO"], + ["keyword", "CLP"], + ["keyword", "CLS"], + ["keyword", "CLT"], + ["keyword", "CLV"], + ["keyword", "CONT"], + ["keyword", "COPY"], + ["keyword", "ELSE"], + ["keyword", "END"], + ["keyword", "FILE"], + ["keyword", "FILES"], + ["keyword", "FOR"], + ["keyword", "GOSUB"], + ["keyword", "GSB"], + ["keyword", "GOTO"], + ["keyword", "IF"], + ["keyword", "INPUT"], + ["keyword", "KBD"], + ["keyword", "LED"], + ["keyword", "LET"], + ["keyword", "LIST"], + ["keyword", "LOAD"], + ["keyword", "LOCATE"], + ["keyword", "LRUN"], + ["keyword", "NEW"], + ["keyword", "NEXT"], + ["keyword", "OUT"], + ["keyword", "RIGHT"], + ["keyword", "PLAY"], + ["keyword", "POKE"], + ["keyword", "PRINT"], + ["keyword", "PWM"], + ["keyword", "RENUM"], + ["keyword", "RESET"], + ["keyword", "RETURN"], + ["keyword", "RTN"], + ["keyword", "RUN"], + ["keyword", "SAVE"], + ["keyword", "SCROLL"], + ["keyword", "SLEEP"], + ["keyword", "SRND"], + ["keyword", "STEP"], + ["keyword", "STOP"], + ["keyword", "SUB"], + ["keyword", "TEMPO"], + ["keyword", "THEN"], + ["keyword", "TO"], + ["keyword", "UART"], + ["keyword", "VIDEO"], + ["keyword", "WAIT"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/label_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/label_feature.test new file mode 100644 index 0000000000..42ad2e853f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/label_feature.test @@ -0,0 +1,13 @@ +@PAPERNEKO +@SUKI + +---------------------------------------------------- + +[ + ["label", "@PAPERNEKO"], + ["label", "@SUKI"] +] + +---------------------------------------------------- + +Checks for labels. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/number_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/number_feature.test new file mode 100644 index 0000000000..89bfcf2c53 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/number_feature.test @@ -0,0 +1,23 @@ +42 +3.14159 +2e8 +3.4E-9 +0.7E+12 +#496F726953756B69 +`11100010 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "2e8"], + ["number", "3.4E-9"], + ["number", "0.7E+12"], + ["number", "#496F726953756B69"], + ["number", "`11100010"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/operator_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/operator_feature.test new file mode 100644 index 0000000000..59e799446d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/operator_feature.test @@ -0,0 +1,36 @@ +< +<= +<> +> +>= ++ +- +* +/ +^ += +& +~ +! +| +AND +NOT +OR +|| +&& + +---------------------------------------------------- + +[ + ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "^"], ["operator", "="], + ["operator", "&"], ["operator", "~"], ["operator", "!"], ["operator", "|"], + ["operator", "AND"], ["operator", "NOT"], ["operator", "OR"], + ["operator", "||"], ["operator", "&&"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ichigojam/string_feature.test b/docs/_style/prism-master/tests/languages/ichigojam/string_feature.test new file mode 100644 index 0000000000..83fea35edb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ichigojam/string_feature.test @@ -0,0 +1,13 @@ +"" +"fo""obar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\"\"obar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/builtin-keyword_feature.test b/docs/_style/prism-master/tests/languages/icon/builtin-keyword_feature.test new file mode 100644 index 0000000000..1d25764242 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/builtin-keyword_feature.test @@ -0,0 +1,91 @@ +&allocated +&ascii +&clock +&collections +&cset +¤t +&date +&dateline +&digits +&dump +&e +&error +&errornumber +&errortext +&errorvalue +&errout +&fail +&features +&file +&host +&input +&lcase +&letters +&level +&line +&main +&null +&output +&phi +&pi +&pos +&progname +&random +®ions +&source +&storage +&subject +&time +&trace +&ucase +&version + +---------------------------------------------------- + +[ + ["builtin-keyword", "&allocated"], + ["builtin-keyword", "&ascii"], + ["builtin-keyword", "&clock"], + ["builtin-keyword", "&collections"], + ["builtin-keyword", "&cset"], + ["builtin-keyword", "¤t"], + ["builtin-keyword", "&date"], + ["builtin-keyword", "&dateline"], + ["builtin-keyword", "&digits"], + ["builtin-keyword", "&dump"], + ["builtin-keyword", "&e"], + ["builtin-keyword", "&error"], + ["builtin-keyword", "&errornumber"], + ["builtin-keyword", "&errortext"], + ["builtin-keyword", "&errorvalue"], + ["builtin-keyword", "&errout"], + ["builtin-keyword", "&fail"], + ["builtin-keyword", "&features"], + ["builtin-keyword", "&file"], + ["builtin-keyword", "&host"], + ["builtin-keyword", "&input"], + ["builtin-keyword", "&lcase"], + ["builtin-keyword", "&letters"], + ["builtin-keyword", "&level"], + ["builtin-keyword", "&line"], + ["builtin-keyword", "&main"], + ["builtin-keyword", "&null"], + ["builtin-keyword", "&output"], + ["builtin-keyword", "&phi"], + ["builtin-keyword", "&pi"], + ["builtin-keyword", "&pos"], + ["builtin-keyword", "&progname"], + ["builtin-keyword", "&random"], + ["builtin-keyword", "®ions"], + ["builtin-keyword", "&source"], + ["builtin-keyword", "&storage"], + ["builtin-keyword", "&subject"], + ["builtin-keyword", "&time"], + ["builtin-keyword", "&trace"], + ["builtin-keyword", "&ucase"], + ["builtin-keyword", "&version"] +] + +---------------------------------------------------- + +Checks for builtin keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/comment_feature.test b/docs/_style/prism-master/tests/languages/icon/comment_feature.test new file mode 100644 index 0000000000..09493ab581 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/comment_feature.test @@ -0,0 +1,13 @@ +# +# Foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# Foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/directive_feature.test b/docs/_style/prism-master/tests/languages/icon/directive_feature.test new file mode 100644 index 0000000000..ede5ebc85d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/directive_feature.test @@ -0,0 +1,21 @@ +$include +$line +$define +$undef +$ifdef +$ifndef + +---------------------------------------------------- + +[ + ["directive", "$include"], + ["directive", "$line"], + ["directive", "$define"], + ["directive", "$undef"], + ["directive", "$ifdef"], + ["directive", "$ifndef"] +] + +---------------------------------------------------- + +Checks for preprocessor directives. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/function_feature.test b/docs/_style/prism-master/tests/languages/icon/function_feature.test new file mode 100644 index 0000000000..715452f5f5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/function_feature.test @@ -0,0 +1,15 @@ +foo() +Foobar_42{} +Foo_Bar ! [] + +---------------------------------------------------- + +[ + ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + ["function", "Foobar_42"], ["punctuation", "{"], ["punctuation", "}"], + ["function", "Foo_Bar"], ["operator", "!"], ["punctuation", "["], ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/keyword_feature.test b/docs/_style/prism-master/tests/languages/icon/keyword_feature.test new file mode 100644 index 0000000000..0816911020 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/keyword_feature.test @@ -0,0 +1,67 @@ +break +by +case +create +default +do +else +end +every +fail +global +if +initial +invocable +link +local +next +not +of +procedure +record +repeat +return +static +suspend +then +to +until +while + +---------------------------------------------------- + +[ + ["keyword", "break"], + ["keyword", "by"], + ["keyword", "case"], + ["keyword", "create"], + ["keyword", "default"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "every"], + ["keyword", "fail"], + ["keyword", "global"], + ["keyword", "if"], + ["keyword", "initial"], + ["keyword", "invocable"], + ["keyword", "link"], + ["keyword", "local"], + ["keyword", "next"], + ["keyword", "not"], + ["keyword", "of"], + ["keyword", "procedure"], + ["keyword", "record"], + ["keyword", "repeat"], + ["keyword", "return"], + ["keyword", "static"], + ["keyword", "suspend"], + ["keyword", "then"], + ["keyword", "to"], + ["keyword", "until"], + ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/number_feature.test b/docs/_style/prism-master/tests/languages/icon/number_feature.test new file mode 100644 index 0000000000..fc8efc8453 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/number_feature.test @@ -0,0 +1,33 @@ +0 +.42 +42 +3.14159 +2e8 +3.2E-7 +47E+19 + +2r11 +8R751 +16rbadface +36razerty + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", ".42"], + ["number", "42"], + ["number", "3.14159"], + ["number", "2e8"], + ["number", "3.2E-7"], + ["number", "47E+19"], + + ["number", "2r11"], + ["number", "8R751"], + ["number", "16rbadface"], + ["number", "36razerty"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/operator_feature.test b/docs/_style/prism-master/tests/languages/icon/operator_feature.test new file mode 100644 index 0000000000..a2e29ffad2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/operator_feature.test @@ -0,0 +1,69 @@ +! +% %:= +& &:= +* *:= ** **:= ++ ++ +:= ++:= +- -:= -- --:= +. +/ /:= +:= :=: +< <- <-> <:= +<< <<:= +<<= <<=:= +<= <=:= += =:= +== ==:= +=== ===:= +> >:= +>= >=:= +>> >>:= +>>= >>=:= +? ?:= +@ @:= +\ +^ ^:= +| || ||:= +||| |||:= +~ ~= ~=:= +~== ~==:= +~=== ~===:= +: +: -: + +---------------------------------------------------- + +[ + ["operator", "!"], + ["operator", "%"], ["operator", "%:="], + ["operator", "&"], ["operator", "&:="], + ["operator", "*"], ["operator", "*:="], ["operator", "**"], ["operator", "**:="], + ["operator", "+"], ["operator", "++"], ["operator", "+:="], ["operator", "++:="], + ["operator", "-"], ["operator", "-:="], ["operator", "--"], ["operator", "--:="], + ["operator", "."], + ["operator", "/"], ["operator", "/:="], + ["operator", ":="], ["operator", ":=:"], + ["operator", "<"], ["operator", "<-"], ["operator", "<->"], ["operator", "<:="], + ["operator", "<<"], ["operator", "<<:="], + ["operator", "<<="], ["operator", "<<=:="], + ["operator", "<="], ["operator", "<=:="], + ["operator", "="], ["operator", "=:="], + ["operator", "=="], ["operator", "==:="], + ["operator", "==="], ["operator", "===:="], + ["operator", ">"], ["operator", ">:="], + ["operator", ">="], ["operator", ">=:="], + ["operator", ">>"], ["operator", ">>:="], + ["operator", ">>="], ["operator", ">>=:="], + ["operator", "?"], ["operator", "?:="], + ["operator", "@"], ["operator", "@:="], + ["operator", "\\"], + ["operator", "^"], ["operator", "^:="], + ["operator", "|"], ["operator", "||"], ["operator", "||:="], + ["operator", "|||"], ["operator", "|||:="], + ["operator", "~"], ["operator", "~="], ["operator", "~=:="], + ["operator", "~=="], ["operator", "~==:="], + ["operator", "~==="], ["operator", "~===:="], + ["operator", ":"], ["operator", "+:"], ["operator", "-:"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/icon/string_feature.test b/docs/_style/prism-master/tests/languages/icon/string_feature.test new file mode 100644 index 0000000000..78bc0349ac --- /dev/null +++ b/docs/_style/prism-master/tests/languages/icon/string_feature.test @@ -0,0 +1,22 @@ +"" +"Fo\"obar" +"Foo_ +bar_ +baz" + +'' +'a\'zerty' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"Fo\\\"obar\""], + ["string", "\"Foo_\r\nbar_\r\nbaz\""], + ["string", "''"], + ["string", "'a\\'zerty'"] +] + +---------------------------------------------------- + +Checks for strings and csets. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/comment_feature.test b/docs/_style/prism-master/tests/languages/inform7/comment_feature.test new file mode 100644 index 0000000000..f0aedfe0d3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/comment_feature.test @@ -0,0 +1,15 @@ +[Foobar] +[Foo +bar +baz] + +---------------------------------------------------- + +[ + ["comment", "[Foobar]"], + ["comment", "[Foo\r\nbar\r\nbaz]"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/keyword_feature.test b/docs/_style/prism-master/tests/languages/inform7/keyword_feature.test new file mode 100644 index 0000000000..b2497b4a78 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/keyword_feature.test @@ -0,0 +1,85 @@ +after +before +carry out +check +continue the action +definition : +do nothing +else +end if +end unless +end the story +every turn +if +include +instead +instead of +let +move +no +now +otherwise +repeat +report +resume the story +rule for +running through +say +saying +stop the action +test +try +trying +understand +unless +use +when +while +yes + +---------------------------------------------------- + +[ + ["keyword", "after"], + ["keyword", "before"], + ["keyword", "carry out"], + ["keyword", "check"], + ["keyword", "continue the action"], + ["keyword", "definition"], ["punctuation", ":"], + ["keyword", "do nothing"], + ["keyword", "else"], + ["keyword", "end if"], + ["keyword", "end unless"], + ["keyword", "end the story"], + ["keyword", "every turn"], + ["keyword", "if"], + ["keyword", "include"], + ["keyword", "instead"], + ["keyword", "instead of"], + ["keyword", "let"], + ["keyword", "move"], + ["keyword", "no"], + ["keyword", "now"], + ["keyword", "otherwise"], + ["keyword", "repeat"], + ["keyword", "report"], + ["keyword", "resume the story"], + ["keyword", "rule for"], + ["keyword", "running through"], + ["keyword", "say"], + ["keyword", "saying"], + ["keyword", "stop the action"], + ["keyword", "test"], + ["keyword", "try"], + ["keyword", "trying"], + ["keyword", "understand"], + ["keyword", "unless"], + ["keyword", "use"], + ["keyword", "when"], + ["keyword", "while"], + ["keyword", "yes"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/number_feature.test b/docs/_style/prism-master/tests/languages/inform7/number_feature.test new file mode 100644 index 0000000000..cb5ca7ff61 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/number_feature.test @@ -0,0 +1,25 @@ +42 +3.14159 +50kg +100m +one two three +four five six +seven eight nine +ten eleven twelve + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "50kg"], + ["number", "100m"], + ["number", "one"], ["number", "two"], ["number", "three"], + ["number", "four"], ["number", "five"], ["number", "six"], + ["number", "seven"], ["number", "eight"], ["number", "nine"], + ["number", "ten"], ["number", "eleven"], ["number", "twelve"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/position_feature.test b/docs/_style/prism-master/tests/languages/inform7/position_feature.test new file mode 100644 index 0000000000..a29821797f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/position_feature.test @@ -0,0 +1,73 @@ +above +adjacent to +back side of +below +between +down +east +everywhere +front side +here +in +inside +inside from +north +northeast +northwest +nowhere +on +on top of +other side +outside +outside from +part of +parts of +regionally in +south +southeast +southwest +through +up +west +within + +---------------------------------------------------- + +[ + ["position", "above"], + ["position", "adjacent to"], + ["position", "back side of"], + ["position", "below"], + ["position", "between"], + ["position", "down"], + ["position", "east"], + ["position", "everywhere"], + ["position", "front side"], + ["position", "here"], + ["position", "in"], + ["position", "inside"], + ["position", "inside from"], + ["position", "north"], + ["position", "northeast"], + ["position", "northwest"], + ["position", "nowhere"], + ["position", "on"], + ["position", "on top of"], + ["position", "other side"], + ["position", "outside"], + ["position", "outside from"], + ["position", "part of"], + ["position", "parts of"], + ["position", "regionally in"], + ["position", "south"], + ["position", "southeast"], + ["position", "southwest"], + ["position", "through"], + ["position", "up"], + ["position", "west"], + ["position", "within"] +] + +---------------------------------------------------- + +Checks for positions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/property_feature.test b/docs/_style/prism-master/tests/languages/inform7/property_feature.test new file mode 100644 index 0000000000..4954b9e90f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/property_feature.test @@ -0,0 +1,157 @@ +adjacent +carried +closed +concealed +contained +dark +described +edible +empty +enclosed +enterable +even +female +fixed in place +full +handled +held +improper-named +incorporated +inedible +invisible +lighted +lit +lockable +locked +male +marked for listing +mentioned +negative +neuter +non-empty +non-full +non-recurring +odd +opaque +open +openable +plural-named +portable +positive +privately-named +proper-named +provided +publically-named +pushable between rooms +recurring +related +rubbing +scenery +seen +singular-named +supported +swinging +switchable +switched +switched on +switched off +touchable +touched +transparent +unconcealed +undescribed +unlit +unlocked +unmarked for listing +unmentioned +unopenable +untouchable +unvisited +variable +visible +visited +wearable +worn + +---------------------------------------------------- + +[ + ["property", "adjacent"], + ["property", "carried"], + ["property", "closed"], + ["property", "concealed"], + ["property", "contained"], + ["property", "dark"], + ["property", "described"], + ["property", "edible"], + ["property", "empty"], + ["property", "enclosed"], + ["property", "enterable"], + ["property", "even"], + ["property", "female"], + ["property", "fixed in place"], + ["property", "full"], + ["property", "handled"], + ["property", "held"], + ["property", "improper-named"], + ["property", "incorporated"], + ["property", "inedible"], + ["property", "invisible"], + ["property", "lighted"], + ["property", "lit"], + ["property", "lockable"], + ["property", "locked"], + ["property", "male"], + ["property", "marked for listing"], + ["property", "mentioned"], + ["property", "negative"], + ["property", "neuter"], + ["property", "non-empty"], + ["property", "non-full"], + ["property", "non-recurring"], + ["property", "odd"], + ["property", "opaque"], + ["property", "open"], + ["property", "openable"], + ["property", "plural-named"], + ["property", "portable"], + ["property", "positive"], + ["property", "privately-named"], + ["property", "proper-named"], + ["property", "provided"], + ["property", "publically-named"], + ["property", "pushable between rooms"], + ["property", "recurring"], + ["property", "related"], + ["property", "rubbing"], + ["property", "scenery"], + ["property", "seen"], + ["property", "singular-named"], + ["property", "supported"], + ["property", "swinging"], + ["property", "switchable"], + ["property", "switched"], + ["property", "switched on"], + ["property", "switched off"], + ["property", "touchable"], + ["property", "touched"], + ["property", "transparent"], + ["property", "unconcealed"], + ["property", "undescribed"], + ["property", "unlit"], + ["property", "unlocked"], + ["property", "unmarked for listing"], + ["property", "unmentioned"], + ["property", "unopenable"], + ["property", "untouchable"], + ["property", "unvisited"], + ["property", "variable"], + ["property", "visible"], + ["property", "visited"], + ["property", "wearable"], + ["property", "worn"] +] + +---------------------------------------------------- + +Checks for properties. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/string_feature.test b/docs/_style/prism-master/tests/languages/inform7/string_feature.test new file mode 100644 index 0000000000..56a880e163 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/string_feature.test @@ -0,0 +1,49 @@ +"" +"foo" +"foo +bar" +"[if the player is in Center Ring]A magician's booth stands in the corner, painted dark blue with glittering gold stars.[otherwise if the magician's booth is closed]A crack of light indicates the way back out to the center ring.[otherwise]The door stands open to the outside.[end if]" + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["\"foo\""]], + ["string", ["\"foo\r\nbar\""]], + ["string", [ + "\"", + ["substitution", [ + ["delimiter", "["], + ["keyword", "if"], ["text", "the"], + ["type", "player"], ["verb", "is"], + ["position", "in"], ["text", "Center Ring"], + ["delimiter", "]"] + ]], + "A magician's booth stands in the corner, painted dark blue with glittering gold stars.", + ["substitution", [ + ["delimiter", "["], + ["keyword", "otherwise"], ["keyword", "if"], + ["text", "the magician's booth"], + ["verb", "is"], + ["property", "closed"], + ["delimiter", "]"] + ]], + "A crack of light indicates the way back out to the center ring.", + ["substitution", [ + ["delimiter", "["], + ["keyword", "otherwise"], + ["delimiter", "]"] + ]], + "The door stands open to the outside.", + ["substitution", [ + ["delimiter", "["], + ["keyword", "end if"], + ["delimiter", "]"] + ]], + "\"" + ]] +] + +---------------------------------------------------- + +Checks for strings and text substitution. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/title_feature.test b/docs/_style/prism-master/tests/languages/inform7/title_feature.test new file mode 100644 index 0000000000..ec3cdbfbb4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/title_feature.test @@ -0,0 +1,21 @@ +Volume 1 - Foobar +Book 2 - Foobar +Part 3 - Foobar +Chapter 4 - Foobar +Section 5 - Foobar +Table 6 - Foobar + +---------------------------------------------------- + +[ + ["title", "Volume 1 - Foobar"], + ["title", "Book 2 - Foobar"], + ["title", "Part 3 - Foobar"], + ["title", "Chapter 4 - Foobar"], + ["title", "Section 5 - Foobar"], + ["title", "Table 6 - Foobar"] +] + +---------------------------------------------------- + +Checks for titles. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/variable_feature.test b/docs/_style/prism-master/tests/languages/inform7/variable_feature.test new file mode 100644 index 0000000000..25c2f74052 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/variable_feature.test @@ -0,0 +1,141 @@ +action +actions +activity +activities +actor +actors +animal +animals +backdrop +backdrops +container +containers +device +devices +direction +directions +door +doors +holder +holders +kind +kinds +list +lists +man +men +nobody +nothing +noun +nouns +number +numbers +object +objects +people +person +persons +player +player's holdall +region +regions +relation +relations +room +rooms +rule +rules +rulebook +rulebooks +scene +scenes +someone +something +supporter +supporters +table +tables +text +texts +thing +things +time +vehicle +vehicles +woman +women + +---------------------------------------------------- + +[ + ["type", "action"], + ["type", "actions"], + ["type", "activity"], + ["type", "activities"], + ["type", "actor"], + ["type", "actors"], + ["type", "animal"], + ["type", "animals"], + ["type", "backdrop"], + ["type", "backdrops"], + ["type", "container"], + ["type", "containers"], + ["type", "device"], + ["type", "devices"], + ["type", "direction"], + ["type", "directions"], + ["type", "door"], + ["type", "doors"], + ["type", "holder"], + ["type", "holders"], + ["type", "kind"], + ["type", "kinds"], + ["type", "list"], + ["type", "lists"], + ["type", "man"], + ["type", "men"], + ["type", "nobody"], + ["type", "nothing"], + ["type", "noun"], + ["type", "nouns"], + ["type", "number"], + ["type", "numbers"], + ["type", "object"], + ["type", "objects"], + ["type", "people"], + ["type", "person"], + ["type", "persons"], + ["type", "player"], + ["type", "player's holdall"], + ["type", "region"], + ["type", "regions"], + ["type", "relation"], + ["type", "relations"], + ["type", "room"], + ["type", "rooms"], + ["type", "rule"], + ["type", "rules"], + ["type", "rulebook"], + ["type", "rulebooks"], + ["type", "scene"], + ["type", "scenes"], + ["type", "someone"], + ["type", "something"], + ["type", "supporter"], + ["type", "supporters"], + ["type", "table"], + ["type", "tables"], + ["type", "text"], + ["type", "texts"], + ["type", "thing"], + ["type", "things"], + ["type", "time"], + ["type", "vehicle"], + ["type", "vehicles"], + ["type", "woman"], + ["type", "women"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/inform7/verb_feature.test b/docs/_style/prism-master/tests/languages/inform7/verb_feature.test new file mode 100644 index 0000000000..3da285d303 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/inform7/verb_feature.test @@ -0,0 +1,213 @@ +applying to +are +attacking +answering +asking +be +being +burning +buying +called +carries +carry +carrying +climbing +closing +conceal +conceals +concealing +consulting +contain +contains +containing +cutting +drinking +dropping +eating +enclose +encloses +enclosing +entering +examining +exiting +getting +giving +going +have +has +having +hold +holds +holding +imply +implies +incorporate +incorporates +incorporating +inserting +is +jumping +kissing +listening +locking +looking +mean +means +meaning +opening +provide +provides +providing +pulling +pushing +putting +relate +relates +relating +removing +searching +see +sees +seeing +setting +showing +singing +sleeping +smelling +squeezing +switching +support +supports +supporting +swearing +taking +tasting +telling +thinking +throwing +touching +turning +tying +unlock +unlocks +unlocking +vary +varies +varying +waiting +waking +waving +wear +wears +wearing + +---------------------------------------------------- + +[ + ["verb", "applying to"], + ["verb", "are"], + ["verb", "attacking"], + ["verb", "answering"], + ["verb", "asking"], + ["verb", "be"], + ["verb", "being"], + ["verb", "burning"], + ["verb", "buying"], + ["verb", "called"], + ["verb", "carries"], + ["verb", "carry"], + ["verb", "carrying"], + ["verb", "climbing"], + ["verb", "closing"], + ["verb", "conceal"], + ["verb", "conceals"], + ["verb", "concealing"], + ["verb", "consulting"], + ["verb", "contain"], + ["verb", "contains"], + ["verb", "containing"], + ["verb", "cutting"], + ["verb", "drinking"], + ["verb", "dropping"], + ["verb", "eating"], + ["verb", "enclose"], + ["verb", "encloses"], + ["verb", "enclosing"], + ["verb", "entering"], + ["verb", "examining"], + ["verb", "exiting"], + ["verb", "getting"], + ["verb", "giving"], + ["verb", "going"], + ["verb", "have"], + ["verb", "has"], + ["verb", "having"], + ["verb", "hold"], + ["verb", "holds"], + ["verb", "holding"], + ["verb", "imply"], + ["verb", "implies"], + ["verb", "incorporate"], + ["verb", "incorporates"], + ["verb", "incorporating"], + ["verb", "inserting"], + ["verb", "is"], + ["verb", "jumping"], + ["verb", "kissing"], + ["verb", "listening"], + ["verb", "locking"], + ["verb", "looking"], + ["verb", "mean"], + ["verb", "means"], + ["verb", "meaning"], + ["verb", "opening"], + ["verb", "provide"], + ["verb", "provides"], + ["verb", "providing"], + ["verb", "pulling"], + ["verb", "pushing"], + ["verb", "putting"], + ["verb", "relate"], + ["verb", "relates"], + ["verb", "relating"], + ["verb", "removing"], + ["verb", "searching"], + ["verb", "see"], + ["verb", "sees"], + ["verb", "seeing"], + ["verb", "setting"], + ["verb", "showing"], + ["verb", "singing"], + ["verb", "sleeping"], + ["verb", "smelling"], + ["verb", "squeezing"], + ["verb", "switching"], + ["verb", "support"], + ["verb", "supports"], + ["verb", "supporting"], + ["verb", "swearing"], + ["verb", "taking"], + ["verb", "tasting"], + ["verb", "telling"], + ["verb", "thinking"], + ["verb", "throwing"], + ["verb", "touching"], + ["verb", "turning"], + ["verb", "tying"], + ["verb", "unlock"], + ["verb", "unlocks"], + ["verb", "unlocking"], + ["verb", "vary"], + ["verb", "varies"], + ["verb", "varying"], + ["verb", "waiting"], + ["verb", "waking"], + ["verb", "waving"], + ["verb", "wear"], + ["verb", "wears"], + ["verb", "wearing"] +] + +---------------------------------------------------- + +Checks for verbs. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ini/comment_feature.test b/docs/_style/prism-master/tests/languages/ini/comment_feature.test new file mode 100644 index 0000000000..85faefe78b --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ini/comment_feature.test @@ -0,0 +1,13 @@ +; +; foobar + +---------------------------------------------------- + +[ + ["comment", ";"], + ["comment", "; foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ini/key_value_feature.test b/docs/_style/prism-master/tests/languages/ini/key_value_feature.test new file mode 100644 index 0000000000..5d25d9d3cf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ini/key_value_feature.test @@ -0,0 +1,21 @@ +foo=Bar Baz +foobar=42 + +---------------------------------------------------- + +[ + ["constant", "foo"], + ["attr-value", [ + ["punctuation", "="], + "Bar Baz" + ]], + ["constant", "foobar"], + ["attr-value", [ + ["punctuation", "="], + "42" + ]] +] + +---------------------------------------------------- + +Checks for key/value pairs. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/ini/selector_feature.test b/docs/_style/prism-master/tests/languages/ini/selector_feature.test new file mode 100644 index 0000000000..3158a665da --- /dev/null +++ b/docs/_style/prism-master/tests/languages/ini/selector_feature.test @@ -0,0 +1,13 @@ +[owner] +[foobar] + +---------------------------------------------------- + +[ + ["selector", "[owner]"], + ["selector", "[foobar]"] +] + +---------------------------------------------------- + +Checks for section titles. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/io/comment_feature.test b/docs/_style/prism-master/tests/languages/io/comment_feature.test new file mode 100644 index 0000000000..fb67d07b4d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/io/comment_feature.test @@ -0,0 +1,19 @@ +// +// Foobar +#!/usr/bin/env io +/* multiline +comment +*/ + +---------------------------------------------------- + +[ + ["comment", "//"], + ["comment", "// Foobar"], + ["comment", "#!/usr/bin/env io"], + ["comment", "/* multiline\ncomment\n*/"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/docs/_style/prism-master/tests/languages/io/number_feature.test b/docs/_style/prism-master/tests/languages/io/number_feature.test new file mode 100644 index 0000000000..371be063de --- /dev/null +++ b/docs/_style/prism-master/tests/languages/io/number_feature.test @@ -0,0 +1,23 @@ +123 +123.456 +0.456 +123e-4 +123e4 +123.456e-7 +123.456e2 + +------------------------------ + +[ + ["number", "123"], + ["number", "123.456"], + ["number", "0.456"], + ["number", "123e-4"], + ["number", "123e4"], + ["number", "123.456e-7"], + ["number", "123.456e2"] +] + +------------------------------ + +Check numbers. diff --git a/docs/_style/prism-master/tests/languages/io/operator_feature.test b/docs/_style/prism-master/tests/languages/io/operator_feature.test new file mode 100644 index 0000000000..5378bc5254 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/io/operator_feature.test @@ -0,0 +1,26 @@ +::= := = +== != >= <= +&& and || or not +.. ++ - / * ** +%= &= *= += -= /= <<= >>= ^= |= +? ?? @ @@ +return + +------------------------------------------------------------------------------------------------------------------------- + +[ + ["operator", "::=" ] , ["operator", ":=" ] , ["operator", "=" ] , + ["operator", "==" ] , ["operator", "!=" ] , ["operator", ">=" ] , ["operator", "<=" ] , + ["operator", "&&" ] , ["operator", "and" ] , ["operator", "||" ] , ["operator", "or" ] , ["operator", "not" ] , + ["operator", ".." ] , + ["operator", "+" ] , ["operator", "-" ] , ["operator", "/" ] , ["operator", "*" ] , ["operator", "**" ] , + ["operator", "%=" ] , ["operator", "&=" ] , ["operator", "*=" ] , ["operator", "+=" ] , ["operator", "-=" ] , + ["operator", "/=" ] , ["operator", "<<=" ] , ["operator", ">>=" ] , ["operator", "^=" ] , ["operator", "|=" ] , + ["operator", "?" ] , ["operator", "??" ] , ["operator", "@" ] , ["operator", "@@" ] , + ["operator", "return" ] +] + +------------------------------------------------------------------------------------------------------------------------- + +Check operators. diff --git a/docs/_style/prism-master/tests/languages/io/string_feature.test b/docs/_style/prism-master/tests/languages/io/string_feature.test new file mode 100644 index 0000000000..5b4f003eb8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/io/string_feature.test @@ -0,0 +1,18 @@ +"" +"""""" +"this is a \"test\".\nThis is only a test." +"""this is a "test". +This is only a test.""" + +------------------------------------------------------------------------- + +[ + ["string", "\"\""], + ["triple-quoted-string", "\"\"\"\"\"\""], + ["string", "\"this is a \\\"test\\\".\\nThis is only a test.\""], + ["triple-quoted-string", "\"\"\"this is a \"test\".\nThis is only a test.\"\"\""] +] + +------------------------------------------------------------------------- + +Check strings. diff --git a/docs/_style/prism-master/tests/languages/j/adverb_feature.test b/docs/_style/prism-master/tests/languages/j/adverb_feature.test new file mode 100644 index 0000000000..2374d72f7c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/adverb_feature.test @@ -0,0 +1,19 @@ +~ } +/ /. +\ \. +b. f. M. +t. t: + +---------------------------------------------------- + +[ + ["adverb", "~"], ["adverb", "}"], + ["adverb", "/"], ["adverb", "/."], + ["adverb", "\\"], ["adverb", "\\."], + ["adverb", "b."], ["adverb", "f."], ["adverb", "M."], + ["adverb", "t."], ["adverb", "t:"] +] + +---------------------------------------------------- + +Checks for adverbs. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/comment_feature.test b/docs/_style/prism-master/tests/languages/j/comment_feature.test new file mode 100644 index 0000000000..c816bf19fa --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/comment_feature.test @@ -0,0 +1,13 @@ +NB. +NB. Foo bar + +---------------------------------------------------- + +[ + ["comment", "NB."], + ["comment", "NB. Foo bar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/conjunction_feature.test b/docs/_style/prism-master/tests/languages/j/conjunction_feature.test new file mode 100644 index 0000000000..0fcc2e894d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/conjunction_feature.test @@ -0,0 +1,41 @@ +& &. &.: &: + +. .. .: +: :. :: +@ @. @: + +!. !: +D. D: + +;. d. H. T. + +` `: + +^: L: S: + +" + +---------------------------------------------------- + +[ + ["conjunction", "&"], ["conjunction", "&."], ["conjunction", "&.:"], ["conjunction", "&:"], + + ["conjunction", "."], ["conjunction", ".."], ["conjunction", ".:"], + ["conjunction", ":"], ["conjunction", ":."], ["conjunction", "::"], + ["conjunction", "@"], ["conjunction", "@."], ["conjunction", "@:"], + + ["conjunction", "!."], ["conjunction", "!:"], + ["conjunction", "D."], ["conjunction", "D:"], + + ["conjunction", ";."], ["conjunction", "d."], ["conjunction", "H."], ["conjunction", "T."], + + ["conjunction", "`"], ["conjunction", "`:"], + + ["conjunction", "^:"], ["conjunction", "L:"], ["conjunction", "S:"], + + ["conjunction", "\""] +] + +---------------------------------------------------- + +Checks for conjunctions. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/keyword_feature.test b/docs/_style/prism-master/tests/languages/j/keyword_feature.test new file mode 100644 index 0000000000..38f982d87a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/keyword_feature.test @@ -0,0 +1,77 @@ +adverb +conjunction +CR +def +define +dyad +LF +monad +noun +verb + +assert. +break. +case. +catch. +catchd. +catcht. +continue. +do. +else. +elseif. +end. +fcase. +for. +for_foobar. +goto_foobar. +if. +label_foobar. +return. +select. +throw. +try. +while. +whilst. + +---------------------------------------------------- + +[ + ["keyword", "adverb"], + ["keyword", "conjunction"], + ["keyword", "CR"], + ["keyword", "def"], + ["keyword", "define"], + ["keyword", "dyad"], + ["keyword", "LF"], + ["keyword", "monad"], + ["keyword", "noun"], + ["keyword", "verb"], + + ["keyword", "assert."], + ["keyword", "break."], + ["keyword", "case."], + ["keyword", "catch."], + ["keyword", "catchd."], + ["keyword", "catcht."], + ["keyword", "continue."], + ["keyword", "do."], + ["keyword", "else."], + ["keyword", "elseif."], + ["keyword", "end."], + ["keyword", "fcase."], + ["keyword", "for."], + ["keyword", "for_foobar."], + ["keyword", "goto_foobar."], + ["keyword", "if."], + ["keyword", "label_foobar."], + ["keyword", "return."], + ["keyword", "select."], + ["keyword", "throw."], + ["keyword", "try."], + ["keyword", "while."], + ["keyword", "whilst."] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/number_feature.test b/docs/_style/prism-master/tests/languages/j/number_feature.test new file mode 100644 index 0000000000..ecd2dc2a45 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/number_feature.test @@ -0,0 +1,41 @@ +2.3e2 2.3e_2 2j3 +230 0.023 2j3 + +2p1 1p_1 +6.28319 0.31831 + +1x2 2x1 1x_1 +7.38906 5.43656 0.367879 + +2e2j_2e2 2e2j2p1 2ad45 2ar0.785398 +200j_200 628.319j6.28319 1.41421j1.41421 1.41421j1.41421 + +16b1f 10b23 _10b23 1e2b23 2b111.111 +31 23 _17 203 7.875 + +_ __ + +---------------------------------------------------- + +[ + ["number", "2.3e2"], ["number", "2.3e_2"], ["number", "2j3"], + ["number", "230"], ["number", "0.023"], ["number", "2j3"], + + ["number", "2p1"], ["number", "1p_1"], + ["number", "6.28319"], ["number", "0.31831"], + + ["number", "1x2"], ["number", "2x1"], ["number", "1x_1"], + ["number", "7.38906"], ["number", "5.43656"], ["number", "0.367879"], + + ["number", "2e2j_2e2"], ["number", "2e2j2p1"], ["number", "2ad45"], ["number", "2ar0.785398"], + ["number", "200j_200"], ["number", "628.319j6.28319"], ["number", "1.41421j1.41421"], ["number", "1.41421j1.41421"], + + ["number", "16b1f"], ["number", "10b23"], ["number", "_10b23"], ["number", "1e2b23"], ["number", "2b111.111"], + ["number", "31"], ["number", "23"], ["number", "_17"], ["number", "203"], ["number", "7.875"], + + ["number", "_"], ["number", "__"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/string_feature.test b/docs/_style/prism-master/tests/languages/j/string_feature.test new file mode 100644 index 0000000000..8cfa97fc3c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/string_feature.test @@ -0,0 +1,13 @@ +'' +'fo''obar' + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "'fo''obar'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/j/verb_feature.test b/docs/_style/prism-master/tests/languages/j/verb_feature.test new file mode 100644 index 0000000000..55f908663f --- /dev/null +++ b/docs/_style/prism-master/tests/languages/j/verb_feature.test @@ -0,0 +1,93 @@ +{ {. {: {:: + +p. p.. p: + += +! +] + +< <. <: +> >. >: ++ +. +: +* *. *: +- -. -: +% %. %: +$ $. $: +| |. |: +, ,. ,: +# #. #: + +^ ^. +? ?. + +; ;: +[ [: + +~. ~: +}. }: +". ": +i. i: + +A. C. e. +E. I. j. +L. o. r. + +_: /: \: +q: s: u: x: +_9: _8: _7: +_6: _5: _4: +_3: _2: _1: +1: 2: 3: +4: 5: 6: +7: 8: 9: + +---------------------------------------------------- + +[ + ["verb", "{"], ["verb", "{."], ["verb", "{:"], ["verb", "{::"], + + ["verb", "p."], ["verb", "p.."], ["verb", "p:"], + + ["verb", "="], + ["verb", "!"], + ["verb", "]"], + + ["verb", "<"], ["verb", "<."], ["verb", "<:"], + ["verb", ">"], ["verb", ">."], ["verb", ">:"], + ["verb", "+"], ["verb", "+."], ["verb", "+:"], + ["verb", "*"], ["verb", "*."], ["verb", "*:"], + ["verb", "-"], ["verb", "-."], ["verb", "-:"], + ["verb", "%"], ["verb", "%."], ["verb", "%:"], + ["verb", "$"], ["verb", "$."], ["verb", "$:"], + ["verb", "|"], ["verb", "|."], ["verb", "|:"], + ["verb", ","], ["verb", ",."], ["verb", ",:"], + ["verb", "#"], ["verb", "#."], ["verb", "#:"], + + ["verb", "^"], ["verb", "^."], + ["verb", "?"], ["verb", "?."], + + ["verb", ";"], ["verb", ";:"], + ["verb", "["], ["verb", "[:"], + + ["verb", "~."], ["verb", "~:"], + ["verb", "}."], ["verb", "}:"], + ["verb", "\"."], ["verb", "\":"], + ["verb", "i."], ["verb", "i:"], + + ["verb", "A."], ["verb", "C."], ["verb", "e."], + ["verb", "E."], ["verb", "I."], ["verb", "j."], + ["verb", "L."], ["verb", "o."], ["verb", "r."], + + ["verb", "_:"], ["verb", "/:"], ["verb", "\\:"], + ["verb", "q:"], ["verb", "s:"], ["verb", "u:"], ["verb", "x:"], + ["verb", "_9:"], ["verb", "_8:"], ["verb", "_7:"], + ["verb", "_6:"], ["verb", "_5:"], ["verb", "_4:"], + ["verb", "_3:"], ["verb", "_2:"], ["verb", "_1:"], + ["verb", "1:"], ["verb", "2:"], ["verb", "3:"], + ["verb", "4:"], ["verb", "5:"], ["verb", "6:"], + ["verb", "7:"], ["verb", "8:"], ["verb", "9:"] +] + +---------------------------------------------------- + +Checks for verbs. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/java/function_featrue.test b/docs/_style/prism-master/tests/languages/java/function_featrue.test new file mode 100644 index 0000000000..2ca6169f8e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/function_featrue.test @@ -0,0 +1,32 @@ +void foo(int a) {} +foo(0); +Bar::foo; + +---------------------------------------------------- + +[ + ["keyword", "void"], + ["function", "foo"], + ["punctuation", "("], + ["keyword", "int"], + " a", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "foo"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", "Bar"], + ["operator", ":"], + ["operator", ":"], + ["function", "foo"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/docs/_style/prism-master/tests/languages/java/generics_feature.test b/docs/_style/prism-master/tests/languages/java/generics_feature.test new file mode 100644 index 0000000000..d1d5e5363a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/generics_feature.test @@ -0,0 +1,67 @@ +public class Solo {} +Solo val = new Solo(); +Duo dual = new Duo(12.2585, 'C'); + +---------------------------------------------------- + +[ + ["keyword", "public"], + ["keyword", "class"], + ["class-name", "Solo"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "T"], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["class-name", "Solo"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "Integer"], + ["punctuation", ">"] + ]], + " val ", + ["operator", "="], + ["keyword", "new"], + ["class-name", "Solo"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "Integer"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", "Duo"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "Double"], + ["punctuation", ","], + ["class-name", "Character"], + ["punctuation", ">"] + ]], + " dual ", + ["operator", "="], + ["keyword", "new"], + ["class-name", "Duo"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "Double"], + ["punctuation", ","], + ["class-name", "Character"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["number", "12.2585"], + ["punctuation", ","], + ["string", "'C'"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for generics. diff --git a/docs/_style/prism-master/tests/languages/java/issue1351.test b/docs/_style/prism-master/tests/languages/java/issue1351.test new file mode 100644 index 0000000000..3034e3e857 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/issue1351.test @@ -0,0 +1,27 @@ +public class AllChangesIndexer extends SiteIndexer { + +---------------------------------------------------- + +[ + ["keyword", "public"], + ["keyword", "class"], + ["class-name", "AllChangesIndexer"], + ["keyword", "extends"], + ["class-name", "SiteIndexer"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "Change"], + ["punctuation", "."], + ["class-name", "Id"], + ["punctuation", ","], + ["class-name", "ChangeData"], + ["punctuation", ","], + ["class-name", "ChangeIndex"], + ["punctuation", ">"] + ]], + ["punctuation", "{"] +] + +---------------------------------------------------- + +Checks for generics. See #1351 diff --git a/docs/_style/prism-master/tests/languages/java/keyword_feature.test b/docs/_style/prism-master/tests/languages/java/keyword_feature.test new file mode 100644 index 0000000000..5e5604d1bb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/keyword_feature.test @@ -0,0 +1,59 @@ +abstract continue for +new +switch assert default +goto package synchronized +boolean do if private +this break double +implements +protected throw byte else +import public throws case +enum +instanceof +return transient catch +extends +int short try char +final +interface +static void +class +finally long +strictfp volatile const +float native super while +var null +module requires transitive +exports uses open +opens with to provides + +---------------------------------------------------- + +[ + ["keyword", "abstract"], ["keyword", "continue"], ["keyword", "for"], + ["keyword", "new"], + ["keyword", "switch"], ["keyword", "assert"], ["keyword", "default"], + ["keyword", "goto"], ["keyword", "package"], ["keyword", "synchronized"], + ["keyword", "boolean"], ["keyword", "do"], ["keyword", "if"], ["keyword", "private"], + ["keyword", "this"], ["keyword", "break"], ["keyword", "double"], + ["keyword", "implements"], + ["keyword", "protected"], ["keyword", "throw"], ["keyword", "byte"], ["keyword", "else"], + ["keyword", "import"], ["keyword", "public"], ["keyword", "throws"], ["keyword", "case"], + ["keyword", "enum"], + ["keyword", "instanceof"], + ["keyword", "return"], ["keyword", "transient"], ["keyword", "catch"], + ["keyword", "extends"], + ["keyword", "int"], ["keyword", "short"], ["keyword", "try"], ["keyword", "char"], + ["keyword", "final"], + ["keyword", "interface"], + ["keyword", "static"], ["keyword", "void"], + ["keyword", "class"], + ["keyword", "finally"], ["keyword", "long"], + ["keyword", "strictfp"], ["keyword", "volatile"], ["keyword", "const"], + ["keyword", "float"], ["keyword", "native"], ["keyword", "super"], ["keyword", "while"], + ["keyword", "var"], ["keyword", "null"], + ["keyword", "module"], ["keyword", "requires"], ["keyword", "transitive"], + ["keyword", "exports"], ["keyword", "uses"], ["keyword", "open"], + ["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword","provides"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/docs/_style/prism-master/tests/languages/java/module_feature.test b/docs/_style/prism-master/tests/languages/java/module_feature.test new file mode 100644 index 0000000000..983f8ececb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/module_feature.test @@ -0,0 +1,158 @@ +module com.js.prism { + exports java.net.http; + exports jdk.internal.editor.spi to jdk.jshell; + + requires java.base; + requires transitive java.xml; + + uses java.net.ContentHandlerFactory; + + opens java.time.DateTime; + opens java.time.LocalDateTime to java.logging; + + provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; + +} + + +---------------------------------------------------- + [ + ["keyword", "module"], + ["namespace", + ["com", + ["punctuation", "."], + "js", + ["punctuation", "."], + "prism" + ] + ], + ["punctuation", "{"], + + ["keyword", "exports"], + ["namespace", + [ + "java", + ["punctuation", "."], + "net", + ["punctuation", "."], + "http" + ] + ], + ["punctuation", ";"], + + ["keyword", "exports"], + ["namespace", + [ + "jdk", + ["punctuation", "."], + "internal", + ["punctuation", "."], + "editor", + ["punctuation", "."], + "spi" + ] + ], + ["keyword", "to"], + ["namespace", + [ + "jdk", + ["punctuation", "."], + "jshell" + ] + ], + ["punctuation", ";"], + + ["keyword", "requires"], + ["namespace", + [ + "java", + ["punctuation", "."], + "base" + ] + ], + ["punctuation", ";"], + + ["keyword", "requires"], + ["keyword", "transitive"], + ["namespace", + [ + "java", + ["punctuation", "."], + "xml" + ] + ], + ["punctuation", ";"], + + ["keyword", "uses"], + ["namespace", + [ + "java", + ["punctuation", "."], + "net" + ] + ], + ["punctuation", "."], + ["class-name", "ContentHandlerFactory"], + ["punctuation", ";"], + + ["keyword", "opens"], + ["namespace", + [ + "java", + ["punctuation", "."], + "time" + ] + ], + ["punctuation", "."], + ["class-name", "DateTime"], + ["punctuation", ";"], + ["keyword", "opens"], + ["namespace", + [ + "java", + ["punctuation", "."], + "time" + ] + ], + ["punctuation", "."], + ["class-name", "LocalDateTime"], + ["keyword", "to"], + ["namespace", + [ + "java", + ["punctuation", "."], + "logging" + ] + ], + ["punctuation", ";"], + ["keyword", "provides"], + ["namespace", + [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello" + ] + ], + ["punctuation", "."], + ["class-name", "HelloInterface"], + ["keyword", "with"], + ["namespace", + [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello" + ] + ], + ["punctuation", "."], + ["class-name", "HelloModules"], + ["punctuation", ";"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for module definition. diff --git a/docs/_style/prism-master/tests/languages/java/number_feature.test b/docs/_style/prism-master/tests/languages/java/number_feature.test new file mode 100644 index 0000000000..014ed37f6a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/number_feature.test @@ -0,0 +1,60 @@ +42 +42d +42L + +1.2e3f +0.1E-4f +0.2e+1f + +0xBadFace + +0x1.8p1 +0xa.fp-2 +0xa.fp+2 +0xa.p+3f +0x.fp+3f + +0b11110000 + +1_2_3 +1_2.3_4e-5_6 + +0x1_2 +0x0_1__2_3 + +0b1_1_1_1__0_0_0_0 + + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "42d"], + ["number", "42L"], + + ["number", "1.2e3f"], + ["number", "0.1E-4f"], + ["number", "0.2e+1f"], + + ["number", "0xBadFace"], + + ["number", "0x1.8p1"], + ["number", "0xa.fp-2"], + ["number", "0xa.fp+2"], + ["number", "0xa.p+3f"], + ["number", "0x.fp+3f"], + + ["number", "0b11110000"], + + ["number", "1_2_3"], + ["number", "1_2.3_4e-5_6"], + + ["number", "0x1_2"], + ["number", "0x0_1__2_3"], + + ["number", "0b1_1_1_1__0_0_0_0"] +] + +---------------------------------------------------- + +Checks for binary, hexadecimal and decimal numbers. diff --git a/docs/_style/prism-master/tests/languages/java/operator_feature.test b/docs/_style/prism-master/tests/languages/java/operator_feature.test new file mode 100644 index 0000000000..8c8eb39311 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/operator_feature.test @@ -0,0 +1,37 @@ ++ ++ += +- -- -= +! != +< << <= <<= +> >> >>> >= >>= >>>= += == +& && &= +| || |= +? : ~ +^ ^= +* *= +/ /= +% %= +-> + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "++"], ["operator", "+="], + ["operator", "-"], ["operator", "--"], ["operator", "-="], + ["operator", "!"], ["operator", "!="], + ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="], + ["operator", ">"], ["operator", ">>"], ["operator", ">>>"], ["operator", ">="], ["operator", ">>="], ["operator", ">>>="], + ["operator", "="], ["operator", "=="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], + ["operator", "|"], ["operator", "||"], ["operator", "|="], + ["operator", "?"], ["operator", ":"], ["operator", "~"], + ["operator", "^"], ["operator", "^="], + ["operator", "*"], ["operator", "*="], + ["operator", "/"], ["operator", "/="], + ["operator", "%"], ["operator", "%="], + ["operator", "->"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/docs/_style/prism-master/tests/languages/java/package_feature.test b/docs/_style/prism-master/tests/languages/java/package_feature.test new file mode 100644 index 0000000000..9fe6f1f353 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/java/package_feature.test @@ -0,0 +1,80 @@ +package java.lang; + +import java.lang.Math; +import java.lang.*; + +import static java.lang.Math.PI; +import static java.lang.Math.sin; +import static java.lang.Math.*; + +---------------------------------------------------- + +[ + ["keyword", "package"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang" + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang" + ]], + ["punctuation", "."], + ["class-name", "Math"], + ["punctuation", ";"], + + ["keyword", "import"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang" + ]], + ["punctuation", "."], + "*", + ["punctuation", ";"], + + ["keyword", "import"], + ["keyword", "static"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang" + ]], + ["punctuation", "."], + ["class-name", "Math"], + ["punctuation", "."], + "PI", + ["punctuation", ";"], + + ["keyword", "import"], + ["keyword", "static"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang" + ]], + ["punctuation", "."], + ["class-name", "Math"], + ["punctuation", "."], + "sin", + ["punctuation", ";"], + ["keyword", "import"], + ["keyword", "static"], + ["namespace", [ + "java", + ["punctuation", "."], "lang" + ]], ["punctuation", "."], + ["class-name", "Math"], + ["punctuation", "."], + "*", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for packages. diff --git a/docs/_style/prism-master/tests/languages/javascript+haml/javascript_inclusion.test b/docs/_style/prism-master/tests/languages/javascript+haml/javascript_inclusion.test new file mode 100644 index 0000000000..2420e60f12 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript+haml/javascript_inclusion.test @@ -0,0 +1,24 @@ +:javascript + 0xBadFace + +~ + :javascript + 0xBadFace + +---------------------------------------------------- + +[ + ["filter-javascript", [ + ["filter-name", ":javascript"], + ["number", "0xBadFace"] + ]], + ["punctuation", "~"], + ["filter-javascript", [ + ["filter-name", ":javascript"], + ["number", "0xBadFace"] + ]] +] + +---------------------------------------------------- + +Checks for JavaScript filter in Haml. The tilde serves only as a separator. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript+http/javascript_inclusion.test b/docs/_style/prism-master/tests/languages/javascript+http/javascript_inclusion.test new file mode 100644 index 0000000000..f7977c5545 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript+http/javascript_inclusion.test @@ -0,0 +1,21 @@ +Content-type: application/javascript + +var a = true; + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " application/javascript", + ["application/javascript", [ + ["keyword", "var"], + " a ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"] + ]] +] + +---------------------------------------------------- + +Checks for JavaScript content in HTTP. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/boolean_feature.test b/docs/_style/prism-master/tests/languages/javascript/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/class-method_feature.test b/docs/_style/prism-master/tests/languages/javascript/class-method_feature.test new file mode 100644 index 0000000000..303f481f95 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/class-method_feature.test @@ -0,0 +1,59 @@ +class Test { + foo( x, y = 0) {} + async bar(x, y = 0 ) {} + $ ( ) {} + awaitFoo(){} +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Test"]], + ["punctuation", "{"], + + ["function", "foo"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y ", + ["operator", "="], + ["number", "0"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "async"], + ["function", "bar"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y ", + ["operator", "="], + ["number", "0"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "$"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "awaitFoo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class methods. diff --git a/docs/_style/prism-master/tests/languages/javascript/constant_feature.test b/docs/_style/prism-master/tests/languages/javascript/constant_feature.test new file mode 100644 index 0000000000..e17f2855ad --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/constant_feature.test @@ -0,0 +1,21 @@ +var FOO; +const FOO_BAR; +const BAZ42; + +---------------------------------------------------- + +[ + ["keyword", "var"], + ["constant", "FOO"], + ["punctuation", ";"], + ["keyword", "const"], + ["constant", "FOO_BAR"], + ["punctuation", ";"], + ["keyword", "const"], + ["constant", "BAZ42"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for constants. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/function-variable_feature.test b/docs/_style/prism-master/tests/languages/javascript/function-variable_feature.test new file mode 100644 index 0000000000..f3916f71cd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/function-variable_feature.test @@ -0,0 +1,104 @@ +foo = function ( x, y) {} +{foo: function () {}} +bar = async function baz (x ) {} +baz = async(x) => x +fooBar = x => x +fooBar = ( x, y ) => x +ಠ_ಠ = () => {} +Ƞȡ_҇ = async (ಠ, Ƞ = 2) => {} + +---------------------------------------------------- + +[ + ["function-variable", "foo"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "{"], + ["function-variable", "foo"], + ["punctuation", ":"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation","}"], + ["punctuation","}"], + + ["function-variable", "bar"], + ["operator", "="], + ["keyword", "async"], + ["keyword", "function"], + ["function", "baz"], + ["punctuation", "("], + ["parameter", [ + "x" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "baz"], + ["operator", "="], + ["keyword", "async"], + ["punctuation", "("], + ["parameter", [ + "x" + ]], + ["punctuation", ")"], + ["operator", "=>"], " x\r\n", + + ["function-variable", "fooBar"], + ["operator", "="], + ["parameter", [ + "x" + ]], + ["operator", "=>"], " x\r\n", + + ["function-variable", "fooBar"], + ["operator", "="], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y" + ]], + ["punctuation", ")"], + ["operator", "=>"], " x\r\n", + + ["function-variable", "ಠ_ಠ"], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "Ƞȡ_҇"], + ["operator", "="], + ["keyword", "async"], + ["punctuation", "("], + ["parameter", [ + "ಠ", + ["punctuation", ","], + " Ƞ ", + ["operator", "="], + ["number", "2"] + ]], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for variables obviously containing functions. diff --git a/docs/_style/prism-master/tests/languages/javascript/function_feature.test b/docs/_style/prism-master/tests/languages/javascript/function_feature.test new file mode 100644 index 0000000000..35fa9e929a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/function_feature.test @@ -0,0 +1,29 @@ +foo() +foo () +foo_bar() +foo_bar ( ) +f42() +_() +$() +ಠ_ಠ() +Ƞȡ_҇() +if(notAFunction) + +---------------------------------------------------- + +[ + ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], + ["function", "f42"], ["punctuation", "("], ["punctuation", ")"], + ["function", "_"], ["punctuation", "("], ["punctuation", ")"], + ["function", "$"], ["punctuation", "("], ["punctuation", ")"], + ["function", "ಠ_ಠ"], ["punctuation", "("], ["punctuation", ")"], + ["function", "Ƞȡ_҇"], ["punctuation", "("], ["punctuation", ")"], + ["keyword", "if"], ["punctuation", "("], "notAFunction", ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. Also checks for unicode characters in identifiers. diff --git a/docs/_style/prism-master/tests/languages/javascript/issue1337.test b/docs/_style/prism-master/tests/languages/javascript/issue1337.test new file mode 100644 index 0000000000..e49f78d114 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/issue1337.test @@ -0,0 +1,11 @@ +// gulp.watch('./src/**/*.js', ['move']); + +---------------------------------------------------- + +[ + ["comment", "// gulp.watch('./src/**/*.js', ['move']);"] +] + +---------------------------------------------------- + +Checks for multi-line comment inside single-line comment. See #1337 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/issue1340.test b/docs/_style/prism-master/tests/languages/javascript/issue1340.test new file mode 100644 index 0000000000..3e340344b5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/issue1340.test @@ -0,0 +1,15 @@ +/* + * ([{}]) + * // <= double slash comment + * ([{}]) <= punctuation + */ + +---------------------------------------------------- + +[ + ["comment", "/*\r\n * ([{}])\r\n * // <= double slash comment\r\n * ([{}]) <= punctuation\r\n */"] +] + +---------------------------------------------------- + +Checks for single-line comment inside multi-line comment. See #1340 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/issue1397.test b/docs/_style/prism-master/tests/languages/javascript/issue1397.test new file mode 100644 index 0000000000..6f9b5fb21e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/issue1397.test @@ -0,0 +1,21 @@ +`${`a string`}` + +---------------------------------------------------- + +[ + ["template-string", [ + ["string", "`"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["template-string", [ + ["string", "`a string`"] + ]], + ["interpolation-punctuation", "}"] + ]], + ["string", "`"] + ]] +] + +---------------------------------------------------- + +Checks for nested template strings. See #1397 \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/issue1526.test b/docs/_style/prism-master/tests/languages/javascript/issue1526.test new file mode 100644 index 0000000000..320219cbc9 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/issue1526.test @@ -0,0 +1,35 @@ +fetch('some-resource.json') + .then(response => response.json()) + .catch(console.error); + +---------------------------------------------------- + +[ + ["function", "fetch"], + ["punctuation", "("], + ["string", "'some-resource.json'"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "then"], + ["punctuation", "("], + ["parameter", ["response"]], + ["operator", "=>"], + " response", + ["punctuation", "."], + ["function", "json"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "catch"], + ["punctuation", "("], + "console", + ["punctuation", "."], + "error", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for catch function which is not a keyword. See #1526 diff --git a/docs/_style/prism-master/tests/languages/javascript/keyword_feature.test b/docs/_style/prism-master/tests/languages/javascript/keyword_feature.test new file mode 100644 index 0000000000..8053f2b1b3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/keyword_feature.test @@ -0,0 +1,73 @@ +catch finally; + +as; async; 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; var; void; while; +with; yield; + +---------------------------------------------------- + +[ + ["keyword", "catch"], + ["keyword", "finally"], ["punctuation", ";"], + + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "async"], ["punctuation", ";"], + ["keyword", "await"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "debugger"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "delete"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "export"], ["punctuation", ";"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "from"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "get"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "let"], ["punctuation", ";"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "of"], ["punctuation", ";"], + ["keyword", "package"], ["punctuation", ";"], + ["keyword", "private"], ["punctuation", ";"], + ["keyword", "protected"], ["punctuation", ";"], + ["keyword", "public"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "set"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "super"], ["punctuation", ";"], + ["keyword", "switch"], ["punctuation", ";"], + ["keyword", "this"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "typeof"], ["punctuation", ";"], + ["keyword", "var"], ["punctuation", ";"], + ["keyword", "void"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "with"], ["punctuation", ";"], + ["keyword", "yield"], ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/docs/_style/prism-master/tests/languages/javascript/number_feature.test b/docs/_style/prism-master/tests/languages/javascript/number_feature.test new file mode 100644 index 0000000000..16f0e5fdf3 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/number_feature.test @@ -0,0 +1,36 @@ +42 +3.14159 +4e10 +3.2E+6 +2.1e-10 +0b1101 +0o571 +0xbabe +0xBABE +NaN +Infinity +123n +0x123n + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e10"], + ["number", "3.2E+6"], + ["number", "2.1e-10"], + ["number", "0b1101"], + ["number", "0o571"], + ["number", "0xbabe"], + ["number", "0xBABE"], + ["number", "NaN"], + ["number", "Infinity"], + ["number", "123n"], + ["number", "0x123n"] +] + +---------------------------------------------------- + +Checks for decimal numbers, binary numbers, octal numbers, hexadecimal numbers. +Also checks for keywords representing numbers. diff --git a/docs/_style/prism-master/tests/languages/javascript/operator_feature.test b/docs/_style/prism-master/tests/languages/javascript/operator_feature.test new file mode 100644 index 0000000000..eb46bc4993 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/operator_feature.test @@ -0,0 +1,33 @@ +- -- -= ++ ++ += +< <= << <<= +> >= >> >>= >>> >>>= += == === => +! != !== +& && &= +| || |= +* ** *= **= +/ /= ~ +^ ^= % %= +? ... + +---------------------------------------------------- + +[ + ["operator", "-"], ["operator", "--"], ["operator", "-="], + ["operator", "+"], ["operator", "++"], ["operator", "+="], + ["operator", "<"], ["operator", "<="], ["operator", "<<"], ["operator", "<<="], + ["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", ">>="], ["operator", ">>>"], ["operator", ">>>="], + ["operator", "="], ["operator", "=="], ["operator", "==="], ["operator", "=>"], + ["operator", "!"], ["operator", "!="], ["operator", "!=="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], + ["operator", "|"], ["operator", "||"], ["operator", "|="], + ["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="], + ["operator", "/"], ["operator", "/="], ["operator", "~"], + ["operator", "^"], ["operator", "^="], ["operator", "%"], ["operator", "%="], + ["operator", "?"], ["operator", "..."] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/regex_feature.test b/docs/_style/prism-master/tests/languages/javascript/regex_feature.test new file mode 100644 index 0000000000..e08db8a26e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/regex_feature.test @@ -0,0 +1,29 @@ +/foo bar/; +/foo/gimyu, +/[\[\]]{2,4}(?:foo)*/; +/foo"test"bar/; +/foo\//; +/[]/; +/[\]/]/; +1 / 4 + "/, not a regex"; +/ '1' '2' '3' '4' '5' / +[/foo/] + +---------------------------------------------------- + +[ + ["regex", "/foo bar/"], ["punctuation", ";"], + ["regex", "/foo/gimyu"], ["punctuation", ","], + ["regex", "/[\\[\\]]{2,4}(?:foo)*/"], ["punctuation", ";"], + ["regex", "/foo\"test\"bar/"], ["punctuation", ";"], + ["regex", "/foo\\//"], ["punctuation", ";"], + ["regex", "/[]/"], ["punctuation", ";"], + ["regex", "/[\\]/]/"], ["punctuation", ";"], + ["number", "1"], ["operator", "/"], ["number", "4"], ["operator", "+"], ["string", "\"/, not a regex\""], ["punctuation", ";"], + ["regex", "/ '1' '2' '3' '4' '5' /"], + ["punctuation", "["], ["regex", "/foo/"], ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for regex. diff --git a/docs/_style/prism-master/tests/languages/javascript/supposed-classes_feature.test b/docs/_style/prism-master/tests/languages/javascript/supposed-classes_feature.test new file mode 100644 index 0000000000..df85fd4fc5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/supposed-classes_feature.test @@ -0,0 +1,30 @@ +Foo.prototype.bar; +Bar.constructor; +fooBar.prototype.bar; + +---------------------------------------------------- + +[ + ["class-name", "Foo"], + ["punctuation", "."], + "prototype", + ["punctuation", "."], + "bar", + ["punctuation", ";"], + + ["class-name", "Bar"], + ["punctuation", "."], + "constructor", + ["punctuation", ";"], + + "\nfooBar", + ["punctuation", "."], + "prototype", + ["punctuation", "."], + "bar", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for supposed function variables based on standard function invocations or modifications. diff --git a/docs/_style/prism-master/tests/languages/javascript/supposed-function_feature.test b/docs/_style/prism-master/tests/languages/javascript/supposed-function_feature.test new file mode 100644 index 0000000000..7568de9b79 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/supposed-function_feature.test @@ -0,0 +1,38 @@ +foo.apply(thisArg, args); +bar.call(...args); +fooBar.bind(thisArg); + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "."], + ["function", "apply"], + ["punctuation", "("], + "thisArg", + ["punctuation", ","], + " args", + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "bar"], + ["punctuation", "."], + ["function", "call"], + ["punctuation", "("], + ["operator", "..."], + "args", + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "fooBar"], + ["punctuation", "."], + ["function", "bind"], + ["punctuation", "("], + "thisArg", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for supposed function variables based on standard function invocations or modifications. diff --git a/docs/_style/prism-master/tests/languages/javascript/template-string_feature.test b/docs/_style/prism-master/tests/languages/javascript/template-string_feature.test new file mode 100644 index 0000000000..664c056ddb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/template-string_feature.test @@ -0,0 +1,49 @@ +`foo bar` +`foo +bar` +`40+2=${40+2}` +`${foo()}` +"foo `a` `b` `c` `d` bar" +"test // test" `template` + +---------------------------------------------------- + +[ + ["template-string", [ + ["string", "`foo bar`"] + ]], + ["template-string", [ + ["string", "`foo\r\nbar`"] + ]], + ["template-string", [ + ["string", "`40+2="], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["number", "40"], + ["operator", "+"], + ["number", "2"], + ["interpolation-punctuation", "}"] + ]], + ["string", "`"] + ]], + ["template-string", [ + ["string", "`"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["interpolation-punctuation", "}"] + ]], + ["string", "`"] + ]], + ["string", "\"foo `a` `b` `c` `d` bar\""], + ["string", "\"test // test\""], + ["template-string", [ + ["string", "`template`"] + ]] +] + +---------------------------------------------------- + +Checks for single-line and multi-line template strings. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javascript/try-catch_feature.test b/docs/_style/prism-master/tests/languages/javascript/try-catch_feature.test new file mode 100644 index 0000000000..c4bbd8b2b8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javascript/try-catch_feature.test @@ -0,0 +1,22 @@ +try { } catch (e) { } finally { } + +---------------------------------------------------- + +[ + ["keyword", "try"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "("], + "e", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "finally"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for try statements. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/javastacktrace/more_feature.test b/docs/_style/prism-master/tests/languages/javastacktrace/more_feature.test new file mode 100644 index 0000000000..8f9dc6ae86 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javastacktrace/more_feature.test @@ -0,0 +1,22 @@ +... 6 more + ... 6 common frames omitted + +---------------------------------------------------- + +[ + ["more", [ + ["punctuation", "..."], + ["number", "6"], + ["keyword", "more"] + ]], + + ["more", [ + ["punctuation", "..."], + ["number", "6"], + ["keyword", "common frames omitted"] + ]] +] + +---------------------------------------------------- + +Checks for the message that some frames were omitted. diff --git a/docs/_style/prism-master/tests/languages/javastacktrace/stack-frame_feature.test b/docs/_style/prism-master/tests/languages/javastacktrace/stack-frame_feature.test new file mode 100644 index 0000000000..b4c400e458 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javastacktrace/stack-frame_feature.test @@ -0,0 +1,71 @@ +at Main.main(Main.java:13) +at Main.main(Main.java:13) Same but with some additional notes +at com.foo.bar.Main$FooBar.main(Native Method) +at Main$FooBar.(Unknown Source) + +---------------------------------------------------- + +[ + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["file", "Main.java"], + ["punctuation", ":"], + ["line-number", "13"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["file", "Main.java"], + ["punctuation", ":"], + ["line-number", "13"] + ]], + ["punctuation", ")"] + ]], + " Same but with some additional notes\n", + + ["stack-frame", [ + ["keyword", "at"], + ["namespace", "com"], + ["punctuation", "."], + ["namespace", "foo"], + ["punctuation", "."], + ["namespace", "bar"], + ["punctuation", "."], + ["class-name", "Main$FooBar"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["keyword", "Native Method"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main$FooBar"], + ["punctuation", "."], + ["function", ""], + ["punctuation", "("], + ["source", [ + ["keyword", "Unknown Source"] + ]], + ["punctuation", ")"] + ]] +] + +---------------------------------------------------- + +Checks for stack frames. diff --git a/docs/_style/prism-master/tests/languages/javastacktrace/summary_feature.test b/docs/_style/prism-master/tests/languages/javastacktrace/summary_feature.test new file mode 100644 index 0000000000..01497f85fd --- /dev/null +++ b/docs/_style/prism-master/tests/languages/javastacktrace/summary_feature.test @@ -0,0 +1,155 @@ +java.lang.NullPointerException +java.lang.NullPointerException: This is bad +HighLevelException: MidLevelException: LowLevelException +HighLevelException: MidLevelException: LowLevelException: This is bad + +Exception in thread "main" java.lang.RuntimeException: A test exception +Exception in thread "main" HighLevelException: MidLevelException: LowLevelException: This is bad + +Caused by: Exception: This also includes causes and suppressed exceptions +Caused by: MidLevelException: LowLevelException +Caused by: com.example.myproject.MyProjectServletException + +Suppressed: java.lang.RuntimeException: could not insert: [com.example.myproject.MyEntity] + +---------------------------------------------------- + +[ + ["summary", [ + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "NullPointerException"] + ]] + ]], + + ["summary", [ + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "NullPointerException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]] + ]], + + ["summary", [ + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["keyword", "Exception in thread"], + ["string", "\"main\""], + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "RuntimeException"] + ]], + ["punctuation", ":"], + ["message", "A test exception"] + ]], + + ["summary", [ + ["keyword", "Exception in thread"], + ["string", "\"main\""], + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "Exception"] + ]], + ["punctuation", ":"], + ["message", "This also includes causes and suppressed exceptions"] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["namespace", "com"], + ["punctuation", "."], + ["namespace", "example"], + ["punctuation", "."], + ["namespace", "myproject"], + ["punctuation", "."], + ["class-name", "MyProjectServletException"] + ]] + ]], + + ["summary", [ + ["keyword", "Suppressed"], + ["punctuation", ":"], + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "RuntimeException"] + ]], + ["punctuation", ":"], + ["message", "could not insert: [com.example.myproject.MyEntity]"] + ]] +] + +---------------------------------------------------- + +Checks for exception summaries. diff --git a/docs/_style/prism-master/tests/languages/jolie/deployment_features.test b/docs/_style/prism-master/tests/languages/jolie/deployment_features.test new file mode 100644 index 0000000000..ebcd86a765 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jolie/deployment_features.test @@ -0,0 +1,43 @@ +Aggregates: First, Second with Third +Redirects: First => Second, Third => Fourth +Jolie: "logger.ol" in LoggerService +log@LoggerService( new )(); +println @ Console( "none" )() +---------------------------------------------------- + [ + [ "keyword", "Aggregates" ], + [ "operator", ":" ], + [ "aggregates", [ + [ "function", "First" ], [ "punctuation", ","], + [ "function", "Second" ], + [ "withExtension", [ + [ "keyword", "with" ], " Third" ] + ] + ] + ], + [ "keyword", "Redirects" ], + [ "operator", ":" ], + [ "redirects", + [ + [ "function", "First" ], + [ "symbol", "=>" ], + [ "function", "Second" ], [ "punctuation", ","], + [ "function", "Third" ], + [ "symbol", "=>" ], + [ "function", "Fourth" ] + ] + ], + [ "keyword", "Jolie" ], + [ "operator", ":" ], + [ "string", "\"logger.ol\"" ], + [ "keyword", "in" ], + [ "function", "LoggerService" ], + "\nlog", [ "symbol", "@" ], [ "function", "LoggerService" ], + "( ", [ "keyword", "new" ], " )()", [ "symbol", ";" ], + "\nprintln ", [ "symbol", "@" ], [ "function", "Console" ], + "( ", [ "string", "\"none\"" ], " )()" +] + +---------------------------------------------------- + +Checks for outputPorts and Aggregates and Redirect constructs. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/jolie/keyword_feature.test b/docs/_style/prism-master/tests/languages/jolie/keyword_feature.test new file mode 100644 index 0000000000..55a95cab1a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jolie/keyword_feature.test @@ -0,0 +1,129 @@ +include +define +is_defined +undef +main +init +outputPort ; +inputPort ; +Location +Protocol +Interfaces +RequestResponse +OneWay +type +interface +extender +throws +cset +csets +forward +courier ; +Aggregates +Redirects +embedded +extender +execution +sequential +concurrent +single +scope +install +throw +comp +cH +default +global +linkIn +linkOut +synchronized +this +new +for +if +else +while +in ; +Jolie +Java +Javascript +nullProcess +spawn +constants +with +provide +until +exit +foreach +instanceof +over +service + +---------------------------------------------------- +[ + ["keyword", "include" ], + ["keyword", "define" ], + ["keyword", "is_defined" ], + ["keyword", "undef" ], + ["keyword", "main" ], + ["keyword", "init" ], + ["keyword", "outputPort" ], [ "symbol", ";" ], + ["keyword", "inputPort" ], [ "symbol", ";" ], + ["keyword", "Location" ], + ["keyword", "Protocol" ], + ["keyword", "Interfaces" ], + ["keyword", "RequestResponse" ], + ["keyword", "OneWay" ], + ["keyword", "type" ], + ["keyword", "interface" ], + ["keyword", "extender" ], + ["keyword", "throws" ], + ["keyword", "cset" ], + ["keyword", "csets" ], + ["keyword", "forward" ], + ["keyword", "courier" ], [ "symbol", ";" ], + ["keyword", "Aggregates" ], + ["keyword", "Redirects" ], + ["keyword", "embedded" ], + ["keyword", "extender" ], + ["keyword", "execution" ], + ["keyword", "sequential" ], + ["keyword", "concurrent" ], + ["keyword", "single" ], + ["keyword", "scope" ], + ["keyword", "install" ], + ["keyword", "throw" ], + ["keyword", "comp" ], + ["keyword", "cH" ], + ["keyword", "default" ], + ["keyword", "global" ], + ["keyword", "linkIn" ], + ["keyword", "linkOut" ], + ["keyword", "synchronized" ], + ["keyword", "this" ], + ["keyword", "new" ], + ["keyword", "for" ], + ["keyword", "if" ], + ["keyword", "else" ], + ["keyword", "while" ], + ["keyword", "in" ], [ "symbol", ";" ], + ["keyword", "Jolie" ], + ["keyword", "Java" ], + ["keyword", "Javascript" ], + ["keyword", "nullProcess" ], + ["keyword", "spawn" ], + ["keyword", "constants" ], + ["keyword", "with" ], + ["keyword", "provide" ], + ["keyword", "until" ], + ["keyword", "exit" ], + ["keyword", "foreach" ], + ["keyword", "instanceof" ], + ["keyword", "over" ], + ["keyword", "service" ] + +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/jolie/number_feature.test b/docs/_style/prism-master/tests/languages/jolie/number_feature.test new file mode 100644 index 0000000000..90d5c96f31 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jolie/number_feature.test @@ -0,0 +1,19 @@ +42 +42L +1.2e3 +0.1E-4 +0.2e+1 + +---------------------------------------------------- + +[ + ["number", "42" ], + ["number", "42L" ], + ["number", "1.2e3" ], + ["number", "0.1E-4" ], + ["number", "0.2e+1" ] +] + +---------------------------------------------------- + +Checks for decimal numbers. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/jolie/operator_feature.test b/docs/_style/prism-master/tests/languages/jolie/operator_feature.test new file mode 100644 index 0000000000..963acc2f13 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jolie/operator_feature.test @@ -0,0 +1,42 @@ ++ ++ += +- -- -= +! != +< <= > >= -> << += == +&& +? * / % ; : | @ + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "++"], + ["operator", "+="], + ["operator", "-"], + ["operator", "--"], + ["operator", "-="], + ["operator", "!"], + ["operator", "!="], + ["operator", "<" ], + ["operator", "<=" ], + ["operator", ">" ], + ["operator", ">=" ], + ["operator", "->" ], + ["operator", "<<" ], + ["operator", "=" ], + ["operator", "==" ], + ["operator", "&&" ], + [ "operator", "?" ], + [ "operator", "*" ], + [ "operator", "/" ], + [ "operator", "%" ], + [ "symbol", ";" ], + [ "operator", ":" ], + [ "symbol", "|" ], + [ "symbol", "@" ] + +] + +---------------------------------------------------- + +Checks for all operators and symbols. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json+http/json-suffix_inclusion.test b/docs/_style/prism-master/tests/languages/json+http/json-suffix_inclusion.test new file mode 100644 index 0000000000..b24009783c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json+http/json-suffix_inclusion.test @@ -0,0 +1,21 @@ +Content-type: application/x.foo+bar+json + +{"foo":"bar"} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " application/x.foo+bar+json", + ["application/json", [ + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for content with JSON suffix in HTTP. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json+http/json_inclusion.test b/docs/_style/prism-master/tests/languages/json+http/json_inclusion.test new file mode 100644 index 0000000000..2282637f57 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json+http/json_inclusion.test @@ -0,0 +1,21 @@ +Content-type: application/json + +{"foo":"bar"} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " application/json", + ["application/json", [ + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for JSON content in HTTP. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json/boolean_feature.test b/docs/_style/prism-master/tests/languages/json/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json/comment_feature.test b/docs/_style/prism-master/tests/languages/json/comment_feature.test new file mode 100644 index 0000000000..50341d3992 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/comment_feature.test @@ -0,0 +1,27 @@ +{ + // Line comment + "//": "//", + + /* Block comment */ + "/*": "*/" +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["comment", "// Line comment"], + ["property", "\"//\""], + ["operator", ":"], + ["string", "\"//\""], + ["punctuation", ","], + ["comment", "/* Block comment */"], + ["property", "\"/*\""], + ["operator", ":"], + ["string", "\"*/\""], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. diff --git a/docs/_style/prism-master/tests/languages/json/null_feature.test b/docs/_style/prism-master/tests/languages/json/null_feature.test new file mode 100644 index 0000000000..1283944abe --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/null_feature.test @@ -0,0 +1,11 @@ +null + +---------------------------------------------------- + +[ + ["null", "null"] +] + +---------------------------------------------------- + +Checks for null. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json/number_feature.test b/docs/_style/prism-master/tests/languages/json/number_feature.test new file mode 100644 index 0000000000..ca87a480d5 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/number_feature.test @@ -0,0 +1,27 @@ +0 +123 +3.14159 +5.0e8 +0.2E+2 +47e-5 +-1.23 +-2.34E33 +-4.34E-33 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "3.14159"], + ["number", "5.0e8"], + ["number", "0.2E+2"], + ["number", "47e-5"], + ["number", "-1.23"], + ["number", "-2.34E33"], + ["number", "-4.34E-33"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/docs/_style/prism-master/tests/languages/json/operator_feature.test b/docs/_style/prism-master/tests/languages/json/operator_feature.test new file mode 100644 index 0000000000..9d30b2e5e6 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/operator_feature.test @@ -0,0 +1,11 @@ +: + +---------------------------------------------------- + +[ + ["operator", ":"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/docs/_style/prism-master/tests/languages/json/property_feature.test b/docs/_style/prism-master/tests/languages/json/property_feature.test new file mode 100644 index 0000000000..3880ad733d --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/property_feature.test @@ -0,0 +1,33 @@ +{"foo\"bar\"baz":1,"foo":2} +{ + "foo": 1, + "b\"ar": 2 +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["property", "\"foo\\\"bar\\\"baz\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", "\"foo\""], + ["operator", ":"], + ["number", "2"], + ["punctuation", "}"], + + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", "\"b\\\"ar\""], + ["operator", ":"], + ["number", "2"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for features. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/json/punctuation_feature.test b/docs/_style/prism-master/tests/languages/json/punctuation_feature.test new file mode 100644 index 0000000000..b8e351cd8e --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/punctuation_feature.test @@ -0,0 +1,20 @@ +{} +{ } +[] +], +}, +, + +---------------------------------------------------- + +[ + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "["], ["punctuation", "]"], + ["punctuation", "]"], ["punctuation", ","], + ["punctuation", "}"], ["punctuation", ","], + ["punctuation", ","] +] +---------------------------------------------------- + +Checks for punctuation. diff --git a/docs/_style/prism-master/tests/languages/json/string_feature.test b/docs/_style/prism-master/tests/languages/json/string_feature.test new file mode 100644 index 0000000000..8dddae58fb --- /dev/null +++ b/docs/_style/prism-master/tests/languages/json/string_feature.test @@ -0,0 +1,27 @@ +"" +"foo" +"foo\"bar\"baz" +"\u2642\\ " +{"foo":"bar","baz":"\""} + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\\\"bar\\\"baz\""], + ["string", "\"\\u2642\\\\ \""], + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", ","], + ["property", "\"baz\""], + ["operator", ":"], + ["string", "\"\\\"\""], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/docs/_style/prism-master/tests/languages/jsx/issue1103.test b/docs/_style/prism-master/tests/languages/jsx/issue1103.test new file mode 100644 index 0000000000..fdb4030cb2 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jsx/issue1103.test @@ -0,0 +1,29 @@ +var myDivElement =
    ; + +---------------------------------------------------- + +[ + ["keyword", "var"], + " myDivElement ", + ["operator", "="], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["attr-name", ["foo"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "bar baz", + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks that quoted attribute values can contain spaces. +See #1103. \ No newline at end of file diff --git a/docs/_style/prism-master/tests/languages/jsx/issue1235.test b/docs/_style/prism-master/tests/languages/jsx/issue1235.test new file mode 100644 index 0000000000..d28d61ffc4 --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jsx/issue1235.test @@ -0,0 +1,29 @@ + + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Child"] + ]], + ["attr-name", ["options"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "{"], + " track", + ["punctuation", ":"], + ["boolean", "true"], + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks that attribute can contain an simple object. +See #1235. diff --git a/docs/_style/prism-master/tests/languages/jsx/issue1236.test b/docs/_style/prism-master/tests/languages/jsx/issue1236.test new file mode 100644 index 0000000000..3cc3ae2b8a --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jsx/issue1236.test @@ -0,0 +1,26 @@ + + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Child"] + ]], + ["spread", [ + ["punctuation", "{"], + ["punctuation", "..."], + ["attr-value", "this"], + ["punctuation", "."], + ["attr-value", "props"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks that spread can contain an object property. +See #1236. diff --git a/docs/_style/prism-master/tests/languages/jsx/issue1294.test b/docs/_style/prism-master/tests/languages/jsx/issue1294.test new file mode 100644 index 0000000000..4d167f146c --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jsx/issue1294.test @@ -0,0 +1,71 @@ +export default () => ( +
    +

    Hi! I'm building a fake Gatsby site as part of a tutorial!

    +

    + What do I like to do? Lots of course but definitely enjoy building + websites. +

    +
    +); + +---------------------------------------------------- + +[ + ["keyword", "export"], + ["keyword", "default"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], ["punctuation", "("], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n\t\t"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "h1" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "Hi! I'm building a fake Gatsby site as part of a tutorial!"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["plain-text", "\r\n\t\t"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n\t\t\tWhat do I like to do? Lots of course but definitely enjoy building\r\n\t\t\twebsites.\r\n\t\t"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["plain-text", "\r\n\t"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["punctuation", ")"], ["punctuation", ";"] +] + +---------------------------------------------------- + +See #1294. diff --git a/docs/_style/prism-master/tests/languages/jsx/issue1335.test b/docs/_style/prism-master/tests/languages/jsx/issue1335.test new file mode 100644 index 0000000000..35c2704ebf --- /dev/null +++ b/docs/_style/prism-master/tests/languages/jsx/issue1335.test @@ -0,0 +1,126 @@ +