remark-select
A remark plugin to parse select box syntax.
Last updated 2 years ago by ache .
GPL-3.0-or-later · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remark-select 
SYNC missed versions from official npm registry.

remark-select

A remark plugin that parse Mardown syntax to add support for select element.

Syntax

You can add a select element this way :

Who is the stronger ? : [ Samus | Peach | Zelda |v]

Wich leads to :

Screenshot

Installation

Easy as npm i

$ npm install remark-line-input

You install also that plugins : "unified remark-parse rehype-stringify remark-rehype"

$ npm install unified remark-parse rehype-stringify remark-rehype

Usage

An example of code :

const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')

const select = require('remark-select')

const testFile = `Choose a player : [ Luigi | Mario | Peach | Falco | Zelda |v]{.mario .link .starFox}

Choose an action : [ Start | Restart | Quit |v]`

unified()
  .use(remarkParse)
  .use(select)
  .use(remark2rehype) 
  .use(stringify)
  .process( testFile, (err, file) => {
    console.log(String(file));
  } );

Configuration

This plugin support custom HTML attributes :

[ Mario | Peach | Luigi |v]{.nintendo #select-character}

Licence

MIT

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

6 Versions

  • 1.0.0                                ...           2 years ago
  • 0.9.3                                ...           2 years ago
  • 0.9.2                                ...           2 years ago
  • 0.9.1                                ...           2 years ago
  • 0.9.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |