Skip to content

Commit f66d5a7

Browse files
committed
adding liaison favicod
1 parent 32cabc4 commit f66d5a7

7 files changed

Lines changed: 12 additions & 8 deletions

File tree

5.33 KB
Loading
13.7 KB
Loading
4.8 KB
Loading
386 Bytes
Loading
613 Bytes
Loading
15 KB
Binary file not shown.

misc/french/french_liaison.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
<meta charset="UTF-8">
55
<title>Online French Liaison Inspection Tool</title>
66
<meta content="An interactive tool for inserting liaison markers into French text." name="description">
7-
7+
8+
<link rel="apple-touch-icon" sizes="180x180" href="../../icons/misc/french/liaison/apple-touch-icon.png">
9+
<link rel="icon" type="image/png" sizes="32x32" href="../../icons/misc/french/liaison/favicon-32x32.png">
10+
<link rel="icon" type="image/png" sizes="16x16" href="../../icons/misc/french/liaison/favicon-16x16.png">
11+
<link rel="icon" href="../../icons/misc/french/liaison/favicon.ico">
12+
13+
<script src="https://unpkg.com/fr-compromise"></script>
814

915
<script src="./liaison.js"></script>
1016
<link as="style" href="../../wiktionary_pron/css/tacit-css-1.7.1.min.css"
@@ -203,10 +209,7 @@ <h1>French Liaison Tool</h1>
203209
<div id="result" class="result"></div>
204210
</div>
205211

206-
<div id="mocha"></div>
207212

208-
<script src="https://unpkg.com/mocha/mocha.js"></script>
209-
<script src="https://unpkg.com/fr-compromise"></script>
210213

211214
<script>
212215
// Your insertLiaisonMarkers function (from test.html)
@@ -411,22 +414,23 @@ <h1>French Liaison Tool</h1>
411414

412415
let start = end;
413416
// Walk back until we hit a non-word character
414-
// Note: We include accented chars in the regex range
415-
while (start >= 0 && /[a-zA-Z0-9À-ÿ]/.test(text[start])) {
417+
// FIX: Added ' and ’ to the regex character class
418+
while (start >= 0 && /[a-zA-Z0-9À-ÿ']/.test(text[start])) {
416419
start--;
417420
}
418421
return text.slice(start + 1, end + 1);
419422
}
420423

421-
// Get the word immediately following a specific index
424+
// Helper to get the word immediately following a specific index
422425
function getWordAfterIndex(text, index) {
423426
let start = index + 1;
424427
// Skip whitespace immediately after
425428
while (start < text.length && /\s/.test(text[start])) start++;
426429

427430
let end = start;
428431
// Walk forward until we hit a non-word character
429-
while (end < text.length && /[a-zA-Z0-9À-ÿ]/.test(text[end])) {
432+
// FIX: Added ' and ’ to the regex character class
433+
while (end < text.length && /[a-zA-Z0-9À-ÿ']/.test(text[end])) {
430434
end++;
431435
}
432436
return text.slice(start, end);

0 commit comments

Comments
 (0)