Socket
Book a DemoInstallSign in
Socket

smartgen_syntaxhighlighter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartgen_syntaxhighlighter

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Smartgen Syntaxhighlighter

Adds support to use Alex Gorbatchev's Syntax Highlighter plugin with smartgen.

How it works?

Basically it creates a pre processor that substitute any of the following tags with proper pre tags:

  • ruby
  • js
  • javascript
  • shell
  • bash
  • html
  • xml
  • as3
  • plain

Using

To use it with default settings, add gem to your gemspec:

gem 'smartgen_syntaxhighlighter'

And then require all engines pre processors after smartgen:

require 'smartgen'
require 'smartgen_syntaxhighlighter/all'

If you want to use it just for textile files:

require 'smartgen'
require 'smartgen_syntaxhighlighter/textile'

or for markdown files:

require 'smartgen'
require 'smartgen_syntaxhighlighter/markdown'

Customizing

If you need to customize options, the you'll need to register the pre processor yourself:

require 'smartgen'
require 'smartgen_syntaxhighlighter/pre_processor'

Smartgen::Engine::Textile.register(SyntaxhighlighterPreProcessor.new(:gutter => true, :toolbar => true))

FAQs

Package last updated on 10 Feb 2011

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.