diff --git a/lib/renderer.js b/lib/renderer.js index e7ae39f..69fb39b 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -6,7 +6,7 @@ const normalizePath = require('normalize-path'); const marked = require('marked'); const {highlight} = require('highlight.js'); const removeMd = require('remove-markdown'); -const humanize = require('string-humanize'); +const humanize = require('humanize-string'); const SEARCH_EXTRACT_LENGTH = 400; const SEARCH_RESULTS_MAX = 10; diff --git a/package-lock.json b/package-lock.json index da32153..6eb1a51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "hads", - "version": "3.0.1", + "version": "3.0.2", "license": "MIT", "dependencies": { "ace-builds": "^1.4.11", @@ -17,6 +17,7 @@ "fs-extra": "^10.0.0", "globby": "^11.0.0", "highlight.js": "^11.2.0", + "humanize-string": "^2.1.0", "lodash": "^4.17.15", "marked": "^3.0.3", "mermaid": "^9.0.1", @@ -27,9 +28,8 @@ "open": "^8.2.1", "pug": "^3.0.0", "recursive-readdir": "^2.2.2", - "remove-markdown": "^0.3.0", + "remove-markdown": "^0.5.0", "shortid": "^2.2.15", - "string-humanize": "^1.0.1", "yargs": "^17.1.1" }, "bin": { @@ -6590,6 +6590,28 @@ "node": ">=10.17.0" } }, + "node_modules/humanize-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/humanize-string/-/humanize-string-2.1.0.tgz", + "integrity": "sha512-sQ+hqmxyXW8Cj7iqxcQxD7oSy3+AXnIZXdUF9lQMkzaG8dtbKAB8U7lCtViMnwQ+MpdCKsO2Kiij3G6UUXq/Xg==", + "dependencies": { + "decamelize": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/humanize-string/node_modules/decamelize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", + "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "dependencies": { + "xregexp": "4.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -13109,9 +13131,9 @@ } }, "node_modules/remove-markdown": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.3.0.tgz", - "integrity": "sha1-XktmdJOpNXlyjz1S7MHbnKUF3Jg=" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.5.0.tgz", + "integrity": "sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==" }, "node_modules/remove-trailing-separator": { "version": "1.1.0", @@ -14672,19 +14694,6 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, - "node_modules/string-capitalize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-capitalize/-/string-capitalize-1.0.1.tgz", - "integrity": "sha1-qGZfdzYbTOBKa95tm7shcSu5dJ4=" - }, - "node_modules/string-humanize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-humanize/-/string-humanize-1.0.1.tgz", - "integrity": "sha512-sSp0kyYDWMMw8CIMG8dmxuYoQo52+rDwj2g9pAacISggCY50Hmno4dTEI0+Jl7uZ8fchXYEc88+rOeDdnSO7Xw==", - "dependencies": { - "string-capitalize": "~1.0.1" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -15740,6 +15749,11 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "peer": true }, + "node_modules/xregexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", + "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==" + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -21012,6 +21026,24 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "humanize-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/humanize-string/-/humanize-string-2.1.0.tgz", + "integrity": "sha512-sQ+hqmxyXW8Cj7iqxcQxD7oSy3+AXnIZXdUF9lQMkzaG8dtbKAB8U7lCtViMnwQ+MpdCKsO2Kiij3G6UUXq/Xg==", + "requires": { + "decamelize": "^2.0.0" + }, + "dependencies": { + "decamelize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", + "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "requires": { + "xregexp": "4.0.0" + } + } + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -25851,9 +25883,9 @@ } }, "remove-markdown": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.3.0.tgz", - "integrity": "sha1-XktmdJOpNXlyjz1S7MHbnKUF3Jg=" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.5.0.tgz", + "integrity": "sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==" }, "remove-trailing-separator": { "version": "1.1.0", @@ -27101,19 +27133,6 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, - "string-capitalize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-capitalize/-/string-capitalize-1.0.1.tgz", - "integrity": "sha1-qGZfdzYbTOBKa95tm7shcSu5dJ4=" - }, - "string-humanize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-humanize/-/string-humanize-1.0.1.tgz", - "integrity": "sha512-sSp0kyYDWMMw8CIMG8dmxuYoQo52+rDwj2g9pAacISggCY50Hmno4dTEI0+Jl7uZ8fchXYEc88+rOeDdnSO7Xw==", - "requires": { - "string-capitalize": "~1.0.1" - } - }, "string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -27942,6 +27961,11 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "peer": true }, + "xregexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", + "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 7c57815..773a586 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "fs-extra": "^10.0.0", "globby": "^11.0.0", "highlight.js": "^11.2.0", + "humanize-string": "^2.1.0", "lodash": "^4.17.15", "marked": "^3.0.3", "mermaid": "^9.0.1", @@ -63,9 +64,8 @@ "open": "^8.2.1", "pug": "^3.0.0", "recursive-readdir": "^2.2.2", - "remove-markdown": "^0.3.0", + "remove-markdown": "^0.5.0", "shortid": "^2.2.15", - "string-humanize": "^1.0.1", "yargs": "^17.1.1" }, "devDependencies": { diff --git "a/test/nom_accentu\303\251.md" "b/test/nom_accentu\303\251.md" new file mode 100644 index 0000000..3ef6ea3 --- /dev/null +++ "b/test/nom_accentu\303\251.md" @@ -0,0 +1,3 @@ +# Test en Français + +Pour le support des caractères accentués \ No newline at end of file