
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@honkit/markup-it
Advanced tools
@honkit/markup-it is a JavaScript library to parse and modify markuped content (for example Markdown) using an intermediate format backed by an immutable model.
@honkit/markup-it is fork of markup-it@2.2.0
$ npm i @honkit/markup-it --save
Initialize a syntax:
var MarkupIt = require('@honkit/markup-it');
var markdownSyntax = require('@honkit/markup-it/syntaxes/markdown');
var htmlSyntax = require('@honkit/markup-it/syntaxes/html');
var markdown = new MarkupIt(markdownSyntax);
var html = new MarkupIt(htmlSyntax);
var content = markdown.toContent('Hello **World**');
// Render back to markdown:
var textMd = markdown.toText(content);
// Render to HTML
var textHtml = html.toText(content);
var content = html.toContent('Hello <b>World</b>');
var textMd = markdown.toText(content);
This module contains the markdown syntax, but you can write your custom syntax or extend the existing ones.
var myRule = MarkupIt.Rule(DraftMarkup.BLOCKS.HEADING_1)
.regExp(/^<h1>(\S+)<\/h1>/, function(state, match) {
return {
tokens: state.parseAsInline(match[1])
};
})
.toText(function(state, token) {
return '<h1>' + state.renderAsInline(token) + '</h1>';
});
Create a new syntax inherited from the markdown one:
var mySyntax = markdownSyntax.addBlockRules(myRule);
Apache-2.0
It includes Samy Pesse and GitBook works.
FAQs
Pipeline for working with markup input (for example Markdown)
The npm package @honkit/markup-it receives a total of 6 weekly downloads. As such, @honkit/markup-it popularity was classified as not popular.
We found that @honkit/markup-it demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.