Skip to content

fix: render README example as code block instead of plain text#1749

Merged
blikblum merged 1 commit into
foliojs:masterfrom
nimonain:flappy-bird
Jul 20, 2026
Merged

fix: render README example as code block instead of plain text#1749
blikblum merged 1 commit into
foliojs:masterfrom
nimonain:flappy-bird

Conversation

@nimonain

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
Bug fix, this PR fixes the issue of rendering the code examples as plain text on the main website. This was due to generation of empty code elements <p><code></code> "code here" <code></code></p> . All this was happening due to the regex in thie generate_website.js.

Fixes: #1592

Before fixes
image

After fixes
image

Checklist:

  • Unit Tests
  • Documentation
  • Update CHANGELOG.md
  • Ready to be merged

Feel free to correct me!
I was using pdfkit first time and noticed the code as plain text.

@blikblum
blikblum merged commit bda6fe6 into foliojs:master Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home page / README code formatting incorrect

2 participants