MaxMelcher / AzureDevOps.WikiPDFExport

Export Azure DevOps Wiki to PDF
MIT License
187 stars 62 forks source link

Syntax hightlight code in code block using hightlight.js #74

Closed AltarBeastiful closed 2 years ago

AltarBeastiful commented 2 years ago

Fixes #73

AltarBeastiful commented 2 years ago

Looks good in HTML : image

But in PDF there is too much padding around the code: image

Any idea why that's happening ?

AltarBeastiful commented 2 years ago

Fixed it by removing the border from pre only when using default hightlight style. I could also always remove it but I feel it could startle users.

Now in PDF : image

Jheronymus commented 2 years ago

since the tool allows for building with a specific style sheet, we should limit 'build-in' styling as much as possible. in the devopswikistyle.css the pre-tag has border-radius: 2px and padding: 15px. This is exactly how its displayed in the devops wiki. With the information given I can't see why you get so much padding

MaxMelcher commented 2 years ago

Cool, thanks for the PR - trying to release it later today!