Skip to content
This repository has been archived by the owner on Apr 26, 2018. It is now read-only.

An HTML::Pipeline filter for handling WikiMedia-style wiki links.

License

Notifications You must be signed in to change notification settings

lifted-studios/html-pipeline-wiki-link

Repository files navigation

HTML::Pipeline WikiLink Gem Build Status

An HTML::Pipeline filter for handling WikiMedia-style wiki links.

Installation

Add this line to your application's Gemfile:

gem 'html-pipeline-wiki-link'

And then execute:

$ bundle

Or install it yourself as:

$ gem install html-pipeline-wiki-link

Usage

This library is designed as an extension of the HTML::Pipeline system for creating pipelines of text conversions. It can work on its own or in conjunction with other filters descended from HTML::Pipeline::Filter.

To use this filter on its own:

require 'html/pipeline/wiki_link'

filter = HTML::Pipeline::WikiLinkFilter.new('Some text with a [[Link]] in it.')
filter.call

Filters can be combined into a pipeline which causes each filter to hand its output to the next filter's input. For example, you could support wiki links in Markdown by creating a pipeline like this:

pipeline = HTML::Pipeline.new [
  HTML::Pipeline::MarkdownFilter,
  HTML::Pipeline::WikiLinkFilter
]

result = pipeline.call <<-CODE
This is some **Markdown** with a [[Link]] in it!
CODE

The wiki link filter supports the standard link types:

  • [[Link]]
  • [[Link|Description]]

Development

To see what has changed in recent versions of the wiki link gem, see the CHANGELOG.

Core Team Members

Copyright

Copyright © 2013 Lee Dohm, Lifted Studios. See LICENSE for details.

Project is a member of the OSS Manifesto.

About

An HTML::Pipeline filter for handling WikiMedia-style wiki links.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages