Skip to content

Commit

Permalink
Prepare release:
Browse files Browse the repository at this point in the history
*   Update CHANGELOG
*   bump versions
*   rebuild *.wasm files
*   recreate docs/min/*
  • Loading branch information
mnater committed Apr 16, 2020
1 parent 937af4b commit 5dda711
Show file tree
Hide file tree
Showing 90 changed files with 323 additions and 131 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Version History

## Version 4.3.0 (2020-04-17)
### Fixed
* Hyphenators handle subtags with different lang consistently (issue #108)
* Better word matching RegEx (issue #109)
* Emit multiple errors (instead of just one) (issue #112)
* bumpDevDependencies

### Added
* API to define character substitutions: [https://mnater.github.io/Hyphenopoly/Setup.html#substitute](doc) (issue #109)

### Changed
* Words with foreign characters are not hyphenated anymore (issue #109)

## Version 4.2.1 (2020-03-31)
### Fixed
* Enhance documentation (serve minified hyphenopoly in [https://mnater.github.io/Hyphenopoly/min/](https://mnater.github.io/Hyphenopoly/min/) and move examples to examples directory) (issue #104)
Expand Down
2 changes: 1 addition & 1 deletion Hyphenopoly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Hyphenopoly 4.2.1 - client side hyphenation for webbrowsers
* @license Hyphenopoly 4.3.0 - client side hyphenation for webbrowsers
* ©2020 Mathias Nater, Güttingen (mathiasnater at gmail dot com)
* https://github.com/mnater/Hyphenopoly
*
Expand Down
2 changes: 1 addition & 1 deletion Hyphenopoly_Loader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Hyphenopoly_Loader 4.2.1 - client side hyphenation
* @license Hyphenopoly_Loader 4.3.0 - client side hyphenation
* ©2020 Mathias Nater, Güttingen (mathiasnater at gmail dot com)
* https://github.com/mnater/Hyphenopoly
*
Expand Down
2 changes: 1 addition & 1 deletion docs/Branching-Model.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Branching Model

Hyphenopoly uses [https://guides.github.com/introduction/flow/](https://guides.github.com/introduction/flow/).
Hyphenopoly uses [https://guides.github.com/introduction/flow/](https://guides.github.com/introduction/flow/).
4 changes: 2 additions & 2 deletions docs/min/Hyphenopoly.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/min/Hyphenopoly_Loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/min/patterns/af.wasm
Binary file not shown.
Binary file modified docs/min/patterns/as.wasm
Binary file not shown.
Binary file modified docs/min/patterns/be.wasm
Binary file not shown.
Binary file modified docs/min/patterns/bg.wasm
Binary file not shown.
Binary file modified docs/min/patterns/bn.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ca.wasm
Binary file not shown.
Binary file modified docs/min/patterns/cop.wasm
Binary file not shown.
Binary file modified docs/min/patterns/cs.wasm
Binary file not shown.
Binary file modified docs/min/patterns/cy.wasm
Binary file not shown.
Binary file modified docs/min/patterns/da.wasm
Binary file not shown.
Binary file modified docs/min/patterns/de.wasm
Binary file not shown.
Binary file modified docs/min/patterns/el-monoton.wasm
Binary file not shown.
Binary file modified docs/min/patterns/el-polyton.wasm
Binary file not shown.
Binary file modified docs/min/patterns/en-gb.wasm
Binary file not shown.
Binary file modified docs/min/patterns/en-us.wasm
Binary file not shown.
Binary file modified docs/min/patterns/eo.wasm
Binary file not shown.
Binary file modified docs/min/patterns/es.wasm
Binary file not shown.
Binary file modified docs/min/patterns/et.wasm
Binary file not shown.
Binary file modified docs/min/patterns/eu.wasm
Binary file not shown.
Binary file modified docs/min/patterns/fi.wasm
Binary file not shown.
Binary file modified docs/min/patterns/fr.wasm
Binary file not shown.
Binary file modified docs/min/patterns/fur.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ga.wasm
Binary file not shown.
Binary file modified docs/min/patterns/gl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/grc.wasm
Binary file not shown.
Binary file modified docs/min/patterns/gu.wasm
Binary file not shown.
Binary file modified docs/min/patterns/hi.wasm
Binary file not shown.
Binary file modified docs/min/patterns/hr.wasm
Binary file not shown.
Binary file modified docs/min/patterns/hsb.wasm
Binary file not shown.
Binary file modified docs/min/patterns/hu.wasm
Binary file not shown.
Binary file modified docs/min/patterns/hy.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ia.wasm
Binary file not shown.
Binary file modified docs/min/patterns/id.wasm
Binary file not shown.
Binary file modified docs/min/patterns/is.wasm
Binary file not shown.
Binary file modified docs/min/patterns/it.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ka.wasm
Binary file not shown.
Binary file modified docs/min/patterns/kmr.wasm
Binary file not shown.
Binary file modified docs/min/patterns/kn.wasm
Binary file not shown.
Binary file modified docs/min/patterns/la.wasm
Binary file not shown.
Binary file modified docs/min/patterns/lt.wasm
Binary file not shown.
Binary file modified docs/min/patterns/lv.wasm
Binary file not shown.
Binary file modified docs/min/patterns/mk.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ml.wasm
Binary file not shown.
Binary file modified docs/min/patterns/mn-cyrl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/mr.wasm
Binary file not shown.
Binary file modified docs/min/patterns/mul-ethi.wasm
Binary file not shown.
Binary file modified docs/min/patterns/nb-no.wasm
Binary file not shown.
Binary file modified docs/min/patterns/nl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/nn.wasm
Binary file not shown.
Binary file modified docs/min/patterns/oc.wasm
Binary file not shown.
Binary file modified docs/min/patterns/or.wasm
Binary file not shown.
Binary file modified docs/min/patterns/pa.wasm
Binary file not shown.
Binary file modified docs/min/patterns/pi.wasm
Binary file not shown.
Binary file modified docs/min/patterns/pl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/pms.wasm
Binary file not shown.
Binary file modified docs/min/patterns/pt.wasm
Binary file not shown.
Binary file modified docs/min/patterns/rm.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ro.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ru.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sh-cyrl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sh-latn.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sk.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sr-cyrl.wasm
Binary file not shown.
Binary file modified docs/min/patterns/sv.wasm
Binary file not shown.
Binary file modified docs/min/patterns/ta.wasm
Binary file not shown.
Binary file modified docs/min/patterns/te.wasm
Binary file not shown.
Binary file modified docs/min/patterns/th.wasm
Binary file not shown.
Binary file modified docs/min/patterns/tk.wasm
Binary file not shown.
Binary file modified docs/min/patterns/tr.wasm
Binary file not shown.
Binary file modified docs/min/patterns/uk.wasm
Binary file not shown.
Binary file modified docs/min/patterns/zh-latn-pinyin.wasm
Binary file not shown.
28 changes: 15 additions & 13 deletions docs/min/testsuite/test16.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<script>
var Hyphenopoly = {
require: {
"en-us": "FORCEHYPHENOPOLY"
"en-us": "FORCEHYPHENOPOLY",
"de": "FORCEHYPHENOPOLY",
"it": "FORCEHYPHENOPOLY"
},
setup: {
selectors: {
Expand All @@ -16,25 +18,25 @@
}
},
handleEvent: {
myFantasyEvent: function (e) {
console.log(e);
},
error: function (e) {
e.preventDefault();
//e.preventDefault();
assert(e);
}
}
};

let test = true;
let count = 0;
function assert(e) {
var test = "unknown Event \"myFantasyEvent\" discarded";
count += 1;
var test1 = "engine for language 'it' loaded, but no elements found.";
var test2 = "engine for language 'de' loaded, but no elements found.";
var ref = e.msg;
var result = true;
if (test === ref) {
document.getElementById("result").innerHTML += "<span style=\"background-color: #d6ffd6\">passed</span> ";
if (test1 === ref || test2 === ref) {
document.getElementById("result").innerHTML += `<span style="background-color: #d6ffd6">${count}</span> `;
result = result && true;
} else {
document.getElementById("result").innerHTML += "<span style=\"background-color: #ffd6d6\">failed</span> ";
document.getElementById("result").innerHTML += `<span style="background-color: #ffd6d6">${count}</span> `;
result = false;
}
if (parent != window) {
Expand Down Expand Up @@ -73,11 +75,11 @@
<div id="navigate"><a href="index.html">&Larr;&nbsp;Index</a>&nbsp;|&nbsp;<a href="test15.html">&larr;&nbsp;Prev</a>&nbsp;|&nbsp;<a href="test17.html">Next&nbsp;&rarr;</a></div>

<h1>Test 016</h1>
<p id="desc">Discard unknown Events</p>
<p id="desc">Warn about unnecessary loaded patterns.</p>
<div id="result"></div>
<hr>
<p id="test1" class="test hyphenate" lang="en-us">unknown Event "myFantasyEvent" discarded</p>
<p id="ref1" class="ref" lang="en">unknown Event "myFantasyEvent" discarded</p>
<p id="test1" class="test hyphenate" lang="en-us">See console.</p>
<p id="ref1" class="ref" lang="en">See con•sole.</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>

Expand Down
2 changes: 1 addition & 1 deletion docs/min/testsuite/test23.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h1>Test 023</h1>
<hr>
<h2>fur</h2>
<p id="test1" lang="fur" class="test hyphenate">Il furlan e je une lenghe romanze de famee des lenghis retichis, che e je fevelade soredut intal Friûl, ma ancje vie pal mont. Cualchi volte al ven clamât Ladin orientâl, parcè che al à diviers ponts in comun cul ladin, ma si è svilupât in un altri mût cul passâ dal timp, sot de influence des lenghis ator dal Friûl</p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven clamât La|din orientâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lupât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven cla|mât La|din orien|tâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lu|pât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/min/testsuite/test27.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h1>Test 027</h1>
<hr>
<h2>fur</h2>
<p id="test1" lang="fur" class="test hyphenate"></p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven clamât La|din orientâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lupât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven cla|mât La|din orien|tâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lu|pât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/min/testsuite/test36.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1>Test 036</h1>
<hr>
<h2>fur</h2>
<p id="test1" lang="fur" class="test hyphenate"></p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven clamât La|din orientâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lupât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven cla|mât La|din orien|tâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lu|pât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/min/testsuite/test37.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1>Test 037</h1>
<hr>
<h2>fur</h2>
<p id="test1" lang="fur" class="test hyphenate"></p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven clamât La|din orientâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lupât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<p id="ref1" lang="fur" class="ref">Il fur|lan e je une len|ghe ro|man|ze de fa|mee des len|ghis re|ti|chis, che e je fe|ve|la|de so|re|dut in|tal Friûl, ma an|cje vie pal mont. Cual|chi vol|te al ven cla|mât La|din orien|tâl, parcè che al à di|viers ponts in co|mun cul la|din, ma si è svi|lu|pât in un al|tri mût cul pa|ssâ dal timp, sot de in|fluen|ce des len|ghis ator dal Friûl</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>
</body>
Expand Down
29 changes: 16 additions & 13 deletions docs/min/testsuite/test42.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
document.getElementById("test2").innerText = (await Hyphenopoly.hyphenators.de)(text);
assert();
}*/
function hyphenate_de(text) {
Hyphenopoly.hyphenators.de.then(function (dehyph) {
dehyph(document.getElementById("test2"), ".usePipe");
dehyph(document.getElementById("test3"), ".usePipe");
dehyph(document.getElementById("test4"), ".usePipe");
dehyph(document.getElementById("test5"), ".usePipe");
dehyph(document.getElementById("test6"), ".usePipe");
assertAll();
});
}
hyphenate_de("Silbentrennung verbessert den Blocksatz.");
Hyphenopoly.hyphenators.de.then(function (dehyphenator) {
dehyphenator(document.getElementById("test7"), ".usePipe");
});
Hyphenopoly.hyphenators.HTML.then(function (hyphenateHTML) {
hyphenateHTML(document.getElementById("test2"), ".usePipe");
hyphenateHTML(document.getElementById("test3"), ".usePipe");
hyphenateHTML(document.getElementById("test4"), ".usePipe");
hyphenateHTML(document.getElementById("test5"), ".usePipe");
hyphenateHTML(document.getElementById("test6"), ".usePipe");
assertAll();
});
}
}
};
Expand Down Expand Up @@ -101,8 +101,8 @@ <h1>Test 042</h1>
<p id="desc">Use hyphenators to hyphenate element tree.</p>
<div id="result">R: </div>
<h2>1: Hyphenate automatically</h2>
<p id="test1" class="test hyphenate" lang="de">Silbentrennungsalgorithmus</p>
<p id="ref1" class="ref" lang="de">Sil•ben•tren•nungs•al•go•rith•mus</p>
<p id="test1" class="test hyphenate" lang="de">Silbentrennungsalgorithmus <span lang="en-us">hyphenation</span></p>
<p id="ref1" class="ref" lang="de">Sil•ben•tren•nungs•al•go•rith•mus <span lang="en-us">hy•phen•ation</span></p>
<h2>2: Hyphenator with one child (lang tag)</h2>
<p id="test2" class="test" lang="de">Silbentrennung <span>verbessert</span> den Blocksatz.</p>
<p id="ref2" class="ref" lang="de">Sil|ben|tren|nung <span>ver|bes|sert</span> den Block|satz.</p>
Expand All @@ -126,6 +126,9 @@ <h2>5: Formatted HTML</h2>
<h2>6: Rehyphenate with hyphenator</h2>
<p id="test6" class="test hyphenate" lang="de">Computertypographie</p>
<p id="ref6" class="ref" lang="de">Com•pu•ter•ty•po•gra•phie</p>
<h2>7: use H.hyphenators.de on HTMLElement</h2>
<p id="test7" class="test hyphenate" lang="de">Computertypographie</p>
<p id="ref7" class="ref" lang="de">Com•pu•ter•ty•po•gra•phie</p>
<hr>
<div><span class="test">Test</span> <span class="ref">Ref</span></div>

Expand Down
Loading

0 comments on commit 5dda711

Please sign in to comment.