]*>((?!<\/a)(.|\n))+<\/a>)|(
]+>)/g);
return `${templates.dispatch(pictures, group, layout)}
`;
};
diff --git a/test/tags/group-pictures.js b/test/tags/group-pictures.js
index 8e7e978..9e0248e 100644
--- a/test/tags/group-pictures.js
+++ b/test/tags/group-pictures.js
@@ -4,6 +4,9 @@ require('chai').should();
const Hexo = require('hexo');
const hexo = new Hexo();
+const link = '';
+const image = '';
+
describe('group-pictures', () => {
const groupPicture = require('../../scripts/tags/group-pictures')(hexo);
@@ -13,7 +16,7 @@ describe('group-pictures', () => {
groupPicture(['3-1'], `


-`).should.eql('');
+`).should.eql(``);
});
it('layout 5-2', () => {
@@ -22,7 +25,7 @@ describe('group-pictures', () => {



-`).should.eql('');
+`).should.eql(`${image}${image}
${image}
${image}${image}
`);
});
it('remove text', () => {
@@ -31,7 +34,22 @@ describe('group-pictures', () => {
Text

Text
-`).should.eql('');
+`).should.eql(``);
+ });
+
+ it('set hyperlinks', () => {
+ groupPicture(['4-3'], `
+
+[](https://theme-next.js.org/)
+[](https://theme-next.js.org/)
+`).should.eql(`${image}${link}
${link}${image}
`);
+ });
+
+ it('set hyperlinks 2', () => {
+ groupPicture(['3-1'], `
+
+[](https://theme-next.js.org/)
+`).should.eql(``);
});
it('no layout', () => {
@@ -40,6 +58,6 @@ Text



-`).should.eql('');
+`).should.eql(`${image}${image}${image}
${image}${image}
`);
});
});