1.0.0 • Published 2 years ago

wtf-plugin-html v1.0.0

Weekly downloads
44
License
MIT
Repository
github
Last release
2 years ago

Output all, or part of a wikipedia article in HTML.

This plugin can reliably convert links, bolds and italics to html - and it tries its best at more complex output like tables, lists, and templates.

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-html'))

let doc = wtf('hello [[world]]')
doc.html()
// 'hello <a href="./world">world</a>'
<script src="https://unpkg.com/wtf_wikipedia"></script>
<script src="https://unpkg.com/wtf-plugin-html"></script>
<script defer>
  wtf.plugin(window.wtfHtml)
  wtf.fetch('Radiohead', function (err, doc) {
    console.log(doc.sentences()[0].html())
    // <b>Radiohead</b> are an English <a class="link" href="./Rock_music">rock</a> band ...
  })
</script>

MIT

1.0.0

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

3 years ago

0.2.1

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago