[DRE-maint] Bug#833788: Fails to insert <pre> tags around code blocks

Ryan Kavanagh rak at debian.org
Mon Aug 8 16:15:14 UTC 2016


Package: jekyll
Version: 3.1.6+dfsg-3
Severity: normal

The packaged version of Jekyll on Debian fails to properly parse code
blocks and fails to insert <pre> tags around them. This causes code
blocks to all render on the same line. This bug appeared after Debian
version 2.2.0+dfsg-2, which correctly inserted <pre> tags, and does not
appear in the upstream version.

For debugging purposes, I've attached a minimal working example
(test.md). Jekyll's behaviour on this example under various versions is
shown below.

Version 2.2.0+dfsg-2 can be fetched using debsnap:
debsnap --binary -a all jekyll 2.2.0+dfsg-2

Upstream's git branch can be installed as follows:
----------------------------8<-------------------------
rak at zeta:/tmp$ cat ~/.gemrc
gem: --user-install
rak at zeta:/tmp$ mv ~/.gem ~/.gem-bak
rak at zeta:/tmp$ gem install bundle
Fetching: bundler-1.12.5.gem (100%)
Successfully installed bundler-1.12.5
Fetching: bundle-0.0.1.gem (100%)
Successfully installed bundle-0.0.1
Parsing documentation for bundler-1.12.5
Installing ri documentation for bundler-1.12.5
Parsing documentation for bundle-0.0.1
Installing ri documentation for bundle-0.0.1
Done installing documentation for bundler, bundle after 3 seconds
2 gems installed
rak at zeta:/tmp$ git clone git://github.com/jekyll/jekyll.git
Cloning into 'jekyll'...
remote: Counting objects: 51472, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 51472 (delta 0), reused 0 (delta 0), pack-reused 51470
Receiving objects: 100% (51472/51472), 18.19 MiB | 2.51 MiB/s, done.
Resolving deltas: 100% (29137/29137), done.
Checking connectivity... done.
rak at zeta:/tmp$ cd jekyll
rak at zeta:/tmp/jekyll$ bundle install --path ~/.gem
[... lots of scrolling ...]
rak at zeta:/tmp/jekyll$ gem install rake
Successfully installed rake-11.2.2
Parsing documentation for rake-11.2.2
Installing ri documentation for rake-11.2.2
Done installing documentation for rake after 0 seconds
1 gem installed
rak at zeta:/tmp/jekyll$ bundle exec rake build
mkdir -p pkg
gem build jekyll.gemspec
  Successfully built RubyGem
  Name: jekyll
  Version: 3.2.1
  File: jekyll-3.2.1.gem
mv jekyll-3.2.1.gem pkg
rak at zeta:/tmp/jekyll$ gem install -l pkg/jekyll-3.2.1.gem
Successfully installed jekyll-3.2.1
Parsing documentation for jekyll-3.2.1
Installing ri documentation for jekyll-3.2.1
Done installing documentation for jekyll after 1 seconds
1 gem installed
----------------------------8<-------------------------

You now have upstream's version of Jekyll installed along with a copy of
every dependency in ~/.gem.  To compare its behaviour against Debian's
versions of Jekyll, you can  then do:

----------------------------8<-------------------------
rak at zeta:/tmp$ mkdir jekyll-test
rak at zeta:/tmp$ cd jekyll-test
rak at zeta:/tmp/jekyll-test$ cp ../test.md .
rak at zeta:/tmp/jekyll-test$ jekyll build
Configuration file: none
            Source: /tmp/jekyll-test
       Destination: /tmp/jekyll-test/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
     Build Warning: Layout 'page' requested in test.md does not exist.
                    done in 0.144 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
rak at zeta:/tmp/jekyll-test$ cat _site/test.html
<p>Debian jekyll doesn’t insert pre tags around code blocks:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>code block with four spaces indentation
should be surrounded by <pre> tags.
</code></pre>
</div>
rak at zeta:/tmp/jekyll-test$ mv ~/.gem ~/.gem-jekyll
rak at zeta:/tmp/jekyll-test$ sudo dpkg -i ../binary-jekyll/jekyll_2.2.0+dfsg-2_all.deb
[sudo] password for rak:
Selecting previously unselected package jekyll.
(Reading database ... 249036 files and directories currently installed.)
Preparing to unpack .../jekyll_2.2.0+dfsg-2_all.deb ...
Unpacking jekyll (2.2.0+dfsg-2) ...
Setting up jekyll (2.2.0+dfsg-2) ...
Processing triggers for man-db (2.7.5-1) ...
rak at zeta:/tmp/jekyll-test$ jekyll build
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
Configuration file: none
            Source: /tmp/jekyll-test
       Destination: /tmp/jekyll-test/_site
      Generating...
     Build Warning: Layout 'post' requested in test.md does not exist.
                    done.
rak at zeta:/tmp/jekyll-test$ cat _site/test.html
<p>Debian jekyll doesn’t insert pre tags around code blocks:</p>

<pre><code>code block with four spaces indentation
should be surrounded by <pre> tags.
</code></pre>
rak at zeta:/tmp/jekyll-test$ sudo apt install jekyll
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  g++-5
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
  jekyll
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 82.9 kB of archives.
After this operation, 98.3 kB of additional disk space will be used.
Get:1 http://localhost:9999/debian unstable/main amd64 jekyll all 3.1.6+dfsg-3 [82.9 kB]
Fetched 82.9 kB in 0s (3,643 kB/s)
Reading changelogs... Done
(Reading database ... 249112 files and directories currently installed.)
Preparing to unpack /jekyll_3.1.6+dfsg-3_all.deb ...
Unpacking jekyll (3.1.6+dfsg-3) over (2.2.0+dfsg-2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up jekyll (3.1.6+dfsg-3) ...
(failed reverse-i-search)`jekyll inst': ^Ckyll build
rak at zeta:/tmp/jekyll-test$ jekyll build
Configuration file: none
            Source: /tmp/jekyll-test
       Destination: /tmp/jekyll-test/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
     Build Warning: Layout 'post' requested in test.md does not exist.
                    done in 0.135 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
rak at zeta:/tmp/jekyll-test$ cat _site/test.html
<p>Debian jekyll doesn’t insert pre tags around code blocks:</p>

<div class="highlighter-rouge">code block with four spaces indentation
should be surrounded by <pre> tags.
</div>
----------------------------8<-------------------------

Don't forget to: "mv ~/.gem-bak ~/.gem" afterwards.

Best wishes,
Ryan

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages jekyll depends on:
ii  ruby                        1:2.3.0+4
ii  ruby-classifier-reborn      2.0.4-1
ii  ruby-colorator              1.1.0-1
ii  ruby-jekyll-coffeescript    1.0.1-2
ii  ruby-jekyll-feed            0.3.1-1
ii  ruby-jekyll-gist            1.1.0-1
ii  ruby-jekyll-paginate        1.1.0-1
ii  ruby-jekyll-sass-converter  1.3.0-1
ii  ruby-jekyll-watch           1.3.0-1
ii  ruby-kramdown               1.11.1-3
ii  ruby-launchy-shim           2.3.0.1
ii  ruby-liquid                 3.0.6-1
ii  ruby-mercenary              0.3.5-1
ii  ruby-mime-types             2.6.1-1
ii  ruby-pygments.rb            0.6.3-2
ii  ruby-rdiscount              2.1.8-1+b3
ii  ruby-redcarpet              3.3.4-2
ii  ruby-rouge                  2.0.2-1
ii  ruby-safe-yaml              1.0.4-1
ii  ruby-toml                   0.1.2-4
ii  ruby2.1 [ruby-interpreter]  2.1.5-4
ii  ruby2.2 [ruby-interpreter]  2.2.4-1
ii  xdg-utils                   1.1.1-1

Versions of packages jekyll recommends:
ii  ruby-mysql      2.9.1-1+b4
ii  ruby-sequel     4.33.0-1
ii  ruby-sequel-pg  1.6.16-1

jekyll suggests no packages.

-- no debconf information

-- 
|_)|_/  Ryan Kavanagh      | GPG: 4E46 9519 ED67 7734 268F
| \| \  https://ryanak.ca/ |      BD95 8F7B F8FC 4A11 C97A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.md
Type: text/markdown
Size: 200 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20160808/a2ebde50/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20160808/a2ebde50/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list