Skip to content

Instantly share code, notes, and snippets.

@zverok

zverok/err1.md

Last active Jan 19, 2020
Embed
What would you like to do?
Example of how Ruby's error formatting breaks Markdown

(Just quick copy-paste into the dialog/GitHub issue.)

Ugh, do you know why am I having undefined local variable or method foo' for main:Object?.. I expected it to work for Logger`.

Source:

Ugh, do you know why am I having undefined local variable or method `foo' for main:Object?.. I expected it to work for `Logger`.

(Note: on GitHub it is not broken if it is the only backtick in line, that's why I added Logger. But in many other sources -- and in Gist editing mode highlight -- single backtick is a problem, too)

(Here, I'll try to screen it with ` char before and after error message)

Hey, while running the code, I saw undefined local variable or method foo' for main:Object. Any ideas?.. I just need Logger`.

Source:

Hey, while running the code, I saw `undefined local variable or method `foo' for main:Object`. Any ideas?.. I just need `Logger`.

(Maybe blockquoting will help?..)

In the example code, I somehow receive

undefined local variable or method `foo' for main:Object

Why?.. Logger worked before.

(Well, at least in Gist it is ignored when on separate line, though in Slack it doesn't)

In your code, I receive

undefined local variable or method `foo' for main:Object

Any ideas?

(It requires three lines, two with thriple-backticks and copy-paste between them)

Source:

  In your code, I receive
  \```
  undefined local variable or method `foo' for main:Object
  \```
  Any ideas?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment