Skip to content

Commit

Permalink
refactor(routes)!: rename removeAlt param to remove_alt
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `removeAlt` query string param renamed to `remove_alt`
  • Loading branch information
Fdawgs committed Nov 25, 2024
1 parent b19dd94 commit f740eda
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/routes/docx/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function route(server, options) {
const html = await server.docxToHtml(req.body);
const tidiedHtml = await server.tidyHtml(html, {
language: req.query.language,
removeAlt: req.query.removeAlt,
removeAlt: req.query.remove_alt,
});

res.type("text/html; charset=utf-8");
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docx/html/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("DOCX-to-HTML route", () => {
url: "/",
body: await readFile(filePath),
query: {
removeAlt: "true",
remove_alt: "true",
},
headers: {
accept: "application/json, text/html",
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docx/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const docxToHtmlPostSchema = {
.default("en")
)
.prop(
"removeAlt",
"remove_alt",
S.boolean().description(
"Set the `alt` attribute in `<img>` tags to an empty string"
)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function route(server, options) {
);
const tidiedHtml = await server.tidyHtml(embeddedHtml, {
language: req.query.language,
removeAlt: req.query.removeAlt,
removeAlt: req.query.remove_alt,
});

return server.tidyCss(tidiedHtml, {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const queryStrings = generateCombos([
{ fonts: "Arial" },
{ ignoreImages: "true" },
{ noDrm: "true" },
{ removeAlt: "true" },
{ remove_alt: "true" },
]);

describe("PDF-to-HTML route", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/pdf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const pdfToHtmlPostSchema = {
.maxLength(127)
)
.prop(
"removeAlt",
"remove_alt",
S.boolean().description(
"Set the `alt` attribute in `<img>` tags to an empty string"
)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function route(server, options) {
req.conversionResults.body,
{
language: req.query.language,
removeAlt: req.query.removeAlt,
removeAlt: req.query.remove_alt,
}
);

Expand Down
2 changes: 1 addition & 1 deletion src/routes/rtf/html/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const rtfToHtmlPostSchema = {
.default("en")
)
.prop(
"removeAlt",
"remove_alt",
S.boolean().description(
"Set the `alt` attribute in `<img>` tags to an empty string"
)
Expand Down

0 comments on commit f740eda

Please sign in to comment.