Skip to content

vwillyams/showdown-internal-link-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Showdown internal link extension

Showdown extension to allow shorthanded internal links, using Wiki style [[link]] or [[link address|link name]].

Escapes HTML characters and provides the ability to configure how internal links will be prefixed and suffixed.

Client-side

<script src="/path/to/showdown/src/showdown.js"></script>
<script src="/path/to/showdown-intlink-filter.js"></script>
var converter = new showdown.Converter({extensions: ['intlink']});

Configuration: (note that this will probably change in the near future)

window.Showdown.extensions.intlinkConfig({
  pathPrefix : '/images/',
  pathSuffix : '.jpg'
};

Server-side (node)

var showdown = require('showdown');
var linkFilter = require('../showdown-intlink-filter').intlink;
var converter = new showdown.Converter({extensions: [linkFilter]});

Configuration:

require('../showdown-intlink-filter').intlinkConfig({
  pathPrefix : '/images/',
  pathSuffix : '.jpg'
};

About

Support for shorthand Internal Links (wikipedia style) for Showdown

Resources

License

Stars

Watchers

Forks

Packages

No packages published