question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code blocks are not styled correctly

See original GitHub issue

Prerequisites

Description

Code blocks are not rendered correctly.

Steps to Reproduce

  1. Create a markdown file in src/docs with a code block, similar to the following (note that ‘’’ is used in place of the backtick, since I’m writing in github):
'''html
<script src="../../dist/js/<Library-Name>.js" type="text/javascript"></script>
<script>
  function initialize() {
    <Library-Name>.show();
  }

  $(document).ready(function() {
    initialize();
  });
</script>

<div style="max-width: 600px" id="content" />
'''
  1. Load fractal using yarn start.
  2. Navigate to the created markdown document.

Expected behavior: It should render the code block as an actual block, similar to: Screenshot from 2019-11-12 14-29-46

Actual behavior: It does not render the code block correctly, instead rendering inline code:

Screenshot from 2019-11-12 14-35-26

Reproduces how often: I am able to reproduce all of the time. However, if I revert commit https://github.com/frctl/fractal/commit/6b4506a2fb0dad94360e885c0e70ea5bc144fe42 it does not reproduce.

Reduced test case: (if relevant) - this might be a link to a gist of your fractal.js file, or a git repo for more complex issues

My fractal.js file:

https://gist.github.com/jwir3/c3806e0d7bdcc12f51c54ad1e138b112

Versions

  • What version of Fractal are you running? I have tried with 1.2.0 and 1.2.1.-beta.1
  • What version of Node.js are you running? (run node -v) v8.10.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jwir3commented, Nov 13, 2019

It appears I don’t have permission to reopen this issue. Can you reopen it?

0reactions
stale[bot]commented, Mar 13, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do code blocks sometimes not "show" properly?
I have no idea why this style would be changed (except for interfering user styles/extensions/etc.), so I need help here. If someone notices...
Read more >
How do I format my code blocks? - Meta Stack Overflow
If you want a block of code to follow a list but not be nested under the final list item, you can use...
Read more >
Creating and highlighting code blocks - GitHub Docs
Share samples of code with fenced code blocks and enabling syntax highlighting.
Read more >
1 Code::Blocks Project Management
To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ /...
Read more >
Code blocks - Squarespace Help Center
On all plans, code blocks support plain text, HTML, Markdown, and CSS code surrounded by <style></style> tags. Adding JavaScript or iframes to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found