Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Code blocks are not properly rendered in the README.md file #765

Closed
zolakt opened this issue Apr 5, 2019 · 6 comments
Closed

[BUG] Code blocks are not properly rendered in the README.md file #765

zolakt opened this issue Apr 5, 2019 · 6 comments

Comments

@zolakt
Copy link

zolakt commented Apr 5, 2019

I'm not sure if I'm doing it right, but I just can't get it to work. I'm using the same example as you have on your demo app README.md.

This is the code I add to the readme file:

function hello() {
    console.log('hello world !');
}

And this is the output I get:
image

As you can see it's not transformed to html correctly. There is no pre block. There is no "language" attribute on the code block... so prism.js doesn't pick it up.

I'm using the the 1.1.9 version. Tried also with 1.1.8 and 1.1.7... same result.
Am I doing something wrong or is it a bug?

Unrelated, but table syntax also doesn't work in README.md

@jayanezj
Copy link
Contributor

jayanezj commented Apr 5, 2019

Hi, you have to use the GitHub Flavored Markdown . There is a problem in version 1.1.9 (check this), but if you use the development branch it will work correctly.

@zolakt
Copy link
Author

zolakt commented Apr 5, 2019

Ok thanks. Although, I tried with 1.1.8 and 1.1.7... got the same error.
I'll have to wait for a release, can't use the development branch, since it could break the CD at some point.
For now I resorted to writing html tags.

@jayanezj
Copy link
Contributor

jayanezj commented Apr 5, 2019

Ok thanks. Although, I tried with 1.1.8 and 1.1.7... got the same error.
I'll have to wait for a release, can't use the development branch, since it could break the CD at some point.
For now I resorted to writing html tags.

If you are concerned about version stability then switch to version 1.1.8 and write the code block as follows in the README.md:

```javascript
function hello() { 
    console.log('hello world !'); 
} 
```

The result will be:

function hello() { 
    console.log('hello world !'); 
} 

@zolakt
Copy link
Author

zolakt commented Apr 5, 2019

Thanks. I'll give it a try again, although I did get the same problem with 1.1.8.
Also I don't think 1.1.8 annotates static members, and that is a much bigger showstopper than formatting code blocks.

@admosity
Copy link

admosity commented May 30, 2019

This is how https://github.com/compodoc/compodoc-demo-todomvc-angular looks like with version 1.1.9.

image

This also looks to be the same issue: #776

Downgrading to 1.1.8 fixes this particular issue.

renaud-dev added a commit to renaud-dev/ngx-speculoos that referenced this issue May 31, 2019
renaud-dev added a commit to renaud-dev/ngx-speculoos that referenced this issue May 31, 2019
renaud-dev added a commit to renaud-dev/ngx-speculoos that referenced this issue May 31, 2019
jnizet pushed a commit to Ninja-Squad/ngx-speculoos that referenced this issue May 31, 2019
@vogloblinsky vogloblinsky changed the title Code blocks are not properly rendered in the README.md file [BUG] Code blocks are not properly rendered in the README.md file Jun 11, 2019
@vogloblinsky vogloblinsky added this to the 1.1.10 milestone Jun 11, 2019
@vogloblinsky vogloblinsky reopened this Jun 11, 2019
@lock
Copy link

lock bot commented Sep 30, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants