#4560 Missing source code for highlight.js library
Opened 4 years ago by sergiodj. Modified 4 years ago

It seems the source code for highlight.js is missing. The two .js files present in the pagure/static/vendor/highlight.js don't contain the un-minified version of the library.


Hm, and the source code for highlightjs-line-numbers is also missing (both the js and the css).

@sergiodj The upstream source information should be located in the INFO files in each of those directories. You can recreate them or replace them with upstream source versions.

On Sunday, July 28 2019, Neal Gompa wrote:

ngompa added a new comment to an issue you are following:
@sergiodj The upstream source information should be located in the `INFO` files in each of those directories. You can recreate them or replace them with upstream source versions.

Thanks for the reply. I've seen these files, but they are not enough to
guarantee user freedom. The .js files are minified, and just being able
to recreate the minified version online doesn't help. What we need is
to distribute the actual, non-minified version along with the minified
one, just like we do for the other JS libraries.

Thanks,

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

@sergiodj I personally don't have a problem with doing that, so if you'd like to send a PR to put them in...?

@sergiodj The highlight.js source build is pretty complex... https://github.com/highlightjs/highlight.js

And there's no non-minified version built from the website: https://highlightjs.org/download/

That sucks. This is unfortunately a common problem with JS libraries.

I might have to remove the highlight support from Pagure on Debian because of this limitation, because I don't feel like shipping a non-free version of the library. I'll think about what to do...

@sergiodj You should be able to use libjs-highlight.js from Debian itself in its place.

However, there doesn't appear to be a Debian package for highlightjs-line-numbers, so you'll want to package up this: https://pagure.io/pagure-highlightjs-line-numbers.js for that...

I am aware of libjs-highlight.js on Debian. Even though it doesn't provide the CSS files, it could be feasible. I'll do some tests here.

I am also trying to get in touch with upstream and asking them to provide the non-minified files from the download page as well.

I am aware of libjs-highlight.js on Debian. Even though it doesn't provide the CSS files, it could be feasible. I'll do some tests here.

That's odd, I see it there...

/usr/share/javascript/highlight.js/highlight.min.js
...
/usr/share/javascript/highlight.js/styles/github.css

Those are the necessary files for us...

I am also trying to get in touch with upstream and asking them to provide the non-minified files from the download page as well.

This would be awesome, but I suspect their process may not make that easy. If they can make the adjustments, we'd be happy to include a copy in-tree.

Thanks, that's awesome. And sorry about the confusion; you're right, Debian does include the needed CSS files. I now remember that I had investigated all this before, and came to the conclusion that Pagure on Debian would be able to use libjs-highlight.js. I think the only reason I created this bug is to let you guys know that upstream Pagure has this issue.

Thanks for the patience.

Login to comment on this ticket.

Metadata