Commit ee570c41c6e2c24f4c77c9f3c9f14811bfb29f5f
Workaround bug in uri.js around links in markdown
Anders Rune Jensen committed on 10/9/2017, 6:33:11 PMParent: 6fa3c4f057cc48da8700d4578a74c074f7f92e1b
Files changed
lib.js | changed |
package.json | changed |
lib.js | ||
---|---|---|
@@ -11,8 +11,14 @@ | ||
11 | 11 | logs.forEach(msg => { |
12 | 12 | uri.withinString(msg.value.content.text, (datLink) => { |
13 | 13 | if (!datLink.startsWith("dat://")) return |
14 | 14 | |
15 | + // issue #360 in uri.js | |
16 | + var bracket = datLink.indexOf("]") | |
17 | + | |
18 | + if (bracket != -1) | |
19 | + datLink = datLink.substring(0, bracket) | |
20 | + | |
15 | 21 | if (!useTemp) |
16 | 22 | console.log("Saving to:", shareFolder + "/" + datLink.substring(6)) |
17 | 23 | |
18 | 24 | Dat(shareFolder + "/" + datLink.substring(6), { |
Built with git-ssb-web