Skip to content

Line numbers in syntax highlighting #157

@quicknir

Description

@quicknir

I've made very minimal changes from the base lanyon repo, and none to the CSS. I have the following code:

{% highlight cpp linenos %}
class A {
  void func(double y) {
    return;
  }
}
{% endhighlight %}

The problem is it looks like this:

screenshot from 2016-02-13 16-18-02

I have googled around for hours, trying bits and snippets of other people's CSS to try to fix this line number issue. Unfortunately, nothing seems to work. Because of how CSS works, I thought maybe some other piece of CSS on Lanyon could be causing this issue. Does anyone have nice looking line numbers on Lanyon, on a github-pages site that is build server-side (i.e. not locally)? If so, can they share?

IMHO this should be merged to Lanyon in some form, as wanting line numbers in code is a pretty common thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions