Skip to content

Commit

Permalink
Build action
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 31, 2024
1 parent 22c5e33 commit 9f7f9a5
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48588,7 +48588,7 @@ function extractMetaTags(body, options) {
if (script.attribs.type && script.attribs.type === 'application/ld+json') {
if (!ogObject.jsonLD)
ogObject.jsonLD = [];
let scriptText = $(script).text();
let scriptText = $(script).text().trim();
if (scriptText) {
scriptText = scriptText.replace(/(\r\n|\n|\r)/gm, ''); // remove newlines
scriptText = (0, utils_1.unescapeScriptText)(scriptText);
Expand Down Expand Up @@ -118213,7 +118213,7 @@ var follow_redirects = __nccwpck_require__(1573);
// EXTERNAL MODULE: external "zlib"
var external_zlib_ = __nccwpck_require__(43106);
;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
const VERSION = "1.7.8";
const VERSION = "1.7.9";
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js


Expand Down Expand Up @@ -121385,7 +121385,7 @@ async function open_library_standardize(book, isbn) {
const standardBook = {
title: book.title,
authors,
description,
description: handleDescription(description),
pageCount: book.number_of_pages,
format: "book",
categories: subjects,
Expand All @@ -121403,6 +121403,18 @@ async function open_library_standardize(book, isbn) {
return standardBook;
}

/**
* Handles the description of the book.
* @param {string|object} description - The description of the book.
* @returns {string} - The processed description.
*/
function handleDescription(description) {
if (typeof description === "string") {
return description;
}
return description.value;
}

/**
* Retrieves the author names from OpenLibrary.
* @param {{key: string}[]} rawAuthors - List of author keys.
Expand Down

0 comments on commit 9f7f9a5

Please sign in to comment.