🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@wordpress/block-serialization-spec-parser

Package Overview
Dependencies
Maintainers
8
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/block-serialization-spec-parser

Block serialization specification parser for WordPress posts.

Source
npmnpm
Version
1.0.4
Version published
Maintainers
8
Created
Source

Block Serialization Spec Parser

This library contains the grammar file (grammar.pegjs) for WordPress posts which is a block serialization specification which is used to generate the actual parser which is also bundled in this package.

PEG parser generators are available in many languages, though different libraries may require some translation of this grammar into their syntax. For more information see:

Installation

Install the module

npm install @wordpress/block-serialization-spec-parser --save

Usage

import { parse } from '@wordpress/block-serialization-spec-parser';

parse( '<!-- wp:core/more --><!--more--><!-- /wp:core/more -->' );
// [{"attrs": null, "blockName": "core/more", "innerBlocks": [], "innerHTML": "<!--more-->"}]



Code is Poetry.

Keywords

wordpress

FAQs

Package last updated on 03 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts