Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

fix(code-snippet): preserve empty lines #3450

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Conversation

eddybrando
Copy link
Collaborator

@eddybrando eddybrando commented Jul 25, 2023

Changes

Fixes #3174

Co-authored-By: @jackoconnordev

Implementation details

We use br to create the empty lines and have them preserved in the UI.

We also simplify the computed property codeLines.

Finally, we add some syntax fixes in the content/providers/list/5.multi-platforms.yaml, pointed out by @jackoconnordev in #3445.

How to read this PR

Screenshots

Co-Authored-By: Jack O'Connor <134723582+jackoconnordev@users.noreply.github.com>
@jackoconnordev
Copy link
Contributor

jackoconnordev commented Jul 25, 2023

Oh that's nicer alright having <br> instead of whitespace inside <pre>. Having a space did feel unnecessarily hacky

Copy link
Contributor

@techtolentino techtolentino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this solution @eddybrando and @jackoconnordev (thank you).

🚀

@y4izus y4izus merged commit 1f1cb67 into main Jul 26, 2023
5 checks passed
@y4izus y4izus deleted the fix/3174-code-empty-lines branch July 26, 2023 08:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Providers code examples have inconsistent spacing
4 participants