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

Unwanted space added to first line of code #158

Closed
anup92k opened this issue Mar 15, 2020 · 6 comments
Closed

Unwanted space added to first line of code #158

anup92k opened this issue Mar 15, 2020 · 6 comments
Labels
bug

Comments

@anup92k
Copy link
Contributor

@anup92k anup92k commented Mar 15, 2020

Hello,
I've found that every first line of bash code start with a space.
For exemple, for the code :

```bash
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv

(This code is followed by tree backquote but I don't know how to display them here...)

The result here :
image

When I add a new line the space does not show anymore.
image

```bash

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv

BTW : Thanks for this awsome theme !

@dillonzq dillonzq added the bug label Mar 15, 2020
@dillonzq
Copy link
Owner

@dillonzq dillonzq commented Mar 15, 2020

Hi, @anup92k
Which version of hugo and commit of the theme you used? And which device and browser you used for preview?

@anup92k
Copy link
Contributor Author

@anup92k anup92k commented Mar 15, 2020

Hi,
I'm using Hugo :

Hugo Static Site Generator v0.67.0-7F1DA3EF windows/amd64 BuildDate: 2020-03-09T20:35:55Z

And LoveIT last version :
git log

commit 9928d46 (HEAD -> master, tag: v0.1.3, origin/master)
Merge: ff4d2f2 ca13e7d
Author: Dillon dillonzq@outlook.com
Date: Sat Mar 14 21:52:53 2020 +0800

Merge pull request #153 from dillonzq/develop

Release v0.1.3

git status

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

For preview, I used Firefox 74.0 (64 bits) and olso Chrome Version 80.0.3987.132 (Build officiel) (64 bits)

I've upload my website with this theme a few hours ago. You can see it here : link

I seams not to be related only on bash but also on non specified code
see the large code starting with Unit

The YAML code seams fine but maybe it does not show that much because of the indent of YAML : exemple of YAML

Let me know if you want more info.

Regards

@dillonzq
Copy link
Owner

@dillonzq dillonzq commented Mar 16, 2020

Hi, @anup92k
Maybe there is a problem with your configuration of the highlight part?
image

Or maybe you should use hugo extended version?
image

@anup92k
Copy link
Contributor Author

@anup92k anup92k commented Mar 16, 2020

Hello,

My markup content does not have a lot of content just this :

[markup]
  [markup.tableOfContents]
    startLevel = 2
    endLevel = 6

So there is no reference of the highlight part.

When I make my content I use Windows for previous and use an Ubuntu server to compile the complete website. The website was build with hugo extended (not using extended causes compiling errors).

I may have found the problem with the help of the inspection tool of Google Chrome :
Screenshot_53
When I disable the padding: .2rem .4rem;, it goes well as you can see.
Re-enable it brings back the space :
Screenshot_1
It refers to the line 4 of /themes/LoveIt/assets/css/_partial/_single/_code.scss.

I'm wondering now if it's an issue of if it's intentional. If it's an expected result please let me know.
If it is I'm sorry for the inconvenience and thank you a lot for your help.

I'm gonna try to put some highlight info to see if I can get rid of that.

@anup92k
Copy link
Contributor Author

@anup92k anup92k commented Mar 16, 2020

I tried to play with the parameters and got rid of the space by enable the code fences :

  [markup.highlight]
    codeFences = true
    guessSyntax = true
    lineNoStart = 1
    lineNos = true
    lineNumbersInTable = true
    noClasses = false
    style = "monokai"
    tabWidth = 4

image

Set it to false re-cause the issue.

I'm gonna use these parameters from here.
If it's not an issue for you, you can close this case.

Again, thanks for your help.

@dillonzq
Copy link
Owner

@dillonzq dillonzq commented Mar 17, 2020

@anup92k
noClasses = false in [markup.highlight] is necessary configuration.

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

No branches or pull requests

2 participants