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.

<hr/> before an ![image] bug

See original GitHub issue

Expected behavior

Add horizontal ruler right above an image. image

Actual behavior

<hr/> (horizontal ruler) html tag right before a markdown image code, messes up with the rendering of the image

image

How to reproduce

Write or edit a post with markdown like this: image

Possible solution

add a blank line (cr) above the markdown image code image

  • Browser: Chromium
  • Operating system: Ubuntu

Spotted by quochuy - Yesterday at 11:27 PM in Discord. "Hi. there seem to be a bug when you add a separator tag <hr/> right before a markdown image code. This messes up with the rendering of the image once published, see my recent post for example: https://staging.busy.org/@quochuy/a-chrome-extension-to-help-with-scam-steemit-websites

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
hernandevcommented, Jun 2, 2018

Ok, I gave up the lazy me and did the actual working version of that:

const fixBreaks = function (md, options) {
  md.core.ruler.before('normalize', 'fix-breaks', function (state) {
    state.src = state.src.replace(/>\n/gi, '>\n\n')
  })
}
const parser = new MarkdownIt({ /* options here */ })
parser.use(fixBreaks)

export default plugin

0reactions
hernandevcommented, Jun 25, 2018

@Sekhmet I think just having a good ready to use package would be great to help two things: one: avoid reimplementing it everytime someone creates a steem related project, and two, have a good starting point on safe content parsing.

As for condenser, it’s ok, and since from what I know they don’t change things that much, it should be relatively simple to keep it up to date.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HR's image problem – and how to fix it
HR's image problem – and how to fix it ... HR has (perhaps slightly unfairly) garnered a reputation for being dull, bureaucratic and...
Read more >
​Does HR have an Image Problem? | We Are Adam
​​​HR professionals themselves are more than aware of the image problem that their profession has. Some are using their social media ...
Read more >
<img>: The Image Embed element - HTML - MDN Web Docs
eager. Loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value)....
Read more >
Effective Strategies for Working with Problem Employees
SHRM has partnered with Security Management Magazine to bring you relevant articles on key HR topics and strategies. Problem employees. Difficult staffers.
Read more >
CSS Background image not loading
The problem ended up being the path to the image file. ... my debugging process because I was stuck on this issue for...
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