Selaa lähdekoodia

Add Elisp language docs for version 26.3

MasterEnoc 5 vuotta sitten
vanhempi
commit
258e3f954c

+ 5 - 0
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -261,6 +261,11 @@ credits = [
     '2012 Plataformatec',
     'Apache',
     'https://raw.githubusercontent.com/elixir-lang/elixir/master/LICENSE'
+  ], [
+    'Elisp',
+    '1990-1996, 1998-2019 Free Software Foundation, Inc.',
+    'GPLv3',
+    'https://www.gnu.org/licenses/gpl-3.0.html'
   ], [
     'Ember.js',
     '2017 Yehuda Katz, Tom Dale and Ember.js contributors',

+ 1 - 0
assets/stylesheets/application.css.scss

@@ -53,6 +53,7 @@
         'pages/dojo',
         'pages/drupal',
         'pages/elixir',
+        'pages/elisp',
         'pages/ember',
         'pages/erlang',
         'pages/express',

+ 9 - 0
assets/stylesheets/pages/_elisp.scss

@@ -0,0 +1,9 @@
+._elisp {
+    div > b {
+        @extend %block-label, %label-blue;
+    }
+
+    div > b {
+        margin: 2% auto;
+    }
+}

+ 13 - 0
lib/docs/filters/elisp/clean_html.rb

@@ -47,8 +47,21 @@ module Docs
         # add id to each defun section that contains a functions, macro, etc.
         css('.defun').each do |node|
           node['id']= node.first_element_child.content
+
+          # change all <var> tags to <b>, this helps pages style
+          functionName = node.first_element_child
+          arguments = functionName.next_sibling
+          arguments.parent= functionName
+        end
+
+        # remove br for style purposes
+        css('br').each do |node|
+          node.remove
         end
 
+        # remove footnotes
+        css('.footnote').remove
+
         doc
       end
     end

+ 5 - 0
lib/docs/scrapers/elisp.rb

@@ -61,5 +61,10 @@ module Docs
       Licensed under the GNU GPL license.
     HTML
 
+    def get_latest_version(opts)
+      body = fetch('https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html', opts)
+      body.scan(/version \d*\.?\d*/)[0].sub('version', '')
+    end
+
   end
 end

BIN
public/icons/docs/elisp/16.png


BIN
public/icons/docs/elisp/16@2x.png


+ 1 - 0
public/icons/docs/elisp/SOURCE

@@ -0,0 +1 @@
+https://www.gnu.org/software/emacs/