Skip to content

Commit

Permalink
🚑 Fixed images
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanZhouDev committed Jul 8, 2023
1 parent 538ad9e commit b91b387
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const queryBard = async (message, ids = {}) => {
tag: x[2],
url: x[3][0][0],
source: {
original: x[0][5].match(/imgurl=([^&%]+)/)[1],
original: x[0][0][0],
website: x[1][0][0],
name: x[1][1],
favicon: x[1][3]
Expand All @@ -124,7 +124,6 @@ const formatMarkdown = (text, images) => {
if (!images) return text;

for (let imageData of images) {
// This can be optimized? `[...slice...]` is equal to `original`
const formattedTag = `!${imageData.tag}(${imageData.url
})`;
text = text.replace(new RegExp("(?<!\!)" + imageData.tag.replace("[", "\\[").replace("]", "\\]")), formattedTag);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bard-ai",
"version": "1.5.0",
"version": "1.5.1",
"description": "A Reverse-Engineered Google Bard, Written in JS",
"main": "index.js",
"types": "@types/index.d.ts",
Expand Down

0 comments on commit b91b387

Please sign in to comment.