'
- const jadeMultiline = 'h1.\n Hello\n World'
- t.is(toPug(parse(htmlMultiline)), jadeMultiline)
-})
-
-test('toPug() should use tabs for indentation if configured', t => {
- const html = '
Hello\nWorld
'
- const jade = 'h1.\n\t\tHello\n\t\tWorld'
- const jadeOptions = {indentation: '\t\t'}
- t.is(toPug(parse(html), jadeOptions), jade)
-})
-
-test('toPug() should work for script and style tags', t => {
- const htmlScript = ""
- const jadeScript = "script(type='text/javascript').\n console.log('yes');\n console.log('no');"
- t.is(toPug(parse(htmlScript)), jadeScript)
-
- const htmlStyle = ''
- const jadeStyle = 'style.\n h1 {color: #fff;}\n .text {font-size: 12px;}'
- t.is(toPug(parse(htmlStyle)), jadeStyle)
-})
-
-test('toPug() should handle receiving a single root node', t => {
- const html = '
Words are words.
'
- const jade = [
- 'div',
- ' p Words are words.'
- ].join('\n')
- t.is(toPug(parse(html)[0]), jade)
-})
-
-test('toPug() should work for void tags', t => {
- const html = ''
- const jade = "img(src='cake.png')"
- t.is(toPug(parse(html)), jade)
-})
-
-test('toPug() should prioritize using a configured doctype', t => {
- const html = ''
- const jade = 'doctype foobar'
- const jadeOptions = {doctype: 'foobar', indentation: ' '}
- t.is(toPug(parse(html), jadeOptions), jade)
-})
-
-test('toPug() should produce proper shorthand doctypes', t => {
- const cases = [
- [
- '',
- 'doctype transitional'
- ],
- [
- '',
- 'doctype frameset'
- ],
- [
- '',
- 'doctype strict'
- ],
- [
- '',
- 'doctype basic'
- ],
- [
- '',
- 'doctype 1.1'
- ],
- [
- '',
- 'doctype mobile'
- ],
- ['', 'doctype html']
- ]
-
- cases.forEach(([html, jade]) => {
- t.is(toPug(parse(html)), jade)
- })
-})
diff --git a/test/translate/v1.js b/test/translate/v1.js
deleted file mode 100644
index 5a1be6f..0000000
--- a/test/translate/v1.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import test from 'ava'
-import himalaya from '../../lib'
-import format from '../../lib/formats/v1'
-import translate from '../../lib/translate/v1'
-const {toHTML} = translate
-
-const parseDefaults = Object.assign(
- {},
- himalaya.parseDefaults,
- {format}
-)
-
-const parse = html => himalaya.parse(html, parseDefaults)
-
-test('toHTML() should handle simple conversions', t => {
- const str1 = '
Text
'
- t.is(toHTML(parse(str1)), str1)
-
- const str2 = 'Text'
- t.is(toHTML(parse(str2)), str2)
-
- const str3 = ''
- t.is(toHTML(parse(str3)), str3)
-})
-
-test('toHTML() should work for void elements', t => {
- const meta = ""
- t.is(toHTML(parse(meta)), meta)
-
- const link = ""
- t.is(toHTML(parse(link)), link)
-})
-
-test('toHTML() should build the class attribute properly', t => {
- const elem = ""
- t.is(toHTML(parse(elem)), elem)
-})
-
-test('toHTML() should build data-* attributes properly', t => {
- const elem = ""
- t.is(toHTML(parse(elem)), elem)
-})
-
-test('toHTML() should build the style attribute properly', t => {
- const elem = ""
- t.is(toHTML(parse(elem)), elem)
-})
-
-test('toHTML() should do basic escaping if a value contains either single or double quotes', t => {
- const html = ''
- t.is(toHTML(parse(html)), html)
-})
-
-test('toHTML() should preserve whitespace', t => {
- const html = [
- ' ',
- '
Document
',
- ' '
- ].join('\n')
- t.is(toHTML(parse(html)), html)
-})
diff --git a/text/translation.md b/text/translation.md
deleted file mode 100644
index 4a367d7..0000000
--- a/text/translation.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Himalaya Translations
-
-This document describes the functions included with the Himalaya parser for transforming the [abstract syntax tree](https://github.com/andrejewski/himalaya/tree/master/docs/ast-spec.md) into different HTML-based languages.
-
-## Version 1 Translations
-
-```js
-import himalaya from 'himalaya'
-import {toHTML} from 'himalaya/lib/translate/v1'
-
-const source = ""
-const json = himalaya.parse(source)
-
-const html = toHTML(json)
-// => ""
-```
-
-*Note: Version 1 does not include the `toPug` transform.*
-
-## Version 0 Translations
-
-The language translations included are for HTML and [Pug](https://pugjs.org/api/getting-started.html).
-
-```js
-import himalaya from 'himalaya'
-import {toHTML, toPug} from 'himalaya/lib/translate/v0'
-
-const source = ""
-const json = himalaya.parse(source)
-
-const html = toHTML(json)
-// => ""
-
-const pug = toPug(json)
-// => "img(src='bar.png' async)"
-
-const xml = toHTML(json, {doctype: 'xml'})
-// => ""
-
-const pugXml = toPug(json, {doctype: 'xml'})
-// => "img(src='bar.png', async='async')"
-```
-
-### toHTML(ast, [options]) HTML
-The HTML translator takes a given **ast** and an optional **options** object containing:
-
-- `doctype` which if set to `"xml"` will render boolean attributes and void tags in XML format
-
-### toPug(ast, [options]) Pug
-The Pug translator takes a given **ast** and an optional **options** object containing:
-
-- `doctype` which if set to `"xml"` will render boolean attributes in XML format
-- `indentation` defaults to two spaces
-
-The Pug translator is not a one-to-one translation with HTML. HTML transformed into Pug and then into HTML will lose some of the original's whitespace.
diff --git a/translate.js b/translate.js
deleted file mode 100644
index 37c24fa..0000000
--- a/translate.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/translate/v0').default