matsuyoshi30 / harbor

Simple and minimal personal blog theme.
MIT License
186 stars 68 forks source link

Table numbering issue for highlight #106

Open papersaltserver opened 3 years ago

papersaltserver commented 3 years ago

There is an issue with paddings when line numbers placed in table mode: image

papersaltserver commented 3 years ago

Further investigation showed it is due

pre code {
    padding: 0;
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: inherit;
    color: inherit;
    -->white-space: pre-wrap;<--
    background-color: transparent;
    border-radius: 0;
}

Seems as for now, Hugo is not ready for code fenced blocks with word wrap

matsuyoshi30 commented 3 years ago

Hi @papersaltserver, thanks for reporting this!

Harbor purposely doesn't show line numbers. When users write a very long line in a code block, the priority is to wrap the line so that it does not exceed the width of the article. If you want to show line numbers, please use linenos=inline.