mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Merge pull request #1555 from MasterEnoc/latex
Add get_latest_version to latex
This commit is contained in:
commit
336377c249
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue