Compare commits

...

13 Commits

Author SHA1 Message Date
Lorenz Hübschle-Schneider 9d0836c2e7 lint 2024-07-13 14:37:22 +02:00
Lorenz Hübschle-Schneider 6ac2e5b4c2 npm update / npm audit fix 2024-07-13 14:36:42 +02:00
Tor Hveem 52b1aa0228
Merge pull request #1286 from glowing-bear/revert-1279-entire-words-as-links
Revert "convert entire words as urls or do nothing"
2024-06-27 23:40:22 +02:00
Tor Hveem 23833dbab0
Revert "convert entire words as urls or do nothing" 2024-06-27 23:38:43 +02:00
Lorenz Hübschle f39fe804b1
Merge pull request #1279 from txdv/entire-words-as-links
convert entire words as urls or do nothing
2024-04-26 18:16:22 +02:00
Lorenz Hübschle 44ca6491b8
Merge pull request #1277 from glowing-bear/dependabot/npm_and_yarn/express-4.19.2
Bump express from 4.18.2 to 4.19.2
2024-04-26 18:11:40 +02:00
Lorenz Hübschle e07cfd1806
Merge pull request #1276 from glowing-bear/dependabot/npm_and_yarn/webpack-dev-middleware-5.3.4
Bump webpack-dev-middleware from 5.3.3 to 5.3.4
2024-04-26 18:11:33 +02:00
Lorenz Hübschle c0e8810de8
Merge pull request #1275 from glowing-bear/dependabot/npm_and_yarn/follow-redirects-1.15.6
Bump follow-redirects from 1.15.4 to 1.15.6
2024-04-26 18:11:27 +02:00
Andrius Bentkus bfa893fde9 fix test description 2024-04-06 10:27:52 +03:00
Andrius Bentkus af2d12134d test if ) at the end of the link is also taken into url 2024-04-06 10:26:52 +03:00
dependabot[bot] 1a392f2801
Bump express from 4.18.2 to 4.19.2
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 22:39:44 +00:00
dependabot[bot] f0c95444f6
Bump webpack-dev-middleware from 5.3.3 to 5.3.4
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-23 14:32:53 +00:00
dependabot[bot] 731c9b4fdd
Bump follow-redirects from 1.15.4 to 1.15.6
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 23:23:53 +00:00
4 changed files with 2207 additions and 1334 deletions

3497
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -68,30 +68,20 @@ weechat.filter('conditionalLinkify', ['$filter', function($filter) {
return text; return text;
} }
return linkifyStr(text, {
return text.replaceAll(/\S+/g, function (match, p2) { className: '',
const result = linkifyStr(match, { attributes: {
className: '', rel: 'noopener noreferrer'
attributes: { },
rel: 'noopener noreferrer' target: {
}, url: '_blank'
target: { },
url: '_blank' validate: {
}, email: function () {
validate: { return false; //Do not linkify emails
email: function () {
return false; //Do not linkify emails
}
} }
});
if (result.endsWith("</a>")) {
return result;
} else {
return match
} }
});
});
}; };
}]); }]);

View File

@ -2,4 +2,4 @@
export const sortBy = (key) => { export const sortBy = (key) => {
return (a, b) => (a[key] > b[key]) ? 1 : ((b[key] > a[key]) ? -1 : 0); return (a, b) => (a[key] > b[key]) ? 1 : ((b[key] > a[key]) ? -1 : 0);
} };

View File

@ -30,14 +30,6 @@ describe('Filters', function() {
result = $filter('conditionalLinkify')(url); result = $filter('conditionalLinkify')(url);
expect(result).toEqual(link); expect(result).toEqual(link);
})); }));
it('convert the entire words to links', angular.mock.inject(function($filter) {
var text = 'weechat.network.connection_timeout',
link = 'weechat.network.connection_timeout',
result = $filter('conditionalLinkify')(text);
expect(result).toEqual(link);
}));
}); });
describe('irclinky', function() { describe('irclinky', function() {