1.1.0 • Published 8 years ago
asianbreak-html v1.1.0
AsianBreak-html
Automatically strip breaklines from HTML for east asian people, based on new CSS3 spec of white-space property.
const Asianbreak = require('asianbreak-html');
const asianbreak = Asianbreak();
asianbreak.pipe(process.stdout);
asianbreak.end(`
<blockquote>
婆さんは先刻から暦の話をしきりに為していた。
<em>みずのえ</em>だの<em>かのと</em>だの、
八朔だの友引だの、爪を切る日だの普請をする日だのと
頗る煩いものであった。
<cite style="
font-size: 0.8em;
">夏目漱石『それから』</cite>
</blockquote>
`);output:
<blockquote>
婆さんは先刻から暦の話をしきりに為していた。<em>みずのえ</em>だの<em>かのと</em>だの、八朔だの友引だの、爪を切る日だの普請をする日だのと頗る煩いものであった。<cite style="
font-size: 0.8em;
">夏目漱石『それから』</cite>
</blockquote>Background
TODO: write
API
This module exposes single class Asianbreak,
which allows you to use your normal stream Transforming API.
Processed HTML is emitted when it is ready even in partial form so it is "streaming." :smiley:
constructor: Asianbreak([options])
options: unimplemented
Create new AsianBreak transforming instance. new can be omitted.
