Merge pull request #1555 from MasterEnoc/latex

Add get_latest_version to latex
This commit is contained in:
Simon Legner 2021-06-09 07:23:18 +02:00 committed by GitHub
commit 336377c249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,10 @@
# coding: utf-8
module Docs
class Latex < UrlScraper
self.name = 'LaTeX'
self.slug = 'latex'
self.type = 'simple'
self.release = 'April 2021'
self.links = {
home: 'https://ctan.org/pkg/latex2e-help-texinfo/'
}
@ -18,5 +20,12 @@ module Docs
Public Domain Software
HTML
def get_latest_version(opts)
body = fetch('https://latexref.xyz/', opts)
body = body.scan(/\(\w+\s\d+\)/)[0]
body.sub!('(', '')
body.sub!(')', '')
end
end
end