Skip to main content
All CollectionsAuthor Help
I want to show code samples, in a generic language. But I can get no syntax highlighting at all. What can I do?
I want to show code samples, in a generic language. But I can get no syntax highlighting at all. What can I do?

Keywords: code, syntax, highlighting, none, not working

Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

You can try setting a "Default Code Language" on the Generation Settings page here:

https://leanpub.com/YOUR_BOOK/settings/generation_settings

...making sure to replace YOUR_BOOK with your book's unique web address.

That usually works when our book generators can't "guess" properly.

On each code block, you can also set a language, like this:

```ruby
puts "hello"
```
Did this answer your question?