googlearchive / code-prettify

An embeddable script that makes source-code snippets in HTML prettier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extra white-space appears on the first line

sudarshaana opened this issue · comments

Hi,
I'm using code-prettify on a Django project.
Everything is okay but an extra line is appearing in the first line.

My code:

<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js">

</script>
<?prettify?>
        <pre class="prettyprint">
            {{ content }}
        </pre>     

I found that

<span class="pln">
                                            </span>

is making the space.

The screenshots are also attached.
link 1
Link 2

Any suggestions to solve this problem?

The issue was newline within pre class.

<pre class="prettyprint">{{ content }}</pre>