Comparing version 1.9.1 to 1.10.0
@@ -241,3 +241,3 @@ /** Text hyphenation in Javascript. | ||
var SETTING_DEFAULT_EXCEPTIONS = []; | ||
var SETTING_DEFAULT_HTML = false; | ||
var SETTING_DEFAULT_HTML = true; | ||
var SETTING_DEFAULT_HYPH_CHAR = "\xAD"; | ||
@@ -244,0 +244,0 @@ var SETTING_DEFAULT_MIN_WORD_LENGTH = 5; |
{ | ||
"name": "hyphen", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"description": "Text hyphenation in Javascript.", | ||
@@ -20,3 +20,4 @@ "repository": { | ||
}, | ||
"homepage": "https://ytiurin.github.io/hyphen" | ||
"homepage": "https://ytiurin.github.io/hyphen", | ||
"browser": "./hyphen.js" | ||
} |
@@ -5,2 +5,3 @@ ![Franklin M. Liang's hyphenation algorithm](https://ytiurin.github.io/hyphen/01.png) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-) | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
@@ -27,6 +28,6 @@ | ||
HTML tags will automaticly skip hyphenation. | ||
Processor will automaticly skip HTML tags hyphenation. | ||
```javascript | ||
import { hyphenateHTML as hyphenate } from "hyphen/en"; | ||
import { hyphenate } from "hyphen/en"; | ||
@@ -99,2 +100,3 @@ (async () => { | ||
``` | ||
Types definitions are created and maintained by [Krisztián Balla](https://github.com/krisztianb). | ||
@@ -667,4 +669,2 @@ | ||
async: true, | ||
// prevent HTML tags from hyphenation | ||
html: true, | ||
// exceptions of hyphenation | ||
@@ -684,4 +684,2 @@ exceptions: ["present", "ta-ble"] | ||
const hyphenate = createHyphenator(patterns, { async: true }); | ||
const hyphenateHTML = createHyphenator(patterns, { async: true, html: true }); | ||
const hyphenateHTMLSync = createHyphenator(patterns, { html: true }); | ||
const hyphenateSync = createHyphenator(patterns); | ||
@@ -697,4 +695,4 @@ ``` | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.7.2/hyphen.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.7.2/patterns/en-us.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.0/patterns/en-us.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.0/hyphen.min.js"></script> | ||
``` | ||
@@ -729,3 +727,4 @@ | ||
- Option `debug` will be deprecated in further versions | ||
- Option `debug` will be deprecated in further versions; | ||
- Option `html` will be deprecated in further versions. | ||
@@ -771,2 +770,2 @@ ## Contributors ✨ | ||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! | ||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8499781