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

Failed to highlight C++ code #23

Closed
fengwang opened this issue Jun 2, 2017 · 2 comments
Closed

Failed to highlight C++ code #23

fengwang opened this issue Jun 2, 2017 · 2 comments

Comments

@fengwang
Copy link

fengwang commented Jun 2, 2017

inserting cpp source code such like

int function( double x )
{
    return std::floor( x );
}

but unfortunately the output code is not highlighted.

@ele828
Copy link
Owner

ele828 commented Jun 3, 2017

Hi, it works well on my local machine. Did you add cpp annotation to your markdown?

```cpp    // Like this one
int function( double x )
{
    return std::floor( x );
}
\```

FYI, you can find supported language shorthand here: http://prismjs.com/#languages-list

If it's still not resolved, feel free to reopen this issue.

@ele828 ele828 closed this as completed Jun 3, 2017
@fengwang
Copy link
Author

fengwang commented Jun 3, 2017

@ele828 Thank you very much for your kind reply. I have tried both

    ```language-cpp
    //my code
    ````

and

    ```cpp
    //my code
    ````

but no luck.

In the _config.xml file, I have already set

highlight:
  enable: false
  line_number: false
  auto_detect: false
  tab_replace:

and

prism_plugin:
    mode: 'realtime'
    theme: 'coy'
    line_number: true

One of the generated page demonstrating this problem is available at this blog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants