al-folio icon indicating copy to clipboard operation
al-folio copied to clipboard

<d-code> is compressing code onto one line

Open GeorgeRPu opened this issue 2 years ago • 1 comments

Acknowledge the following

  • [x] I carefully read and followed the Getting Started guide.
  • [x] I read through FAQ and searched through the past issues, none of which addressed my issue.
  • [x] The issue I am raising is a potential bug in al-folio and not just a usage question.
    [For usage questions, please post in the Discussions instead of raising an issue.]

Describe the bug Code between the <d-code> tags is being compressed onto one line even if the raw code is across multiple lines. For example,

<d-code block language="javascript">
  var x = 25;
  function(x) {
    return x * x;
  }
</d-code>

is rendered as

var x = 25; function(x) { return x * x; }

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://alshedivat.github.io/al-folio/blog/2021/distill/'
  2. Scroll down to 'Code Blocks'
  3. See error

Expected behavior The expected behavior is that the code is split across multiple lines.

Screenshots If applicable, add screenshots to help explain your problem.

Screen Shot 2022-07-20 at 11 41 30 PM

System (please complete the following information):

  • MacOS
  • Safari Version 15.5 (17613.2.7.1.8)

Additional context Add any other context about the problem here.

GeorgeRPu avatar Jul 21 '22 06:07 GeorgeRPu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 19 '22 19:09 stale[bot]