Skip to content

Commit

Permalink
fix: title margins
Browse files Browse the repository at this point in the history
  • Loading branch information
wayne-shih committed Nov 29, 2023
1 parent 8dc5669 commit ab55d74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/pdf-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default async function createPdf(specUrl, options) {
sub: { fontSize: 8 },
right: { alignment: 'right' },
left: { alignment: 'left' },
topMargin1: { margin: [0, 180, 0, 10] },
topMargin0: { margin: [0, 360, 0, 10] },
topMargin1: { margin: [0, 300, 0, 10] },
topMargin2: { margin: [0, 60, 0, 5] },
topMargin3: { margin: [0, 20, 0, 3] },
topMargin4: { margin: [0, 15, 0, 3] },
Expand Down
4 changes: 2 additions & 2 deletions src/pdf-parts-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

function markdownToPdfmake(markdown) {
const html = marked(markdown);
return htmlToPdfmake(html);
return htmlToPdfmake(html);
}

// Info Def
Expand Down Expand Up @@ -53,7 +53,7 @@ export function getInfoDef(spec, bookTitle, localize) {
if (spec.info.description) {
specInfDescrMarkDef = {
stack: markdownToPdfmake(spec.info.description),
style: ['topMargin3'],
style: ['topMargin0'],
};
} else {
specInfDescrMarkDef = '';
Expand Down
2 changes: 1 addition & 1 deletion src/spec-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default async function ProcessSpec(specUrl, sortTags) {
if (typeof specUrl === 'string') {
specObj = await Swagger({
disableInterfaces: false,
url: specUrl,
url: specUrl,
});
} else {
specObj = await Swagger({
Expand Down

0 comments on commit ab55d74

Please sign in to comment.