Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asciidoctor-shiki

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asciidoctor-shiki

asciidoctor.js plugin for syntax highlight with shiki

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

Asciidoctor Syntax Highlight Extension for Node.js

Installation

This extension is available on npmjs.com

$ node install asciidoctor-shiki

Usage

This extension is not designed for browser. You must not use this extension without Node.js.

const asciidoctor = require('@asciidoctor/core')()
const AsciidoctorShiki = require('asciidoctor-shiki')
asciidoctor.SyntaxHighlighter.register('shiki', AsciidoctorShiki)
const options = {
  attributes: {
    'source-highlighter': 'shiki',
    'shiki-theme': 'nord'
  }
}
const document = `
[source,ruby]
----
p "Hello"
----
`;
console.log(asciidoctor.convert(document, options))
  1. Register this extension using SyntaxHighlighter.register
  2. Set the attribute source-highlighter
  3. Set the attribute shiki-theme

Copyright (c) 2022 TANIGUCHI Masaya. All rights reserved.

This extension is licensed under the MIT license https://git.io/mit-license

Keywords

FAQs

Package last updated on 03 Feb 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc