2

It appears that a github fenced code block doesn't accept arbitrary character strings. A block like this:

```haskell
sinusoid1 = plot_lines_values .~ [[ (x,(am x)) | x <- [0,(0.5)..400]]]
          $ plot_lines_style  . line_color .~ opaque blue
          $ plot_lines_title .~ "am"
          $ def
```

ends displaying the code truncated a the first < symbol.

A real example of this is here:

https://github.com/timbod7/haskell-chart/wiki/example-1

Do I need to escape certain character strings in github markdown code blocks? How do I do this?

3
  • 1
    Sounds like a bug in their parsing code as no character should be interpreted within code blocks. Just to be sure, did you try giving your file a ".md" extension? Commented Feb 16, 2014 at 10:21
  • This is using githubs wiki - I dont choose the file extension. Commented Feb 16, 2014 at 20:14
  • Looks like your solution was to use HTML/XML entities. E.g., &lt; Commented Apr 16, 2015 at 16:46

1 Answer 1

2

If you use a backslash before the markdown HTML < tag, the parser will treat it as a literal.

So to show this:

@interface ViewController ()<MPC_MaxCharacterDelimitedTextFieldDelegate>

Escape the < tag with a backslash:

@interface ViewController ()\<MPC_MaxCharacterDelimitedTextFieldDelegate>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.