php里面的mark,PHP CommonMarkCQL 用法 手册 | 示例代码

简介

CommonMark Query Language is a DSL for describing how to travel through a CommonMark Node tree implemented as a parser and compiler for a small set of instructions, and a virtual machine for executing those instructions.

Paths:

In it's most simplistic form, a CQL query combines the following paths and / to describe how to travel through a tree:

firstChild

lastChild

previous

next

parent

For example, /firstChild/lastChild would travel to the last child node of the first child node.

Loops

CQL can be instructed to loop, for example through the children of, or siblings to a particular node, by using the path children, or siblings. For example, /firstChild/children will travel to all the children of the first child node.

Subqueries

CQL can be instructed how to travel by using a subquery like [/firstChild]. For example, /firstChild/children[/firstChild] will travel to the first child node of all the children of the first child node.

Loop Constraints

While looping, CQL can be instructed to constrict the travelled path to nodes of particular type. For example /children(BlockQuote) will travel to the children of a node where the type is BlockQuote. The following types are recognized (case insensitively):

BlockQuote

List

Item

CodeBlock

HtmlBlock

CustomBlock

Paragraph

Heading

ThematicBreak

Text

SoftBreak

LineBreak

Code

HtmlInline

CustomInline

Emphasis

Strong

Link

Image

Types may be used as a union, for example /children(BlockQuote List) will travel to the children of a node where the type is BlockQuote or List. Types, or unions of types, may be also negated. For example /children(~BlockQuote) will travel to the children of a node where the type is not BlockQuote, and /children(~BlockQuote Paragraph) will travel to the children of a node where the type is not BlockQuote or Paragraph

Path Constraints

CQL can be instructed to create a loop to travel to a node of a particular type, at a particular path. For example, /firstChild(BlockQuote) will travel to the first child node where the type is BlockQuote. Note that like other loops for children and siblings, this kind of path can only be followed by a subquery.

Implementation Notes

While CQL has been implemented as part of the PHP CommonMark extension, it stands separately from PHP and does not use PHP's virtual machine or internal representation of values.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/346027.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

spring 面向接口编程_Spring面向方面的编程

spring 面向接口编程介绍 在理想的面向对象系统中,我们希望将每个对象设计为执行一项特定任务。 但是,除了执行其主要任务之外,对象还执行被动任务,例如日志记录,事务,安全性,缓存等。这些被动活…

Nutshell中的Java 8语言功能-第2部分

编者注:您也可以在此处检查Part-1。 嗨,朋友们,这是简明系列的Java 8语言功能的第2部分。 在这里,我们将讨论Java 8的以下功能: 接口中的静态方法 流 1.接口中的静态方法 什么是静态方法? 静态方法是属…

概率

概率 概率质量函数(probability mass function, PMF)针对的是离散变量 常见的离散随机变量分布的PMF函数:伯努利分布,二项分布,泊松分布。 概率密度函数(probability density function, PDF)针…

oracle impdp导入时卡住,Oracle:impdp导入等待statement suspended, wait error to be cleared

用数据泵impdp往开发数据库导数据,但导入到INDEX时感觉卡住不动了Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX----查看状态,Completed Objects: 33一直没有变化。Import> statusJob: SYS_IMPORT_FULL_01Operation: IMPORTMode: FULLStat…

梯度下降法、最速下降法

梯度下降法 最优化问题是求解函数极值的问题,包括极大值和极小值。相信所有的读者对这个问题都不陌生,在初中时我们就学会了求解二次函数的极值(抛物线的顶点),高中时学习了幂函数,指数函数,对…

php ajax 表格编辑,php ajax表格实时编辑 PHP Ajax实现表格实时编辑

想了解PHP Ajax实现表格实时编辑的相关内容吗,佛祖的腿毛在本文为您仔细讲解php ajax表格实时编辑的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:php,ajax表格实时编辑,ajax实现表格编辑,下面大家一起来学习吧…

jpa和hibernate_使用JPA和Hibernate有效删除数据

jpa和hibernate您可能会遇到必须对关系数据库中存储的大量数据集执行批量删除的情况。 如果您将JPA与Hibernate一起用作基础OR映射器,则可以尝试通过以下方式调用EntityManager的remove()方法: public void removeById(long id) …

超越函数

代数数 在数论中,超越数是指任何一个不是代数数的数字(通常它是复数)。它满足以下条件——只要它不是任何一个整系数代数方程的根,它即是超越数。最著名的超越数是e以及π。 超越数 超越数的例子 所有超越数构成的集是一个不可数…

无服务器-仅仅是构建现代应用程序的一种方法?

如果搜索“无服务器”,则会发现无服务器是构建现代应用程序的一种新的流行方式。 无服务器真的是新的吗? 无服务器是指您无需担心服务器的概念-无需置备,部署和维护服务器。 显然有服务器,但是您无需考虑或担心它们,运…

linux查看用户的操作记录,Linux下查看用户登陆后的操作记录

Linux下查看用户登陆后的操作记录  在linux系统的环境下,不管是root用户还是其它的用户只有登陆系统后用进入操作我们都可以通过命令history来查看历史记录,可是假如一台 服务器多人登陆,一天因为某人误操作了删除了重要的数据。这时候通过…

只需5分钟即可启动并运行分层架构:: Spring Boot第1部分

这是一个分为两部分的系列,其中我将展示如何使用Spring Boot创建分层架构。 什么是分层体系结构:简而言之,当我们构建企业应用程序时,我们维护不同的层以封装特定于层的逻辑,这样就不会溢出到另一层。 当我们考虑企业…

机器学习算法、深度学习算法涉及的数学知识

微积分基础 导数的定义 左导数、右导数、可导函数 导数几何意义、物理意义 基本函数求导公式 四则运算法则 复合函数求导法则 神经网络激活函数的导函数求解 高阶导数 导数与函数单调性 极值定理 导数与函数凹凸性 一元函数泰勒展开 线性代数基础 向量与其运算 行向量和列向…

linux设置默认的首页文件,Linux 设置Firefox主页

Linux 设置Firefox主页在Linux系统中,当用户启动Firefox主页时,会自动打开Firefox默认设置的主页。当然,用户也可以通过Firefox的首选项,手动将Firefox主页设置为自己喜欢的或经常访问的网页。在本单元练习中,将Firefo…

spring 2.2 改进_Spring 4中@ControllerAdvice的改进

spring 2.2 改进在Spring 4的许多新功能中,我发现了ControllerAdvice的改进。 ControllerAdvice是Component的特殊化,用于定义适用于所有RequestMapping方法的 ExceptionHandler, InitBinder和ModelAttribute方法。 在Spring 4之前&#xff0…

向量范数与矩阵范数

一、向量的范数 1.1 定义 1.2 举例 首先定义一个向量为:a[-5,6,8, -10] 1.2.1 向量的1范数 向量的1范数即:向量的各个元素的绝对值之和,上述向量a的1范数结果就是:29,MATLAB代码实现为&…

不同磁盘目录共享linux,linux下实现磁盘共享(mount)

准备两台centos6.6 A(192.168.199.2)、B(192.168.199.3),A做服务端、B做客户端。一台ubuntu14.04 C(192.168.199.4)C做客户端。A、B安装nfs对应服务yum -y install nfs-utils rpcbind####C安装nfs-kernel-serverapt-get install nfs-kernel-server####A设置nfs、por…

苹果linux桌面文件夹,Ubuntu 10.04下一键安装Mac OS X主题桌面

不久前的《Ubuntu 10.04下Mac OS X风格桌面美化安装》遭到网友的砖头,认为和Mac OS X风格桌面美化安装根本没有关系。本来是要跟这篇一起发布的,一等就等了这么长,下面我们来看下在Ubuntu 10.04下一键安装Mac OS X主题桌面的工具Epidermis th…

示性函数、共轭函数、对偶范数、共轭

示性函数(Indicator function) 共轭函数 对偶范数 几个常用公式 共轭(conjugate) 所谓“轭”,指的是古代牛车上放在并行的牛脖颈上的曲木。共轭关系,通俗来说一般用以描述两件事物以一定规律相互配对或孪生(一般共轭对…

Redis-实践知识

转自极客时间Redis 亚风 原文视频:https://u.geekbang.org/lesson/535?article681062 Redis最佳实践 普通KEY Redis 的key虽然可以自定义,但是最好遵循下面几个实践的约定: 格式:[业务名称]:[数据名]:[id] 长度不超过44字节 不…