From 0700f2d833622e29218b98200a86950cb8485285 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 11 Sep 2019 21:50:21 +0200 Subject: [PATCH 0001/2496] Add support for prefers-color-scheme media query --- assets/javascripts/app/settings.coffee | 18 ++++++++++++------ .../templates/pages/settings_tmpl.coffee | 16 +++++++++++++--- .../views/content/settings_page.coffee | 10 +++++----- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index 350a08c0ae..bfe8ae73ba 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -7,7 +7,8 @@ class app.Settings 'arrowScroll' 'analyticsConsent' 'docs' - 'dark' + 'dark' # legacy + 'theme' 'layout' 'size' 'tips' @@ -43,7 +44,7 @@ class app.Settings set: (key, value) -> @store.set(key, value) delete @cache[key] - @toggleDark(value) if key == 'dark' + @setTheme(value) if key == 'theme' return del: (key) -> @@ -114,15 +115,20 @@ class app.Settings return initLayout: -> - @toggleDark(@get('dark') is 1) + if @get('dark') is 1 + @set('theme', 'dark') + @del 'dark' + @setTheme(@get('theme')) @toggleLayout(layout, @hasLayout(layout)) for layout in @LAYOUTS @initSidebarWidth() return - toggleDark: (enable) -> + setTheme: (theme) -> + if not theme + theme = if window.matchMedia('(prefers-color-scheme: dark)').matches then 'dark' else 'default' classList = document.documentElement.classList - classList.toggle('_theme-default', !enable) - classList.toggle('_theme-dark', enable) + classList.remove('_theme-default', '_theme-dark') + classList.add('_theme-' + theme) color = getComputedStyle(document.documentElement).getPropertyValue('--headerBackground').trim() $('meta[name=theme-color]').setAttribute('content', color) return diff --git a/assets/javascripts/templates/pages/settings_tmpl.coffee b/assets/javascripts/templates/pages/settings_tmpl.coffee index d5cb098509..07bfc65a36 100644 --- a/assets/javascripts/templates/pages/settings_tmpl.coffee +++ b/assets/javascripts/templates/pages/settings_tmpl.coffee @@ -2,12 +2,22 @@ app.templates.settingsPage = (settings) -> """

Preferences

-

General:

- +

Theme:

+
+
+ +
+

General:

+ +
diff --git a/assets/javascripts/views/content/settings_page.coffee b/assets/javascripts/views/content/settings_page.coffee index 9ca606c6ef..fd7474384d 100644 --- a/assets/javascripts/views/content/settings_page.coffee +++ b/assets/javascripts/views/content/settings_page.coffee @@ -11,7 +11,7 @@ class app.views.SettingsPage extends app.View currentSettings: -> settings = {} - settings.dark = app.settings.get('dark') + settings.theme = app.settings.get('theme') settings.smoothScroll = !app.settings.get('fastScroll') settings.arrowScroll = app.settings.get('arrowScroll') settings.autoInstall = app.settings.get('autoInstall') @@ -22,8 +22,8 @@ class app.views.SettingsPage extends app.View getTitle: -> 'Preferences' - toggleDark: (enable) -> - app.settings.set('dark', !!enable) + setTheme: (value) -> + app.settings.set('theme', value) return toggleLayout: (layout, enable) -> @@ -74,8 +74,8 @@ class app.views.SettingsPage extends app.View onChange: (event) => input = event.target switch input.name - when 'dark' - @toggleDark input.checked + when 'theme' + @setTheme input.value when 'layout' @toggleLayout input.value, input.checked when 'smoothScroll' From bf16081410ea8ca0ab33a614c90985832f2fa375 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 26 Oct 2019 12:05:48 +0100 Subject: [PATCH 0002/2496] Remove unused code in Sequelize's clean_html filter Also fix it's --> its in code comments --- lib/docs/filters/sequelize/clean_html.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/docs/filters/sequelize/clean_html.rb b/lib/docs/filters/sequelize/clean_html.rb index 27c4d55237..4f452198ab 100644 --- a/lib/docs/filters/sequelize/clean_html.rb +++ b/lib/docs/filters/sequelize/clean_html.rb @@ -18,11 +18,11 @@ def call # Remove image cards pointing to entries of the manual css('.manual-cards').remove - # Pull the header out of it's container + # Pull the header out of its container header = at_css('h1') header.parent.parent.parent.add_previous_sibling header else - # Pull the header out of it's container + # Pull the header out of its container header = at_css('h1') header.parent.add_previous_sibling header end @@ -46,11 +46,6 @@ def call pre['data-language'] = 'typescript' if node['class'] == 'lang-ts' end - # Add syntax highlighting to source files - css('pre.raw-source-code').each do |node| - node['data-language'] = 'javascript' - end - # Return the cleaned-up document doc end From f08cb87031a3eab313ffc318822b7c8ab8ad4143 Mon Sep 17 00:00:00 2001 From: Kayla Altepeter Date: Mon, 28 Oct 2019 23:57:18 -0500 Subject: [PATCH 0003/2496] Update Angular documentation to include 7 and 8 --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/angular.rb | 42 +++++++++++++++++- public/icons/docs/angular/16.png | Bin 727 -> 1108 bytes public/icons/docs/angular/16@2x.png | Bin 1306 -> 2266 bytes 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0165ade208..fd3d9a7c01 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -83,7 +83,7 @@ app.templates.aboutPage = -> """ credits = [ [ 'Angular
Angular.js', - '2010-2018 Google, Inc.', + '2010-2019 Google, Inc.', 'CC BY', 'https://creativecommons.org/licenses/by/4.0/' ], [ diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 3365ec6791..b5db97e928 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -11,7 +11,7 @@ class Angular < UrlScraper options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2010–2018 Google, Inc.
+ © 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0. HTML @@ -59,6 +59,46 @@ def handle_response(response) end version do + self.release = '8.2.12' + self.base_url = 'https://v7.angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '7' do + self.release = '7.2.15' + self.base_url = 'https://v7.angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '6' do self.release = '6.0.4' self.base_url = 'https://angular.io/' self.root_path = 'docs' diff --git a/public/icons/docs/angular/16.png b/public/icons/docs/angular/16.png index c2da47ddac62d6fc78411ddb0385be40bd474b3a..ace09120ce692ba589feaec994970f64ac361053 100644 GIT binary patch literal 1108 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pn}NEkcg59UmvUF{9L`nl>DSry^7odplSvNn+hu+GdHy)QK2F?C$HG5 z!d3~a!V1U+3F|8Y3;nDA{o-C@9zzrKDK}xwt{K19`Se z86_nJR{Hwo<>h+i#(Mch>H3D2mX`VkM*2oZx=P7{9O-#x!EwNQn0$BtH5O0c3d|4@L;p!@;Rg)$-uxg#nZ(x#6mDP z*w-T@P~_jc--TBSr7nLGkKt8RJl7)}vP9Ks?PV^!;xJVoD& zTDQ_B&73eLE%V;neDhEJS=cYQsh zkH!3V_}jq1w072&0u{0Dl}&xGPv5y+Z*a!<*=tr4vlXF7r}uunnl1f6pmeLVm(Ax- zJZZ~57hbxj9^tZtudB3E^Np5vp#RTp*CxDv>C(mdVd3=~YuB*eH@3f|abEOl)zvxw z#O|wiFlM>%o(*&0Ptg&+nQS+4wzOgPv13k($6yS&6{>~(=@Sb zx%$0xT8=A~Oby>?aQe?h>l3M)8RpJvFLzwS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Ysz+XAJ?qd+1W03#=002ovPDHLkU;%=;j%%d= From 5cd7b6de4125a10a292dbbc126491b1374e76fdf Mon Sep 17 00:00:00 2001 From: Kayla Altepeter Date: Tue, 29 Oct 2019 00:29:43 -0500 Subject: [PATCH 0004/2496] Update mongoose version to 5.7.7 --- lib/docs/scrapers/mongoose.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/mongoose.rb b/lib/docs/scrapers/mongoose.rb index fbd4ca920e..36ea82c58a 100644 --- a/lib/docs/scrapers/mongoose.rb +++ b/lib/docs/scrapers/mongoose.rb @@ -2,8 +2,8 @@ module Docs class Mongoose < UrlScraper self.name = 'Mongoose' self.type = 'simple' - self.release = '4.13.1' - self.base_url = 'http://mongoosejs.com/docs/' + self.release = '5.7.7' + self.base_url = 'https://mongoosejs.com/docs/' self.root_path = 'index.html' self.initial_paths = %w(guide.html api.html) self.force_gzip = true From f5a3152bbba69c7be1a6f84af11645c1bb022669 Mon Sep 17 00:00:00 2001 From: Cimbali Date: Thu, 23 May 2019 23:48:41 +0200 Subject: [PATCH 0005/2496] Add gnuplot documentation as source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documentation is part of the gnuplot source code, available at: - https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/docs/ This can be redistributed, according the the Copyright (emphasis mine): > * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley > * > * Permission to use, copy, and distribute this software **and its** > * **documentation** for any purpose with or without fee is hereby granted, > * provided that the above copyright notice appear in all copies and > * that both that copyright notice and this permission notice appear > * in supporting documentation. Full copyright notice here: https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/Copyright The term “gnuplot license” is not very widespread but brings satisfying results on search engines (including on wikipedia), so I took the liberty to add a link to the copyright file, taken from the “Gnuplot's copyright” link on the gnuplot home page, http://gnuplot.info. Here is how to build the gnuplot docs to parse them: mkdir gnuplot-src gnuplot-conf $DEVDOCS_ROOT/docs/gnuplot git clone -b 5.2.7 --depth 1 https://git.code.sf.net/p/gnuplot/gnuplot-main ./gnuplot-src cd gnuplot-src/ ./prepare cd ../gnuplot-conf ../gnuplot-src/configure make -C docs nofigures.tex latex2html -html 5.0,math -split 4 -link 8 -long_titles 5 -dir $DEVDOCS_ROOT/docs/gnuplot -ascii_mode docs/nofigures.tex --- .../templates/pages/about_tmpl.coffee | 5 ++ assets/stylesheets/application.css.scss | 1 + assets/stylesheets/pages/_gnuplot.scss | 6 ++ lib/docs/filters/gnuplot/clean_html.rb | 61 +++++++++++++++ lib/docs/filters/gnuplot/entries.rb | 73 ++++++++++++++++++ lib/docs/scrapers/gnuplot.rb | 41 ++++++++++ public/icons/docs/gnuplot/16.png | Bin 0 -> 2954 bytes public/icons/docs/gnuplot/16@2x.png | Bin 0 -> 2163 bytes public/icons/docs/gnuplot/SOURCE | 1 + 9 files changed, 188 insertions(+) create mode 100644 assets/stylesheets/pages/_gnuplot.scss create mode 100644 lib/docs/filters/gnuplot/clean_html.rb create mode 100644 lib/docs/filters/gnuplot/entries.rb create mode 100644 lib/docs/scrapers/gnuplot.rb create mode 100644 public/icons/docs/gnuplot/16.png create mode 100644 public/icons/docs/gnuplot/16@2x.png create mode 100644 public/icons/docs/gnuplot/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0165ade208..60c742109a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -311,6 +311,11 @@ credits = [ 'Free Software Foundation', 'GFDL', 'https://www.gnu.org/licenses/fdl-1.3.en.html' + ], [ + 'Gnuplot', + 'Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley', + 'gnuplot license', + 'https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/Copyright' ], [ 'Go', 'Google, Inc.', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 0072d5111b..1b1c3ad034 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -60,6 +60,7 @@ 'pages/github', 'pages/go', 'pages/graphite', + 'pages/gnuplot', 'pages/haskell', 'pages/jekyll', 'pages/jquery', diff --git a/assets/stylesheets/pages/_gnuplot.scss b/assets/stylesheets/pages/_gnuplot.scss new file mode 100644 index 0000000000..b7d584e787 --- /dev/null +++ b/assets/stylesheets/pages/_gnuplot.scss @@ -0,0 +1,6 @@ +._gnuplot { + .CENTER { + text-align: center; + } + @extend %simple; +} diff --git a/lib/docs/filters/gnuplot/clean_html.rb b/lib/docs/filters/gnuplot/clean_html.rb new file mode 100644 index 0000000000..e612982b35 --- /dev/null +++ b/lib/docs/filters/gnuplot/clean_html.rb @@ -0,0 +1,61 @@ +module Docs + class Gnuplot + class CleanHtmlFilter < Filter + def call + # remove some anchors nested inside headers: ... + css('h1, h2, h3, h4, h5').each do |heading| + anchor = heading.css('a')[0] + heading['id'] = anchor['id'] || anchor['name'] + heading.content = anchor.content.strip + end + + # make the title on the front page which is in some weird tags + if root_page? + title = css('.HUGE')[0] + title.name = 'h1' + + subtitle = css('.XLARGE')[0] + title.content = title.content + ' − ' + subtitle.content + + css('> *:first-child')[0].before(title) + subtitle.remove + + css('p:contains("TableOfContents")').remove + end + + # remove nav, empty items, and any useless horizontal rules as well + # as the subsection table of contents (.ChildLinks) + css('.navigation').remove + css('#CHILD_LINKS, ul.ChildLinks').remove + css('hr').remove + # Anchors that use only names are some numerical IDs that latex2html distributes through the document + css('a[name]:not([href]):not([id])').remove + + # spacing + css('> div, p').each do |node| + node.remove if node.content.strip.empty? + end + + # links generated are of the form (NB: some might have been removed): + # {text} (p. [*]) + # transform to nil, 'Linetypes, colors, and styles' => nil, 'Fit' => nil, 'Format' => nil, + 'Plot' => nil, 'Splot' => nil, 'Style' => 'Plot appearance', + 'Set-show' => 'Set / Show', 'Datafile' => nil, 'Key' => 'Legend'} + NOREPEAT = ['String constants, string variables, and string functions', 'Substitution and Command line macros'] + + class EntriesFilter < Docs::EntriesFilter + def initialize(*) + super + end + + def get_name + return 'Stats' if slug.downcase == 'stats_statistical_summary' + return css('h1')[0].content.strip + end + + def get_type + return (PROMOTE[name] || name) if PROMOTE.include? name + + parent = at_css('.navigation > b:contains("Up:")').next_element.content + return 'Using Gnuplot' if parent == 'Gnuplot' + return parent + end + + def include_default_entry? + !root_page? and slug.downcase != 'complete_list_terminals' #and !PROMOTE.include? name + end + + def additional_entries + return [] if root_page? + entries = [] + + if slug.downcase == 'complete_list_terminals' + list_stack = [[css('ul.ChildLinks'), '', nil]] + else + list_stack = [[css('ul.ChildLinks'), name, nil]] + end + + while !list_stack.empty? + list, name_, type_ = list_stack.pop + list.css('> li').each do |item| + + sublists = item.css('> ul') + link = item.css('> a, span') + + if link.empty? + item_name = name_ + else + item_name = link[0].text.strip + item_name = "#{name_} #{item_name}".strip unless PROMOTE.include? name_ or NOREPEAT.include? name_ + item_name = item_name.sub /^(\w+) \1/, '\1' + item_name = 'set style boxplot' if slug.downcase == 'set_show' and item_name == 'Boxplot' + + if PROMOTE.include? name_ + type_ = PROMOTE[name_] || name_ + end + + entries << [item_name, link[0]['href'].split('#')[1], type_] + end + + list_stack.push([sublists, item_name, type_]) unless sublists.empty? + end + end + + return entries + end + + private + + end + end +end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb new file mode 100644 index 0000000000..dc55edb7fb --- /dev/null +++ b/lib/docs/scrapers/gnuplot.rb @@ -0,0 +1,41 @@ +module Docs + class Gnuplot < FileScraper + self.name = 'Gnuplot' + self.slug = 'gnuplot' + self.type = 'gnuplot' + self.links = { + home: 'http://gnuplot.sourceforge.net/' + } + + self.root_path = 'index.html' + + html_filters.push 'gnuplot/entries', 'gnuplot/clean_html' + + options[:skip_links] = false + + options[:skip] = %w( + Copyright.html + External_libraries.html + Known_limitations.html + Introduction.html + About_this_document.html + New_features.html + Differences_from_version_4.html + Seeking_assistance.html + Gnuplot.html + Deprecated_syntax.html + Demos_Online_Examples.html + Terminal_types.html + Plotting_styles.html + Commands.html + Contents.html + Bugs.html + ) + + options[:attribution] = <<-HTML + Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
+ Distributed under the
gnuplot license (rights to distribute modified versions are withheld). + HTML + + end +end diff --git a/public/icons/docs/gnuplot/16.png b/public/icons/docs/gnuplot/16.png new file mode 100644 index 0000000000000000000000000000000000000000..3db00280f941d049356226dc91b7aac54aa23f05 GIT binary patch literal 2954 zcmV;53w88~P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1bxk|Ze({O1&V1dw>?I6Tev26Oy%KtyI`)%0w) zO-5A)C%`u{7rA*J5JZeS zpJ^PrzCa#cFC?$>`c-aHQ$1M~UCpYH*Up4NS0hys(~&!!8=*5O@y#9muln-d*?yn< z1TcDlJ|;th9ozj)XD5agEL`yI&NnTI$C&YSegA-;vF{ju0QihP@Uu`d<#QF;R58-8>4Jm)yx6(0@Yit5yLWsk710#4qqMO+F00pqkU z!If>X4XkyzT8*ukh$A3Aop;?8H{ICx<{C`&G$`Rt)QGn%b0VR}hXPz~QZnGDa|Rm? z%rV6D*y8rSvi8Gf89R4}mE@od9Dlvcr{GVoFN)?|VeXvG4_2^?R(!#X#oYSFDiGqP zVj4ES&YYY5{48P_42BJJhJ(e{qoM})iY?wevkeAIy*>HjQdb3l2zv(@gSht2M#sTL zXA@C!4mf7;Q(!rPCkVcQ%X5WDw(s-A;+9@&XS9eFv?gk5+z9% zky5Z}@ddgH))xpWRj$5<8f&V#N-YiH(|ijpw$yTyRyuX=C;_I&o_g-m%WwmsH2er7 zjx_R+Q6^$-^7J#zIMd8iW_egsR==|L$=t75bIKZRqSm_fVh!Syt_ruxNm!hLG4c+K zr^NsQnigj^JMU>Rw>YyxY?uSV%CN}kZZQT1{csefd$@Zs_qV(mp!>VL(ND~oMcu!_ zoLSVpG54LfA6V;Ums{QhttHFq{3EOG%G$Mhx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&-|!-2t%m4rY24YJ`L;(K){{a7>y{D4^ z000SaNLh0L01m_e01m_fl`9S#00007bV*G`2jdG14Im&|=i;RR00NdtL_t(I%bk*2 zNYr^8#XoHim2|naQP*6d)huxwFmu@7s5Cld9yFCO^bkWj8qNoIO_|#mqw<#X%IhgsqQ6JR7&SCB$hK{H09spH@%elJ zgu`I~{CCt*(TUXF_Wgc(n=1fN=59$gyb{O*Wf#DIBeYnqxk^AiYZG^g8u=&@v zu?P*R=hWoYv#RkURc%WsyXR-)`u|uke_{H~s*?mdJJ~U(haJhgP;r!p&&=05D4dj| z-K$=ywsthL14W|Jwh}#k^hipjq>2+#&8f@|EXQ$V+cuVEkv(}YtMgW}X6O$}B4NA} zCU7Tz5tlnVseS(rkH>>g;@^ToN;=wkoan}K97oY;lvul;0|$q=ammlr>O;KlH)Q*L z`fuEw{g4 zuInlo45m5Pm1~R=zidcH2m}He_{NmK2ivy!1lhxqU99uTY5)KL07*qoM6N<$g5z48 AIRF3v literal 0 HcmV?d00001 diff --git a/public/icons/docs/gnuplot/16@2x.png b/public/icons/docs/gnuplot/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5985b7aa54132155b9e712e460720b4b955df8e7 GIT binary patch literal 2163 zcmV-(2#oiMP)EX>4Tx04R}tkv&MmKp2MKrbdj$A?7w5hF>;4=OwO}zIAQI0o!?cOliKjMg zgY!Odl$B+b_?&pmqze*1a$WKGjdRImf%lA>*~}bqlvpfvu+qV-Y-+@l#4%OVslSl( zSmnIMS*zAq>z@3D;ex)r#C2N3NMQkskSHSsHB?ZAjX3Q(DHbwxp7ik#xqgXU3b`s^ zG{~+W{11L-YZVg{UZ-#p=zejWj}aiW3pDGF^L^|%%@ZK_3|#4L|3(9t{v^HL z)?!CM|2A-O-PV*n;Bp5Td@^KHcBLRKp;!do&*+=-z`!lgyXxiEI>+e)kfp5BH^9Lm zFj}JCYd-Jp>CEllnpS>4jzn^@9KQ;q00006VoOIv0RI600RN!9r;`8x010qNS#tmY z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{nU z{b$H|0EUNQ^H#WU;l@h1M4rb{)izqx`}s`0m%c+iRP|q^HIT;MnovpBuY+01S0kge zwZlgzL8GCyWGOzq4opTU+X@do2rd^??2Ib&H{6cPyX{nn=kcSWXvqkRAD-gF>cgS` z!YA^g_tH4K1O8xpGd`Zx~GOvD`skk{Rb-S3;!4`3Y~<()JuvQo)Ux;trc4b#`xhhDD_ zldz+sV-m6y^BN4Mr33;_ioKheCAnFzRI#$RcT6!*%Q98jxgZ34dwcl&d`Hv*wE}-q zYxsrP!kQQjMJ@k{tbomC8$WXQ^uo?v7Gy;%&#b*dZc-b@-|Ygon=ca+X!~&<_obx~ zTYVVIrG79P>Djaqk1W&N+zdcg*5u=Otk;WW>vn|4Lv7weEZeeWas{kbD@LOczaMu0 z0b~XAUphcx!D?WBh)~;ikm(pAv+mf$`xTUJCDnR207FAV0HmjI4IgZtsNKl0!7dkAPWkdOe6E`c}pz_sKzwW1<|N+mNoyCQ|i z>2%U}A%=t1AOy6WUB&3A3#Zc=4iKm3R6*#_nUj+fZlCat%jFu67hwt+yY+5jPJa=( p8{V-FA|>$zU9=YR6E67gP7ZQTF>002ovPDHLkV1gY3Bnbcj literal 0 HcmV?d00001 diff --git a/public/icons/docs/gnuplot/SOURCE b/public/icons/docs/gnuplot/SOURCE new file mode 100644 index 0000000000..8acb1e8c6e --- /dev/null +++ b/public/icons/docs/gnuplot/SOURCE @@ -0,0 +1 @@ +https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/demo/html/favicon.ico From 362d1532a17ec92f2ae9bfd47bf4f75791abef03 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 24 Nov 2019 17:23:50 +0100 Subject: [PATCH 0006/2496] python: add version 3.8 --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/python.rb | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0165ade208..574f33ca46 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -613,7 +613,7 @@ credits = [ 'https://raw.githubusercontent.com/pygame/pygame/master/LICENSE' ], [ 'Python', - '2001-2018 Python Software Foundation
Python is a trademark of the Python Software Foundation.', + '2001-2019 Python Software Foundation
Python is a trademark of the Python Software Foundation.', 'PSFL', 'https://docs.python.org/3/license.html' ], [ diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index e22665cb70..a9c99cd7c9 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -19,12 +19,25 @@ class Python < FileScraper library/sunau.html) options[:attribution] = <<-HTML - © 2001–2018 Python Software Foundation
+ © 2001–2019 Python Software Foundation
Licensed under the PSF License. HTML + # In order to download the documentation, run: + # $ mkdir -p docs/python~3.8 && \ + # cd docs/python~3.8 && \ + # curl -L https://docs.python.org/3.8/archives/python-3.8.0-docs-html.tar.bz2 | \ + # tar xj --strip-components=1 + + version '3.8' do # docs.python.org/3.8/download.html + self.release = '3.8.0' + self.base_url = 'https://docs.python.org/3.8/' + + html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' + end + version '3.7' do # docs.python.org/3.7/download.html - self.release = '3.7.4' + self.release = '3.7.5' self.base_url = 'https://docs.python.org/3.7/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' @@ -38,7 +51,7 @@ class Python < FileScraper end version '3.5' do # docs.python.org/3.5/download.html - self.release = '3.5.7' + self.release = '3.5.9' self.base_url = 'https://docs.python.org/3.5/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' From 881f4af0b6d5343530e0d0829369f680c1302e22 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 24 Nov 2019 17:48:35 +0100 Subject: [PATCH 0007/2496] leaflet: add version 1.6.0 https://leafletjs.com/2019/11/17/leaflet-1.6.0.html Updated icon from https://leafletjs.com/docs/images/favicon.ico --- lib/docs/scrapers/leaflet.rb | 7 ++++++- public/icons/docs/leaflet/16.png | Bin 670 -> 1047 bytes public/icons/docs/leaflet/16@2x.png | Bin 1600 -> 1779 bytes public/icons/docs/leaflet/SOURCE | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb index 1de33186d9..3c3c89f444 100644 --- a/lib/docs/scrapers/leaflet.rb +++ b/lib/docs/scrapers/leaflet.rb @@ -19,8 +19,13 @@ class Leaflet < UrlScraper Maps © OpenStreetMap contributors. HTML + version '1.6' do + self.release = '1.6.0' + self.base_url = "https://leafletjs.com/reference-#{release}.html" + end + version '1.5' do - self.release = '1.5.0' + self.release = '1.5.1' self.base_url = "https://leafletjs.com/reference-#{release}.html" end diff --git a/public/icons/docs/leaflet/16.png b/public/icons/docs/leaflet/16.png index f0638e038f4640333a801ccf4ea1fb9df518ec4b..42510dc8a2978ee1e9f88a592ebff5ad25926b90 100644 GIT binary patch literal 1047 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstU$g(vPY0F z14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>Af@u;@VK|NsAI9|)d%Fl7GGuz82W z`qq2xf1SSINZ8y1!HZ9Z&p#SEYj4o8FFEs%gsr#`z5HC%=DP{=4g@bc5wY}C?AT#<9@32SR{`0KEgWV(FPkpdmo+tbM^i!+{#tU5ksz zH(Yi$637NxwD4Fs(EDqz#w|PQMh5#8rlOYb9 zcPMo0gQV40fyO3mf0VrbX3WY<;oBZ2FFF;t@pjyf$0=*BM$JF&zwKet%mZGlE=Nq= z?KXL*>yk6UD=vn0Z?M~ZFQIR<u@$_T&Q||p4`Fdh= zm|H@?Sk(IEdN-iZdrud~5Q)pl2@K3`YH7B$%+6wL8VRY%=0;|QrjH-AeAv0;tgg;y zZmzWz6^b=_+0wTcJ({FsZC57{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q~nSmU<1_Xh%u0S@e^Wf6;UuWI^Bw%j0#?y zu|?WijFDo%B74wF@`a74p^hH+>NtlX#r?#zdf3?c6daXaL&|ydR>g6&}MJ_J745 z1$scc6tZQtUx7Z>KpSY_#h?KsIXE-&u1RWrF~Xfxwt;+=w18wcMvOEqUjQHrYE;hf z=Ys~2QNe!?s@^?c?6KAE*DN7N^ec$BD0yzI12CXipbkt68UVECXsCLB`7)|1T~Br< zzA>)ud)p}D?0V6uohMg?1PvgoT7S4_EHj3^xh<0H%~(wKXD*>S2m}BM*>GmHF!4)7hF5z|h8OS+3u6Fr-IMUDw0nk(nc6$yc40{|-zJavco$?mRYZ3WP zy?-)5+5*jP_JjarRtY3f1s{zyhV6OB$$2Eca21^wgE{}4dQozGpiVe`NPp!mG_}fZ zyA8P+8i4Vhw1s5X>G^c#^H%rAZs?!`FtBo16J4il>}i-f%%F+vaoE^?Vjel1`z{?m z0y%fLVadfLXW&0F-gQtZ;DUf2pfMcHzD{|YiZ2CbgkZ!6e{BBHRte>-f4kHU_GFlP z4?;Km4TqB*z#h9K79r~7rhjken8I-Ox$5)WXIcMcX)DE36YOEixP%2=+m6p2W@ZGx zp@$I+lwXrx&Y#bE66=fjr6HdknY(EFPj8xZ^}NAAMF+;ON;tmdtS7w==~g|bs}p?- zbN)RXG?|GA#Rf%d81CPJ=ZVRs;jgm(ua#h9Pl2=& Date: Sun, 24 Nov 2019 18:21:58 +0100 Subject: [PATCH 0008/2496] typescript: update to 3.7.2 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/typescript/clean_html.rb | 3 ++- lib/docs/filters/typescript/entries.rb | 3 ++- lib/docs/scrapers/typescript.rb | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0165ade208..b4a179a0fd 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -763,7 +763,7 @@ credits = [ 'https://twig.symfony.com/license' ], [ 'TypeScript', - 'Microsoft and other contributors', + '2012-2019 Microsoft', 'Apache', 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE' ], [ diff --git a/lib/docs/filters/typescript/clean_html.rb b/lib/docs/filters/typescript/clean_html.rb index 24aed5a6f3..0d358879c5 100644 --- a/lib/docs/filters/typescript/clean_html.rb +++ b/lib/docs/filters/typescript/clean_html.rb @@ -9,6 +9,7 @@ def call end css('.xs-toc-container').remove + css('.anchor-hash').remove css('article h1').each do |node| node.name = 'h2' @@ -19,7 +20,7 @@ def call end css('pre > code').each do |node| - node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-') + node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-') if node['class'] node.content = node.content.gsub(' ', ' ') node.before(node.children).remove end diff --git a/lib/docs/filters/typescript/entries.rb b/lib/docs/filters/typescript/entries.rb index 19bcbe3fae..43d577b0df 100644 --- a/lib/docs/filters/typescript/entries.rb +++ b/lib/docs/filters/typescript/entries.rb @@ -2,7 +2,7 @@ module Docs class Typescript class EntriesFilter < Docs::EntriesFilter def get_name - name = at_css('h1').content + name = at_css('h1').content.strip name.sub! ' and ', ' & ' name end @@ -24,6 +24,7 @@ def additional_entries css('.post-content h1, .post-content h2').each_with_object [] do |node, entries| next if node.next_element.try(:name) == 'h2' + node.css('.anchor-hash').remove name = node.content.strip next if name.length > 40 next if name == self.name || SKIP_ENTRIES.any? { |str| name.include?(str) } diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb index 777f5dd640..828dd7339f 100644 --- a/lib/docs/scrapers/typescript.rb +++ b/lib/docs/scrapers/typescript.rb @@ -2,7 +2,7 @@ module Docs class Typescript < UrlScraper self.name = 'TypeScript' self.type = 'simple' - self.release = '3.1.6' + self.release = '3.7.2' self.base_url = 'https://www.typescriptlang.org/docs/' self.root_path = 'tutorial.html' self.links = { @@ -21,7 +21,7 @@ class Typescript < UrlScraper } options[:attribution] = <<-HTML - © Microsoft and other contributors
+ © 2012-2019 Microsoft
Licensed under the Apache License, Version 2.0. HTML From 9b86f2fdb0130a99a88af74d59aae5c3c6eb8be4 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 24 Nov 2019 18:31:24 +0100 Subject: [PATCH 0009/2496] sqlite: update to 3.30.1 --- lib/docs/scrapers/sqlite.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb index d3a5fa6b37..9b24532606 100644 --- a/lib/docs/scrapers/sqlite.rb +++ b/lib/docs/scrapers/sqlite.rb @@ -2,7 +2,7 @@ module Docs class Sqlite < FileScraper self.name = 'SQLite' self.type = 'sqlite' - self.release = '3.25.2' + self.release = '3.30.1' self.base_url = 'https://sqlite.org/' self.root_path = 'docs.html' self.initial_paths = %w(keyword_index.html) @@ -37,6 +37,7 @@ class Sqlite < FileScraper requirements.html session/intro.html syntax.html + src/doc/trunk/doc/lemon.html ) options[:attribution] = 'SQLite is in the Public Domain.' From 73ac8c73de22369084cbb9430276b6fdd6305212 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 24 Nov 2019 18:46:56 +0100 Subject: [PATCH 0010/2496] eslint: update to 6.7.0 --- lib/docs/scrapers/eslint.rb | 2 +- public/icons/docs/eslint/SOURCE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/eslint.rb b/lib/docs/scrapers/eslint.rb index c213eacc2f..d7263c3ccd 100644 --- a/lib/docs/scrapers/eslint.rb +++ b/lib/docs/scrapers/eslint.rb @@ -2,7 +2,7 @@ module Docs class Eslint < UrlScraper self.name = 'ESLint' self.type = 'simple' - self.release = '5.8.0' + self.release = '6.7.0' self.base_url = 'https://eslint.org/docs/' self.root_path = 'user-guide/getting-started' self.links = { diff --git a/public/icons/docs/eslint/SOURCE b/public/icons/docs/eslint/SOURCE index 393080273d..b190c25b85 100644 --- a/public/icons/docs/eslint/SOURCE +++ b/public/icons/docs/eslint/SOURCE @@ -1 +1 @@ -https://github.com/eslint/eslint.github.io/tree/master/img +https://github.com/eslint/website/blob/master/assets/img/favicon.512x512.png From 01ff3f1fb2e59dd7bbf1b3fd59f6f897ff46712d Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 26 Nov 2019 04:41:57 +0100 Subject: [PATCH 0011/2496] ansible: add version 2.9 --- lib/docs/filters/ansible/clean_html.rb | 2 +- lib/docs/scrapers/ansible.rb | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/ansible/clean_html.rb b/lib/docs/filters/ansible/clean_html.rb index 9cef4740e5..190b66382b 100644 --- a/lib/docs/filters/ansible/clean_html.rb +++ b/lib/docs/filters/ansible/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Ansible class CleanHtmlFilter < Filter def call - @doc = at_css('#page-content') + @doc = at_css('.document') css('font').each do |node| node.before(node.children).remove diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 2ebb42ce3a..6826b393f3 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -30,18 +30,23 @@ class Ansible < UrlScraper /\Aroadmap.*/i, ] + version '2.9' do + self.release = '2.9.1' + self.base_url = "https://docs.ansible.com/ansible/#{version}/" + end + version '2.8' do - self.release = '2.8.3' + self.release = '2.8.7' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end version '2.7' do - self.release = '2.7.12' + self.release = '2.7.15' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end version '2.6' do - self.release = '2.6.18' + self.release = '2.6.20' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end From 74cc34486a124ba1bf080a8dee70d3ee8b97f501 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 26 Nov 2019 05:00:20 +0100 Subject: [PATCH 0012/2496] postgresql: add version 12 --- lib/docs/scrapers/postgresql.rb | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index 7a68ed414f..9483bfde30 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -55,33 +55,38 @@ class Postgresql < UrlScraper Licensed under the PostgreSQL License. HTML + version '12' do + self.release = '12.1' + self.base_url = "https://www.postgresql.org/docs/#{version}/" + end + version '11' do - self.release = '11.5' - self.base_url = 'https://www.postgresql.org/docs/11/' + self.release = '11.6' + self.base_url = "https://www.postgresql.org/docs/#{version}/" end version '10' do - self.release = '10.3' - self.base_url = 'https://www.postgresql.org/docs/10/static/' + self.release = '10.11' + self.base_url = "https://www.postgresql.org/docs/#{version}/" end version '9.6' do - self.release = '9.6.6' - self.base_url = 'https://www.postgresql.org/docs/9.6/static/' + self.release = '9.6.16' + self.base_url = "https://www.postgresql.org/docs/#{version}/" html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' end version '9.5' do - self.release = '9.5.10' - self.base_url = 'https://www.postgresql.org/docs/9.5/static/' + self.release = '9.5.20' + self.base_url = "https://www.postgresql.org/docs/#{version}/" html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' end version '9.4' do - self.release = '9.4.15' - self.base_url = 'https://www.postgresql.org/docs/9.4/static/' + self.release = '9.4.25' + self.base_url = "https://www.postgresql.org/docs/#{version}/" html_filters.insert_before 'postgresql/extract_metadata', 'postgresql/normalize_class_names' end From 0b6d2f051d21f2e7fbac67b074af23d87529a642 Mon Sep 17 00:00:00 2001 From: Jason Butz <736696+jbutz@users.noreply.github.com> Date: Tue, 26 Nov 2019 13:22:54 +0000 Subject: [PATCH 0013/2496] Fix Missing Jest Documentation The Jest documentation was missing most of the items that should have been under "The Jest Object". This updates the CSS selector is get all the nodes for the API pages. --- lib/docs/filters/jest/entries.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/docs/filters/jest/entries.rb b/lib/docs/filters/jest/entries.rb index febe3e7fca..14a697c28e 100644 --- a/lib/docs/filters/jest/entries.rb +++ b/lib/docs/filters/jest/entries.rb @@ -22,7 +22,7 @@ def additional_entries entries = [] - at_css('.mainContainer ul').css('li > a').each do |node| + at_css('.mainContainer h2 + ul, ul.toc-headings').css('li > a').each do |node| code = node.at_css('code') next if code.nil? @@ -35,7 +35,6 @@ def additional_entries entries << [name, id] end - entries end end From 02e4a384b67ca71bd669e59a4fbf41a6653540ff Mon Sep 17 00:00:00 2001 From: Lukas Geiger Date: Thu, 26 Dec 2019 21:45:45 +0100 Subject: [PATCH 0014/2496] Upgrade TensorFlow docs to v2.0 --- .../templates/pages/about_tmpl.coffee | 2 +- assets/stylesheets/pages/_tensorflow.scss | 1 + lib/docs/filters/tensorflow/clean_html.rb | 2 +- lib/docs/filters/tensorflow/entries.rb | 115 ++++++++++++++---- lib/docs/scrapers/tensorflow.rb | 33 +---- public/icons/docs/tensorflow/16.png | Bin 701 -> 599 bytes public/icons/docs/tensorflow/16@2x.png | Bin 898 -> 404 bytes 7 files changed, 103 insertions(+), 50 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0165ade208..d0c6fdb95a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -743,7 +743,7 @@ credits = [ 'http://tcl.tk/software/tcltk/license.html' ], [ 'TensorFlow', - '2018 The TensorFlow Authors', + '2019 The TensorFlow Authors', 'CC BY', 'https://creativecommons.org/licenses/by/3.0/' ], [ diff --git a/assets/stylesheets/pages/_tensorflow.scss b/assets/stylesheets/pages/_tensorflow.scss index ebd5baef89..3967e9c36c 100644 --- a/assets/stylesheets/pages/_tensorflow.scss +++ b/assets/stylesheets/pages/_tensorflow.scss @@ -4,4 +4,5 @@ h4 { @extend %block-label; } h3 + h3 { margin-top: .25rem; } > .toc ul ul { margin: .25rem 0; } + table { float: inherit } } diff --git a/lib/docs/filters/tensorflow/clean_html.rb b/lib/docs/filters/tensorflow/clean_html.rb index 5829c3404b..cdacee5c8f 100644 --- a/lib/docs/filters/tensorflow/clean_html.rb +++ b/lib/docs/filters/tensorflow/clean_html.rb @@ -4,7 +4,7 @@ class CleanHtmlFilter < Filter def call @doc = at_css('.devsite-article-inner') - css('hr', '.devsite-nav', '.devsite-content-footer', '.devsite-article-body > br').remove + css('hr', '.devsite-nav', '.devsite-content-footer', '.devsite-article-body > br', '.devsite-article-meta', 'devsite-nav-buttons').remove css('aside.note').each do |node| node.name = 'blockquote' diff --git a/lib/docs/filters/tensorflow/entries.rb b/lib/docs/filters/tensorflow/entries.rb index 4e2757ebe2..f71c6b7f51 100644 --- a/lib/docs/filters/tensorflow/entries.rb +++ b/lib/docs/filters/tensorflow/entries.rb @@ -7,35 +7,108 @@ def get_name name = at_css('h1').content.strip name.remove! 'class ' name.remove! 'struct ' - name.remove! 'module: ' + name.remove! 'Module: ' name.remove! %r{ \(.+\)} name.sub! %r{(? 'Get Started', - 'programmers_guide' => 'Guide', - 'tutorials' => 'Tutorials', - 'performance' => 'Performance', - 'deploy' => 'Deploy', - 'extend' => 'Extend' - } - def get_type - return 'Guides' if base_url.path.start_with?('/api_guides') - - if version == 'Guide' - TYPE_BY_DIR[subpath.split('/').first] + if version == 'Guide' and base_url.path.start_with?('/guide') + 'Guides' + elsif version == 'Guide' and base_url.path.start_with?('/tutorials') + 'Tutorials' + elsif slug.start_with?('tf/audio') + 'tf.audio' + elsif slug.start_with?('tf/autograph') + 'tf.autograph' + elsif slug.start_with?('tf/bitwise') + 'tf.bitwise' + elsif slug.start_with?('tf/compat') + 'tf.compat' + elsif slug.start_with?('tf/config') + 'tf.config' + elsif slug.start_with?('tf/data') + 'tf.data' + elsif slug.start_with?('tf/debugging') + 'tf.debugging' + elsif slug.start_with?('tf/distribute') + 'tf.distribute' + elsif slug.start_with?('tf/dtypes') + 'tf.dtypes' + elsif slug.start_with?('tf/errors') + 'tf.errors' + elsif slug.start_with?('tf/estimator') + 'tf.estimator' + elsif slug.start_with?('tf/experimental') + 'tf.experimental' + elsif slug.start_with?('tf/feature_column') + 'tf.feature_column' + elsif slug.start_with?('tf/graph_util') + 'tf.graph_util' + elsif slug.start_with?('tf/image') + 'tf.image' + elsif slug.start_with?('tf/initializers') + 'tf.initializers' + elsif slug.start_with?('tf/io') + 'tf.io' + elsif slug.start_with?('tf/keras') + 'tf.keras' + elsif slug.start_with?('tf/linalg') + 'tf.linalg' + elsif slug.start_with?('tf/lite') + 'tf.lite' + elsif slug.start_with?('tf/lookup') + 'tf.lookup' + elsif slug.start_with?('tf/losses') + 'tf.losses' + elsif slug.start_with?('tf/math') + 'tf.math' + elsif slug.start_with?('tf/metrics') + 'tf.metrics' + elsif slug.start_with?('tf/nest') + 'tf.nest' + elsif slug.start_with?('tf/nn') + 'tf.nn' + elsif slug.start_with?('tf/optimizers') + 'tf.optimizers' + elsif slug.start_with?('tf/quantization') + 'tf.quantization' + elsif slug.start_with?('tf/queue') + 'tf.queue' + elsif slug.start_with?('tf/ragged') + 'tf.ragged' + elsif slug.start_with?('tf/random') + 'tf.random' + elsif slug.start_with?('tf/raw_ops') + 'tf.raw_ops' + elsif slug.start_with?('tf/saved_model') + 'tf.saved_model' + elsif slug.start_with?('tf/sets') + 'tf.sets' + elsif slug.start_with?('tf/signal') + 'tf.signal' + elsif slug.start_with?('tf/sparse') + 'tf.sparse' + elsif slug.start_with?('tf/strings') + 'tf.strings' + elsif slug.start_with?('tf/summary') + 'tf.summary' + elsif slug.start_with?('tf/sysconfig') + 'tf.sysconfig' + elsif slug.start_with?('tf/test') + 'tf.test' + elsif slug.start_with?('tf/tpu') + 'tf.tpu' + elsif slug.start_with?('tf/train') + 'tf.train' + elsif slug.start_with?('tf/version') + 'tf.version' + elsif slug.start_with?('tf/xla') + 'tf.xla' else - node = at_css('.devsite-nav-item.devsite-nav-active') - node = node.ancestors('.devsite-nav-item').first.at_css('.devsite-nav-title') - type = node.content - type.remove! %r{\.\z} - type = 'tf.contrib' if type.start_with?('tf.contrib') - type + 'tf' end end end diff --git a/lib/docs/scrapers/tensorflow.rb b/lib/docs/scrapers/tensorflow.rb index 9638b5168e..d352ccd4f5 100644 --- a/lib/docs/scrapers/tensorflow.rb +++ b/lib/docs/scrapers/tensorflow.rb @@ -4,7 +4,7 @@ module Docs class Tensorflow < UrlScraper self.name = 'TensorFlow' self.type = 'tensorflow' - self.release = '1.8' + self.release = '2.0' self.root_path = 'index.html' self.links = { home: 'https://www.tensorflow.org/', @@ -16,44 +16,23 @@ class Tensorflow < UrlScraper options[:max_image_size] = 300_000 options[:container] = '.devsite-main-content' - options[:fix_urls] = ->(url) do - url.sub! 'how_tos/../tutorials', 'tutorials' - url - end - options[:attribution] = <<-HTML - © 2018 The TensorFlow Authors. All rights reserved.
+ © 2019 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License. HTML version 'Python' do - include MultipleBaseUrls - self.base_urls = ['https://www.tensorflow.org/api_docs/python/', 'https://www.tensorflow.org/api_guides/python/'] + self.base_url = 'https://www.tensorflow.org/api_docs/python/' end version 'C++' do - include MultipleBaseUrls - self.base_urls = ['https://www.tensorflow.org/api_docs/cc/', 'https://www.tensorflow.org/api_guides/cc/'] + self.base_url = 'https://www.tensorflow.org/api_docs/cc/' end version 'Guide' do - self.base_url = 'https://www.tensorflow.org/' - self.root_path = 'get_started/get_started' - self.initial_paths = %w( - programmers_guide/reading_data - tutorials/mandelbrot - performance/performance_guide - deploy/hadoop - extend/architecture) - - options[:only_patterns] = [ - /\Aget_started/, - /\Aprogrammers_guide/, - /\Atutorials/, - /\Aperformance/, - /\Adeploy/, - /\Aextend/] + include MultipleBaseUrls + self.base_urls = ['https://www.tensorflow.org/guide/', 'https://www.tensorflow.org/tutorials/'] end def get_latest_version(opts) diff --git a/public/icons/docs/tensorflow/16.png b/public/icons/docs/tensorflow/16.png index 07f894e51489afda315f6c5da39ace2d9280ea45..8463d5699f47fe7db6b702b5a30c64ba74d85afb 100644 GIT binary patch delta 575 zcmV-F0>J&f1=j?SBYyx1a7bBm000XU000XU0RWnu7ytkQ2}wjjR5*>5lgn#UQ4oi} zb8~V7HEJYAqDCoATiSwAYQP6d!3TtZ73@Ngx~OiVv~Cpf4^VI+E==(Ok_tBNbRn3E ziknmkwxR^7(NZj8u$pL7uLL!Z<07e;n=aZ}&iv*(^EyH)MSq>8?z%}_I>who2NKw@ zeFFcP2u(dRW~rzFe4lC{IlP}&*ZaxO?8eG-Bp}(zDtDYsp+TB^A7l6CYXLvMN)p%n zByXQ2H`R?~Wi|0B60oud9nhJ>>Ag?W(W|ta7{|7zC{*g9i_t3syo>c=#ZyfLiwR%@ z^lD7p`+GL} zN65bJrI2&hr0b4vtlc_H?nMw~v?9?sF+64*v#~u^Q`WCN&DGnRA;(aE2Ag^Hj0Km?_4}UcVuvHxlC?s z7ph!XIzTQju;WG)<81_e#lK5jLJJDyGJ)q{wuZZ~R#_JI)epEHpjiy;?l}3+-B7Nq zQ)s_va5%>i7Q-wTb>F#Mg4szIj|Teq_{4_dikkeUDh N002ovPDHLkV1i`a2R;A* delta 678 zcmV;X0$Kgn1ib~2BYy&fNklC>`tG*bx{dLhdFPow^X&$7`Ac~g_t~qHL)J2K$g&&<66;5qqb>ga zUbvylUl_~$sXUW|mR$L;E zf_;sUa)gk7et#l0N(x|`5$+N$i*e?d(y%B6WS?0k+YJC-Z{xN zK;KZBm#&W&`x-L6$Oj1Xjk%k@hb*5ZaS`$}_D& zLq!9I`6Dt$W%kM@rSc9jl^Uc9v@{cZB?)q1eN0GRsDZb*QPVJUYpm(ts37Y0>7&?B zu+dYN(tiZJ?=3*=%@aaL87gDpE@G1@^4+40^6@K!EFSLh8saWAz%!G3MEmLUo$!YS zX+|qGAYx{?R5o0sPnxXJE8K4lqzpr2SE>DD!&qc0ACK3oy=r`tpET3 M07*qoM6N<$f-W~r6#xJL diff --git a/public/icons/docs/tensorflow/16@2x.png b/public/icons/docs/tensorflow/16@2x.png index 94eebc919259cfd6d5dc8904b08684baf2a45bbd..00a8af6dabc6bd2705678240ab4a59398f490e80 100644 GIT binary patch delta 378 zcmV-=0fqj82b2SlBYy!~NklbWUp}x zZee%_FF+E28Gr&LzQXejW&mg00{w{0I>v+1jue{8DL$D zh8@ySfEQrny>k{E!4dQI9gOn304pwb{AgvDFmMU;4PwOV07*qoM6N<$g64^l^Z)<= delta 876 zcmV-y1C#ue1A+&TBYy))NklrBrBUNp8-*f)vd;kAE-B5Kc*wN_@-o*Cj&Fp0Uc?|!voC03c@kb$2y%fpr+=i>fAFza9!K-V80;ru zQo=Do9J_(HurJobIUDZA?ao2NeB`rTbf>wV|Wz!Hzi6#81a4_h?`YD_{jVB zaHiyu_|N|&Cmu@z-+CPhl>{JiO^E?+U$Ur&D_3?t93D8ve2l?gS9#9)iilt$YbMQ; z;Bv~)gJ)431dk+xe;axf2p;7D>_ek2`c^04MTxjL5P#T>=Uk+e3?{M-*L-SCr7wy? zpd910WNah=ndlrB4S}6WCFgt~9=t2aIae)ysp=V+LfvjlrF&b`^uI&^jI9QMpmaUB z7w9StbIn$X0uaAHvJDTS=REZDhyh@@A2nSZ0Og#b5f7fD0{f7c!Jb1`3J~^9i_)O? z{;~kBJb#(lvGj#lGKK&gsSLomQ0{e%e2M%&5&$ojcXKpN{31c{Aq0=wej_@T^dWE~?lk;rIBx8-HoJwW`0TXdfm&ivid&_264ho~>Am zjs^EhRd=fHB@RI37>O-+b7DA{JB%%QRmo*@=E-_DH~^7ratyZD@V#hU03!EdMe_o1 z=gNCE96%Ng&gp8fXVVb?_|_fxf+l>KtG%Z|0fbd9m4jn~R%qYOMG79f+$Pte7hfRr z8f6@S$hA-bp2f;{$@oSGAfE-T7oZ)$lNF=3rqZ8D0C1i>`8u9FyM`*DsN1aR`YyN| zKZF5t<(FJ}FS1l))-UNv_gk~+DbA&`J|U>O`uz{`kU3y8-V3V$0000 Date: Mon, 6 Jan 2020 14:34:09 +0100 Subject: [PATCH 0015/2496] Added Julia base language docs for v0.7 and later These docs were moved to their own section (`base`) in v0.7. --- lib/docs/scrapers/julia.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/julia.rb b/lib/docs/scrapers/julia.rb index 7573ffe762..4cc9ef2a34 100644 --- a/lib/docs/scrapers/julia.rb +++ b/lib/docs/scrapers/julia.rb @@ -5,7 +5,6 @@ class Julia < UrlScraper code: 'https://github.com/JuliaLang/julia' } - options[:only_patterns] = [/\Amanual\//, /\Astdlib\//] options[:attribution] = <<-HTML © 2009–2019 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
@@ -20,6 +19,7 @@ class Julia < UrlScraper html_filters.push 'julia/entries', 'julia/clean_html' options[:container] = '#docs' + options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//] end version '1.1' do @@ -30,6 +30,7 @@ class Julia < UrlScraper html_filters.push 'julia/entries', 'julia/clean_html' options[:container] = '#docs' + options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//] end version '1.0' do @@ -40,6 +41,7 @@ class Julia < UrlScraper html_filters.push 'julia/entries', 'julia/clean_html' options[:container] = '#docs' + options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//] end version '0.7' do @@ -50,6 +52,7 @@ class Julia < UrlScraper html_filters.push 'julia/entries', 'julia/clean_html' options[:container] = '#docs' + options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//] end version '0.6' do @@ -60,6 +63,7 @@ class Julia < UrlScraper html_filters.push 'julia/entries', 'julia/clean_html' options[:container] = '#docs' + options[:only_patterns] = [/\Amanual\//, /\Astdlib\//] end version '0.5' do @@ -68,6 +72,8 @@ class Julia < UrlScraper self.type = 'sphinx_simple' html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html' + + options[:only_patterns] = [/\Amanual\//, /\Astdlib\//] end def get_latest_version(opts) From 84b83050346265a3e011ebe21e93f7c5a4496bf9 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 13:23:07 -0500 Subject: [PATCH 0016/2496] Finish Angular scrapers --- lib/docs/scrapers/angular.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index b5db97e928..4ec689c131 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -60,7 +60,7 @@ def handle_response(response) version do self.release = '8.2.12' - self.base_url = 'https://v7.angular.io/' + self.base_url = 'https://angular.io/' self.root_path = 'docs' html_filters.push 'angular/clean_html', 'angular/entries' @@ -100,7 +100,7 @@ def handle_response(response) version '6' do self.release = '6.0.4' - self.base_url = 'https://angular.io/' + self.base_url = 'https://v6.angular.io/' self.root_path = 'docs' html_filters.push 'angular/clean_html', 'angular/entries' From 9b117a5cd540750db7517ef82f511de6c5253c84 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 13:49:55 -0500 Subject: [PATCH 0017/2496] Fix sequelize icon size --- public/icons/docs/sequelize/16@2x.png | Bin 37753 -> 3226 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/icons/docs/sequelize/16@2x.png b/public/icons/docs/sequelize/16@2x.png index 78cb63a69bae7b5f49313b792abe290bbf4b6004..7051578e30a7248b9fc02302267f4582d7219dc1 100644 GIT binary patch delta 2828 zcmV+n3-k2(rUIH7A&F2p51poj50RR91Mu%wt z1ONa40RR91P5=M^00000NB{r;0RR91NB{r;0RRG^0ssU600031001DM0{{d700031 z001BW0000gimi(P000SaNLh0L0I_Fs0e=cJNklL z2qjOsJe+`=NgAXi&;bk<5qFA}^WJ_t04XUNq7#PL-_tA5_y!0?Y9NzBgVF|2CZrDG z7(g~PEGc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ktI4hWz-spXB}dZU>GNpx#DYCPln-IMQ1fcucE* zudeY#ZxZ+4MLKBHS^?Gh=M)bTsJ^$aufFFYRgIbT8tmy~(V@MXA`D)BEI>hVVCPP? zCWlwo#Hb;9b&cn6Z$_k(+H`@c`&Ve;!I=}cJ*2=Tb^yw|TVoOP=I0)}V?ST4ZI=y$ zuXa|0KxILI`|r@w%SNAa)i17|e%{spcGfxna;m&W1jl*&8F{^StR4vbe=OanMuF%D Q{{R3007*qoM6N<$f&#TD2mk;8 From e8978080678c9ddf803f8594a8dd6f09bdd45655 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 13:58:35 -0500 Subject: [PATCH 0018/2496] Fix Heroku auth token --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c59f0be8f..87c17ad915 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,4 +23,4 @@ deploy: branch: master condition: $TRAVIS_EVENT_TYPE != cron api_key: - secure: "4p1klvWJZSOImzFcKOduILjP93hlOlAhceWlYMKS4tU+TCFE8qTBzdKdFPSCsCgjB+YR9pBss+L0lJpVVMjSwFHXqpKe6EeUSltO2k7DFHfW7kXLUM/L0AfqXz+YXk76XUyZMhvOEbldPfaMaj10e8vgDOQCSHABDyK/4CU+hnI=" + secure: NFfTIdMdNzm99u2bMq/iNo6Sl05XOcHvNEDrEpHvCWG79V1aTN53+sHww+PeTX1wgJA6ZrBAOyTduPlTZbmWH1iHkUhX2vagM1q680rJWkXccO42rJ1V0coKXIfN3/XYzim07YTT4PBdrDoBRd0NJN/fGXl6uNwBBX+7hHt5O4s= From 92a0d28e48d4353b8e591fd0065da4b926c781ca Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 15:18:00 -0500 Subject: [PATCH 0019/2496] Improve Mongoose docs --- lib/docs/filters/mongoose/clean_html.rb | 39 ++++++++++++------------- lib/docs/filters/mongoose/entries.rb | 29 +++++++++++------- lib/docs/scrapers/mongoose.rb | 3 +- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/lib/docs/filters/mongoose/clean_html.rb b/lib/docs/filters/mongoose/clean_html.rb index dbbb3c8c07..7364649baf 100644 --- a/lib/docs/filters/mongoose/clean_html.rb +++ b/lib/docs/filters/mongoose/clean_html.rb @@ -4,28 +4,12 @@ class CleanHtmlFilter < Filter def call css('hr', '.showcode', '.sourcecode').remove - if slug == 'api' - at_css('.controls').after('

Mongoose API

') - - css('.private', '.controls').remove - - css('a + .method').each do |node| - node.previous_element.replace("

#{node.previous_element.to_html}

") - end - else - css('h2:empty + p').each do |node| # /customschematypes.html - node.previous_element.content = node.content - node.remove - end - - at_css('h2').name = 'h1' - - css('h3').each do |node| - node.name = 'h2' - end + css('h2:empty + p').each do |node| # /customschematypes.html + node.previous_element.content = node.content + node.remove end - css('pre > code', 'h1 + ul', '.module', '.item', 'h3 > a', 'h3 code').each do |node| + css('pre > code', 'h1 + ul', '.module', '.item', 'h1 > a', 'h2 > a', 'h3 > a', 'h3 code').each do |node| node.before(node.children).remove end @@ -33,6 +17,21 @@ def call node['data-language'] = 'javascript' end + css('.native-inline', '.api-nav', '.toc', '.api-content ul:first-child').remove + + if !at_css('h1') + if css('h2').count > 1 + # Mongoose vX.Y.Z: [title here] + title = doc.document.at_css('title').content.split(': ')[1] + doc.prepend_child("

#{title}") + else + at_css('h2').name = 'h1' + css('h3').each do |el| + el.name = 'h2' + end + end + end + doc end end diff --git a/lib/docs/filters/mongoose/entries.rb b/lib/docs/filters/mongoose/entries.rb index b2466e5889..d4918d9460 100644 --- a/lib/docs/filters/mongoose/entries.rb +++ b/lib/docs/filters/mongoose/entries.rb @@ -2,23 +2,30 @@ module Docs class Mongoose class EntriesFilter < Docs::EntriesFilter def get_name - if slug == 'api' - 'Mongoose' - else - at_css('h1').content - end + at_css('h1').content end def get_type - if slug == 'api' - 'Mongoose' + if slug.start_with? 'api' + for heading in css('h3[id]') + type = get_type_from heading + return type if type + end + end + 'Guides' + end + + def get_type_from node + name = node.content.strip + type = name.split(/[#\.\(]/).first + if type.empty? || name.include?(' ') + nil else - 'Guides' + type end end def additional_entries - return [] unless slug == 'api' entries = [] css('h3[id]').each do |node| @@ -32,8 +39,8 @@ def additional_entries name.sub! %r{\(.+\)}, '()' next if name.include?(' ') - type = name.split(/[#\.\(]/).first - next if type.empty? + type = get_type_from node + next if type.nil? entries << [name, id, type] end diff --git a/lib/docs/scrapers/mongoose.rb b/lib/docs/scrapers/mongoose.rb index 36ea82c58a..af7d56ffa1 100644 --- a/lib/docs/scrapers/mongoose.rb +++ b/lib/docs/scrapers/mongoose.rb @@ -5,7 +5,7 @@ class Mongoose < UrlScraper self.release = '5.7.7' self.base_url = 'https://mongoosejs.com/docs/' self.root_path = 'index.html' - self.initial_paths = %w(guide.html api.html) + self.initial_paths = %w(guide.html) self.force_gzip = true self.links = { home: 'http://mongoosejs.com/', @@ -17,6 +17,7 @@ class Mongoose < UrlScraper options[:container] = '#content' options[:skip] = %w( + api.html faq.html prior.html migration.html From 58a0120697a701f2cb9ca87061ec7ef6fde3b013 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 15:21:35 -0500 Subject: [PATCH 0020/2496] Update mongoose & angular versions to match reality --- lib/docs/scrapers/angular.rb | 4 ++-- lib/docs/scrapers/mongoose.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 4ec689c131..5ca1a35d50 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -59,7 +59,7 @@ def handle_response(response) end version do - self.release = '8.2.12' + self.release = '8.2.14' self.base_url = 'https://angular.io/' self.root_path = 'docs' @@ -99,7 +99,7 @@ def handle_response(response) end version '6' do - self.release = '6.0.4' + self.release = '6.1.10' self.base_url = 'https://v6.angular.io/' self.root_path = 'docs' diff --git a/lib/docs/scrapers/mongoose.rb b/lib/docs/scrapers/mongoose.rb index af7d56ffa1..d8a11156c8 100644 --- a/lib/docs/scrapers/mongoose.rb +++ b/lib/docs/scrapers/mongoose.rb @@ -2,7 +2,7 @@ module Docs class Mongoose < UrlScraper self.name = 'Mongoose' self.type = 'simple' - self.release = '5.7.7' + self.release = '5.8.5' self.base_url = 'https://mongoosejs.com/docs/' self.root_path = 'index.html' self.initial_paths = %w(guide.html) From d475f24c357cac44f5a07250a5140f00fb2a761e Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 8 Jan 2020 18:39:03 -0500 Subject: [PATCH 0021/2496] Add documentation on building FileScraper docs --- docs/file-scrapers.md | 71 +++++++++++++++++++++++++++++++++ lib/docs/scrapers/dart.rb | 2 - lib/docs/scrapers/salt_stack.rb | 8 ---- 3 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 docs/file-scrapers.md diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md new file mode 100644 index 0000000000..14d23da430 --- /dev/null +++ b/docs/file-scrapers.md @@ -0,0 +1,71 @@ +# File Scraper Reference + +This lists the docs that use `FileScraper` and instructions for building some of them. + +If you open a PR to update one of these docs, please add/fix the instructions. + +## C + +Download the HTML book from https://en.cppreference.com/w/Cppreference:Archives +and copy `reference/en/c` from the ZIP file into `/path/to/devdocs/docs/c`. + +## C++ + +Download the HTML book from https://en.cppreference.com/w/Cppreference:Archives +and copy `reference/en/cpp` from the ZIP file into `/path/to/devdocs/docs/cpp`. + +## Dart + +Click the “API docs” link under the “Stable channel” header on +https://www.dartlang.org/tools/sdk/archive. Rename the expanded ZIP to `dart~2` +and put it in `/path/to/devdocs/docs/` + +## Django + +Go to https://docs.djangoproject.com/, select the version from the +bubble in the bottom-right corner, then download the HTML version from the sidebar. + +## Erlang + +Go to https://www.erlang.org/downloads and download the HTML documentation file. + +## Gnu + +### GCC +### GNU Fortran + +## NumPy + +## OpenJDK + +## Perl + +## PHP + +## Python + +## RDoc + +### Nokogiri +### Ruby / Minitest +### Ruby on Rails +### Ruby + +## Salt Stack + +Replace `2019.2` with the correct tag. + +```sh +git clone https://github.com/saltstack/salt.git --branch 2019.2 --depth 1 +cd salt/doc +pip install sphinx +make html +``` + +The generated html is in `salt/doc/_build/html`. Copy it to + +## Scala + +See `lib/docs/scrapers/scala.rb` + +## SQLite diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index a3dc05c1bc..e3b8c28998 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -20,8 +20,6 @@ class Dart < FileScraper Licensed under the Creative Commons Attribution-ShareAlike License v4.0. HTML - # Download the documentation from https://www.dartlang.org/tools/sdk/archive - version '2' do self.release = '2.5.0' self.base_url = "https://api.dart.dev/stable/#{release}/" diff --git a/lib/docs/scrapers/salt_stack.rb b/lib/docs/scrapers/salt_stack.rb index 3af77753cb..01a23c603b 100644 --- a/lib/docs/scrapers/salt_stack.rb +++ b/lib/docs/scrapers/salt_stack.rb @@ -1,13 +1,5 @@ module Docs # The official documentation website is heavily rate-limited - # - # The documentation can be generated like this (replace 2019.2 with the correct tag): - # $ git clone https://github.com/saltstack/salt.git --branch 2019.2 --depth 1 - # $ cd salt/doc - # $ pip install sphinx - # $ make html - # - # The generated html can be found in salt/doc/_build/html class SaltStack < FileScraper self.type = 'simple' self.slug = 'saltstack' From dca7ffd17b6a789c2e2a84e7bc854e3548e6d437 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 9 Jan 2020 12:15:25 -0500 Subject: [PATCH 0022/2496] Update versions & dates for Python, extract info for downloading --- .../templates/pages/about_tmpl.coffee | 2 +- docs/file-scrapers.md | 18 ++++++++++++++++++ lib/docs/scrapers/python.rb | 16 +++++----------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 7b7272ccda..7854d5ed9b 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -613,7 +613,7 @@ credits = [ 'https://raw.githubusercontent.com/pygame/pygame/master/LICENSE' ], [ 'Python', - '2001-2019 Python Software Foundation
Python is a trademark of the Python Software Foundation.', + '2001-2020 Python Software Foundation
Python is a trademark of the Python Software Foundation.', 'PSFL', 'https://docs.python.org/3/license.html' ], [ diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 14d23da430..1895f2769c 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -44,6 +44,24 @@ Go to https://www.erlang.org/downloads and download the HTML documentation file. ## Python +### Versions 3.6+ + +```sh +mkdir docs/python~$VERSION +cd docs/python~$VERSION +curl -L https://docs.python.org/$VERSION/archives/python-$RELEASE-docs-html.tar.bz2 | \ +tar xj --strip-components=1 +``` + +### < 3.6 + +```sh +mkdir docs/python~$VERSION +cd docs/python~$VERSION +curl -L https://docs.python.org/ftp/python/doc/$RELEASE/python-$RELEASE-docs-html.tar.bz2 | \ +tar xj --strip-components=1 +``` + ## RDoc ### Nokogiri diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index a9c99cd7c9..89f1c3c091 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -19,32 +19,26 @@ class Python < FileScraper library/sunau.html) options[:attribution] = <<-HTML - © 2001–2019 Python Software Foundation
+ © 2001–2020 Python Software Foundation
Licensed under the PSF License. HTML - # In order to download the documentation, run: - # $ mkdir -p docs/python~3.8 && \ - # cd docs/python~3.8 && \ - # curl -L https://docs.python.org/3.8/archives/python-3.8.0-docs-html.tar.bz2 | \ - # tar xj --strip-components=1 - version '3.8' do # docs.python.org/3.8/download.html - self.release = '3.8.0' + self.release = '3.8.1' self.base_url = 'https://docs.python.org/3.8/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.7' do # docs.python.org/3.7/download.html - self.release = '3.7.5' + self.release = '3.7.6' self.base_url = 'https://docs.python.org/3.7/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.6' do # docs.python.org/3.6/download.html - self.release = '3.6.9' + self.release = '3.6.10' self.base_url = 'https://docs.python.org/3.6/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' @@ -58,7 +52,7 @@ class Python < FileScraper end version '2.7' do # docs.python.org/2.7/download.html - self.release = '2.7.16' + self.release = '2.7.17' self.base_url = 'https://docs.python.org/2.7/' html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html' From d410cd4bef5fbdfd11a35fd5c3254b55a67a6244 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 9 Jan 2020 13:26:02 -0500 Subject: [PATCH 0023/2496] Fix Leaflet 1.5 download --- lib/docs/scrapers/leaflet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb index 3c3c89f444..ca75ea5780 100644 --- a/lib/docs/scrapers/leaflet.rb +++ b/lib/docs/scrapers/leaflet.rb @@ -26,7 +26,7 @@ class Leaflet < UrlScraper version '1.5' do self.release = '1.5.1' - self.base_url = "https://leafletjs.com/reference-#{release}.html" + self.base_url = "https://leafletjs.com/reference-1.5.0.html" end version '1.4' do From 014e29ffdfe069b3ceadc053f941f2243e2cd131 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 9 Jan 2020 14:26:17 -0500 Subject: [PATCH 0024/2496] Add instructions for downloading the SQLite docs --- docs/file-scrapers.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 1895f2769c..912517d1fa 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -87,3 +87,6 @@ The generated html is in `salt/doc/_build/html`. Copy it to See `lib/docs/scrapers/scala.rb` ## SQLite + +Download the docs from https://sqlite.org/download.html, unzip it, and rename +it to `/path/to/devdocs/docs/sqlite` From 474fcc49c60dc81b513af428abd196ed7e0c5118 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 9 Jan 2020 14:44:25 -0500 Subject: [PATCH 0025/2496] Update ESLint to 6.8.0 --- lib/docs/scrapers/eslint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/eslint.rb b/lib/docs/scrapers/eslint.rb index d7263c3ccd..561b7fc1ed 100644 --- a/lib/docs/scrapers/eslint.rb +++ b/lib/docs/scrapers/eslint.rb @@ -2,7 +2,7 @@ module Docs class Eslint < UrlScraper self.name = 'ESLint' self.type = 'simple' - self.release = '6.7.0' + self.release = '6.8.0' self.base_url = 'https://eslint.org/docs/' self.root_path = 'user-guide/getting-started' self.links = { From 90f2988ba3226396c8e5115cf8a13b953fea80cd Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 9 Jan 2020 17:18:33 -0500 Subject: [PATCH 0026/2496] Fix ansible docs --- lib/docs/filters/ansible/clean_html.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/ansible/clean_html.rb b/lib/docs/filters/ansible/clean_html.rb index 190b66382b..df4370d7a4 100644 --- a/lib/docs/filters/ansible/clean_html.rb +++ b/lib/docs/filters/ansible/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Ansible class CleanHtmlFilter < Filter def call - @doc = at_css('.document') + @doc = at_css('[itemprop=articleBody]') css('font').each do |node| node.before(node.children).remove From b63a796112f51dff2f02b1154293b12ea1a2e455 Mon Sep 17 00:00:00 2001 From: Lukas Geiger Date: Fri, 10 Jan 2020 02:16:41 +0100 Subject: [PATCH 0027/2496] :arrow_up: TensorFlow 2.1 --- lib/docs/scrapers/tensorflow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/tensorflow.rb b/lib/docs/scrapers/tensorflow.rb index d352ccd4f5..008afc5440 100644 --- a/lib/docs/scrapers/tensorflow.rb +++ b/lib/docs/scrapers/tensorflow.rb @@ -4,7 +4,7 @@ module Docs class Tensorflow < UrlScraper self.name = 'TensorFlow' self.type = 'tensorflow' - self.release = '2.0' + self.release = '2.1' self.root_path = 'index.html' self.links = { home: 'https://www.tensorflow.org/', From f42afb6f30f11888896eb7d80eff1736dcae6174 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sat, 11 Jan 2020 16:32:17 -0500 Subject: [PATCH 0028/2496] Fix #1151 by catching errors thrown when calling canvas.toDataURL --- assets/javascripts/lib/favicon.coffee | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/lib/favicon.coffee b/assets/javascripts/lib/favicon.coffee index 696bd784e2..428eae453a 100644 --- a/assets/javascripts/lib/favicon.coffee +++ b/assets/javascripts/lib/favicon.coffee @@ -59,10 +59,14 @@ withImage = (url, action) -> ctx.drawImage(docImg, sourceX, sourceY, sourceSize, sourceSize, destinationCoords, destinationCoords, destinationSize, destinationSize) - urlCache[doc.slug] = canvas.toDataURL() - favicon.href = urlCache[doc.slug] - - currentSlug = doc.slug + try + urlCache[doc.slug] = canvas.toDataURL() + favicon.href = urlCache[doc.slug] + + currentSlug = doc.slug + catch error + Raven.captureException error, { level: 'info' } + @resetFavicon() ) ) From e647b3a5ff9d56527a5070fe029d396e68f1c7b8 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sun, 12 Jan 2020 22:49:33 -0500 Subject: [PATCH 0029/2496] Update typescript to 3.7.4 --- lib/docs/filters/typescript/entries.rb | 2 +- lib/docs/scrapers/typescript.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/docs/filters/typescript/entries.rb b/lib/docs/filters/typescript/entries.rb index 43d577b0df..7544abd145 100644 --- a/lib/docs/filters/typescript/entries.rb +++ b/lib/docs/filters/typescript/entries.rb @@ -15,7 +15,7 @@ def get_type type end - SKIP_ENTRIES = ['Introduction', 'A note', 'A Note', ', and', 'Techniques', ' Concepts', 'Hello World', 'Working with', 'Our ', 'Implementing ', 'Difference between', 'Basic', 'sample', 'Questions', 'Example', 'Export as close', 'Red Flags', 'First steps', 'Pitfalls', 'Well-known', 'Starting out', 'Comparing ', 'Do not', 'Trade-off', ' vs', 'Overview', 'Related'] + SKIP_ENTRIES = ['Introduction', 'A note', 'A Note', ', and', 'Techniques', ' Concepts', 'Hello World', 'Working with', 'Our ', 'Implementing ', 'Difference between', 'Basic', 'sample', 'Questions', 'Example', 'Export as close', 'Red Flags', 'First steps', 'Pitfalls', 'Well-known', 'Starting out', 'Comparing ', 'Do not', 'Trade-off', ' vs', 'Overview', 'Related', 'Table of contents'] def additional_entries return [] unless slug.start_with?('handbook') diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb index 828dd7339f..0af7841aa4 100644 --- a/lib/docs/scrapers/typescript.rb +++ b/lib/docs/scrapers/typescript.rb @@ -2,7 +2,7 @@ module Docs class Typescript < UrlScraper self.name = 'TypeScript' self.type = 'simple' - self.release = '3.7.2' + self.release = '3.7.4' self.base_url = 'https://www.typescriptlang.org/docs/' self.root_path = 'tutorial.html' self.links = { @@ -13,7 +13,7 @@ class Typescript < UrlScraper html_filters.push 'typescript/entries', 'typescript/clean_html' options[:container] = '#doc-content' - options[:skip] = %w(home.html) + options[:skip] = %w(home.html handbook/release-notes/overview.html) options[:skip_link] = ->(node) { node.parent.parent['class'] == 'dropdown-menu' } options[:fix_urls] = ->(url) { url.sub!(/(\w+)\.md/) { "#{$1.downcase}.html" } @@ -30,5 +30,3 @@ def get_latest_version(opts) end end end - - From 3e04069b69f411e001da63016b33f18bb114b3ba Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 12:15:00 -0500 Subject: [PATCH 0030/2496] Add docs for using the Gnuplot scraper --- docs/file-scrapers.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 912517d1fa..bf047688b8 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -34,6 +34,26 @@ Go to https://www.erlang.org/downloads and download the HTML documentation file. ### GCC ### GNU Fortran +## Gnuplot + +NOTE: these steps may not work on macOS. + +Find the most recent tagged version on https://sourceforge.net/p/gnuplot/gnuplot-main/ref/master/tags/ +and change `1.2.3` below to that tag when running the clone. + +```sh +DEVDOCS_ROOT=/path/to/devdocs +mkdir gnuplot-src gnuplot-conf $DEVDOCS_ROOT/docs/gnuplot +git clone -b $RELEASE --depth 1 https://git.code.sf.net/p/gnuplot/gnuplot-main ./gnuplot-src +cd gnuplot-src/ +./prepare +cd ../gnuplot-conf +../gnuplot-src/configure +cd docs/ +make nofigures.tex +latex2html -html 5.0,math -split 4 -link 8 -long_titles 5 -dir $DEVDOCS_ROOT/docs/gnuplot -ascii_mode -no_auto_link nofigures.tex +``` + ## NumPy ## OpenJDK From ba5bdc29330bf814053c6a8a53aff485726571bb Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 12:29:19 -0500 Subject: [PATCH 0031/2496] Update news.json --- assets/javascripts/news.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index df5a3d5bde..e69e38d24a 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2019-01-13", + "New documentation:
Gnuplot" + ], [ "2019-10-26", "New documentation: Sequelize" From af8576fe0a511de2a7b105948ecf1aab196948ed Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 12:30:54 -0500 Subject: [PATCH 0032/2496] =?UTF-8?q?It=E2=80=99s=202020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- COPYRIGHT | 4 ++-- README.md | 2 +- assets/javascripts/lib/license.coffee | 2 +- assets/javascripts/news.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index c71d2d7abf..617881738c 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,4 +1,4 @@ -Copyright 2013-2019 Thibaut Courouble and other contributors +Copyright 2013-2020 Thibaut Courouble and other contributors This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -10,4 +10,4 @@ as may be necessary to comply with the notice/attribution requirements. We also wish that any documentation file generated using this software be attributed to DevDocs. Let's be fair to all contributors by giving -credit where credit's due. Thanks. \ No newline at end of file +credit where credit's due. Thanks. diff --git a/README.md b/README.md index e93b597c53..63d31ddcea 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ Made something cool? Feel free to open a PR to add a new row to this table! ## Copyright / License -Copyright 2013-2019 Thibaut Courouble and [other contributors](https://github.com/freeCodeCamp/devdocs/graphs/contributors) +Copyright 2013-2020 Thibaut Courouble and [other contributors](https://github.com/freeCodeCamp/devdocs/graphs/contributors) This software is licensed under the terms of the Mozilla Public License v2.0. See the [COPYRIGHT](./COPYRIGHT) and [LICENSE](./LICENSE) files. diff --git a/assets/javascripts/lib/license.coffee b/assets/javascripts/lib/license.coffee index 7f7ca938e7..9580538cf0 100644 --- a/assets/javascripts/lib/license.coffee +++ b/assets/javascripts/lib/license.coffee @@ -1,5 +1,5 @@ ### - * Copyright 2013-2019 Thibaut Courouble and other contributors + * Copyright 2013-2020 Thibaut Courouble and other contributors * * This source code is licensed under the terms of the Mozilla * Public License, v. 2.0, a copy of which may be obtained at: diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index e69e38d24a..693ccec113 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,6 +1,6 @@ [ [ - "2019-01-13", + "2020-01-13", "New documentation: Gnuplot" ], [ From 6d8a44369c32bd999647ac1f4f4c46c67a10e6c7 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 16:17:23 -0500 Subject: [PATCH 0033/2496] Use dark-mode native UI elements in dark mode where supported --- assets/stylesheets/global/_base.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/stylesheets/global/_base.scss b/assets/stylesheets/global/_base.scss index b81d5a9369..ec7be4f2ab 100644 --- a/assets/stylesheets/global/_base.scss +++ b/assets/stylesheets/global/_base.scss @@ -10,6 +10,13 @@ html { @import 'global/print'; } +html._theme-default { + color-scheme: light only; +} +html._theme-dark { + color-scheme: dark only; +} + body { height: 100%; margin: 0; From e8b13596651100ebf5c016fd95687aa90d7fe0dc Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 16:20:11 -0500 Subject: [PATCH 0034/2496] Switch to radio buttons for theme picker, only allow auto setting where supported --- assets/javascripts/app/settings.coffee | 14 +++++++++++-- .../templates/pages/settings_tmpl.coffee | 20 ++++++++++++------- .../views/content/settings_page.coffee | 1 + assets/stylesheets/components/_settings.scss | 10 ++++++++-- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index bfe8ae73ba..99fd5d13d0 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -32,10 +32,16 @@ class app.Settings manualUpdate: false schema: 1 analyticsConsent: false + theme: 'auto' constructor: -> @store = new CookiesStore @cache = {} + @autoSupported = window.matchMedia('(prefers-color-scheme)').media != 'not all' + if @autoSupported + @darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)') + @darkModeQuery.onchange = -> @setTheme(@get('theme')) + get: (key) -> return @cache[key] if @cache.hasOwnProperty(key) @@ -124,11 +130,15 @@ class app.Settings return setTheme: (theme) -> - if not theme - theme = if window.matchMedia('(prefers-color-scheme: dark)').matches then 'dark' else 'default' + if theme is 'auto' + theme = if @darkModeQuery.matches then 'dark' else 'default' classList = document.documentElement.classList classList.remove('_theme-default', '_theme-dark') classList.add('_theme-' + theme) + @updateColorMeta() + return + + updateColorMeta: -> color = getComputedStyle(document.documentElement).getPropertyValue('--headerBackground').trim() $('meta[name=theme-color]').setAttribute('content', color) return diff --git a/assets/javascripts/templates/pages/settings_tmpl.coffee b/assets/javascripts/templates/pages/settings_tmpl.coffee index 07bfc65a36..6d22706901 100644 --- a/assets/javascripts/templates/pages/settings_tmpl.coffee +++ b/assets/javascripts/templates/pages/settings_tmpl.coffee @@ -1,16 +1,22 @@ +themeOption = ({ label, value }, settings) -> """ + +""" + app.templates.settingsPage = (settings) -> """

Preferences

Theme:

- + #{if settings.autoSupported + themeOption label: "Automatic Matches system setting", value: "auto", settings + else + ""} + #{themeOption label: "Light", value: "default", settings} + #{themeOption label: "Dark", value: "dark", settings}
diff --git a/assets/javascripts/views/content/settings_page.coffee b/assets/javascripts/views/content/settings_page.coffee index fd7474384d..2db7c6bc11 100644 --- a/assets/javascripts/views/content/settings_page.coffee +++ b/assets/javascripts/views/content/settings_page.coffee @@ -16,6 +16,7 @@ class app.views.SettingsPage extends app.View settings.arrowScroll = app.settings.get('arrowScroll') settings.autoInstall = app.settings.get('autoInstall') settings.analyticsConsent = app.settings.get('analyticsConsent') + settings.autoSupported = app.settings.autoSupported settings[layout] = app.settings.hasLayout(layout) for layout in app.settings.LAYOUTS settings diff --git a/assets/stylesheets/components/_settings.scss b/assets/stylesheets/components/_settings.scss index 86bbf005d9..807f550063 100644 --- a/assets/stylesheets/components/_settings.scss +++ b/assets/stylesheets/components/_settings.scss @@ -48,15 +48,21 @@ } ._settings-label { - margin: 0 0 .375rem; + &:not(._theme-label) { + margin: 0 0 .375rem; + } > small { display: block; color: var(--textColorLight); margin-left: 1.75rem; } + &._theme-label > small { + display: inline-block; + margin-left: 0.75rem; + } - input[type=checkbox] { + input[type=checkbox], input[type=radio] { vertical-align: top; margin: .25rem .375rem; } From cc406a8ea9fd27c49ae3646f1165134ace016b7b Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 16:26:26 -0500 Subject: [PATCH 0035/2496] Fix watching for theme change --- assets/javascripts/app/settings.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index 99fd5d13d0..90e1e951b9 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -40,7 +40,7 @@ class app.Settings @autoSupported = window.matchMedia('(prefers-color-scheme)').media != 'not all' if @autoSupported @darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)') - @darkModeQuery.onchange = -> @setTheme(@get('theme')) + @darkModeQuery.addListener => @setTheme(@get('theme')) get: (key) -> From 8de9e430004ccc43567312d04170f2245a651060 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 18:42:44 -0500 Subject: [PATCH 0036/2496] Add news item for automatic theme --- assets/javascripts/news.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 693ccec113..6f3f3b643e 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2020-01-13", + "New “Automatic” theme: match your browser or system dark mode setting. Enable it in preferences." + ], [ "2020-01-13", "New documentation: Gnuplot" From 6832c1ccf68425684847435fbf5545e40829b264 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 19:24:06 -0500 Subject: [PATCH 0037/2496] Fix error when no theme is set and the auto theme is not supported --- assets/javascripts/app/settings.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index eb1c928948..d3fc93e1a2 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -46,6 +46,10 @@ class app.Settings get: (key) -> return @cache[key] if @cache.hasOwnProperty(key) @cache[key] = @store.get(key) ? @constructor.defaults[key] + if key == 'theme' and @cache[key] == 'auto' and !@darkModeQuery + @cache[key] = 'default' + else + @cache[key] set: (key, value) -> @store.set(key, value) From 2beb46db422b3b82c47bd3a2ac19c82ba47590a4 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 22:30:39 -0500 Subject: [PATCH 0038/2496] Add mobile override mode Fixes #1157 --- assets/javascripts/views/layout/mobile.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/views/layout/mobile.coffee b/assets/javascripts/views/layout/mobile.coffee index cb87a323ad..77c5ee7357 100644 --- a/assets/javascripts/views/layout/mobile.coffee +++ b/assets/javascripts/views/layout/mobile.coffee @@ -14,6 +14,8 @@ class app.views.Mobile extends app.View after: 'afterRoute' @detect: -> + if Cookies.get('override-mobile-detect')? + return JSON.parse Cookies.get('override-mobile-detect') try (window.matchMedia('(max-width: 480px)').matches) or (window.matchMedia('(max-width: 767px)').matches) or From 712ff2ae3d0bce7d522272715cd99f17e2d755c7 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 13 Jan 2020 22:30:59 -0500 Subject: [PATCH 0039/2496] =?UTF-8?q?Set=20the=20height=20of=20the=20?= =?UTF-8?q?=E2=80=9Cstar=20the=20DevDocs=20repo=E2=80=9D=20badge=20on=20th?= =?UTF-8?q?e=20homepage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/javascripts/templates/pages/root_tmpl.coffee.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/templates/pages/root_tmpl.coffee.erb b/assets/javascripts/templates/pages/root_tmpl.coffee.erb index 714e0e205f..e4a7e593e0 100644 --- a/assets/javascripts/templates/pages/root_tmpl.coffee.erb +++ b/assets/javascripts/templates/pages/root_tmpl.coffee.erb @@ -39,7 +39,7 @@ app.templates.intro = """
  • DevDocs works offline, on mobile, and can be installed on Chrome.
  • For the latest news, follow @DevDocs.
  • DevDocs is free and open source. - +
  • And if you're new to coding, check out freeCodeCamp's open source curriculum.

    Happy coding! From 5adb7a7b32aa45551919d9d02177c4f3762a3fae Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 14 Jan 2020 12:16:06 -0500 Subject: [PATCH 0040/2496] [gnuplot] Dedent code blocks --- lib/docs/filters/gnuplot/clean_html.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/docs/filters/gnuplot/clean_html.rb b/lib/docs/filters/gnuplot/clean_html.rb index e612982b35..c14cab59d9 100644 --- a/lib/docs/filters/gnuplot/clean_html.rb +++ b/lib/docs/filters/gnuplot/clean_html.rb @@ -36,6 +36,10 @@ def call node.remove if node.content.strip.empty? end + css('pre').each do |node| + node.content = dedent(node.content) + end + # links generated are of the form (NB: some might have been removed): # {text} (p. [*]) # transform to Date: Tue, 14 Jan 2020 12:22:40 -0500 Subject: [PATCH 0041/2496] [gnuplot] remove brs to eliminate extra spacing --- lib/docs/filters/gnuplot/clean_html.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/docs/filters/gnuplot/clean_html.rb b/lib/docs/filters/gnuplot/clean_html.rb index c14cab59d9..92b20597a3 100644 --- a/lib/docs/filters/gnuplot/clean_html.rb +++ b/lib/docs/filters/gnuplot/clean_html.rb @@ -28,6 +28,7 @@ def call css('.navigation').remove css('#CHILD_LINKS, ul.ChildLinks').remove css('hr').remove + css('br').remove # Anchors that use only names are some numerical IDs that latex2html distributes through the document css('a[name]:not([href]):not([id])').remove From 370261bb1f241c77c20fff9dcc0b998b12d582c6 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 14 Jan 2020 12:22:49 -0500 Subject: [PATCH 0042/2496] Find steps that work on macOS --- docs/file-scrapers.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index bf047688b8..8bbc4afe08 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -36,24 +36,43 @@ Go to https://www.erlang.org/downloads and download the HTML documentation file. ## Gnuplot -NOTE: these steps may not work on macOS. - -Find the most recent tagged version on https://sourceforge.net/p/gnuplot/gnuplot-main/ref/master/tags/ -and change `1.2.3` below to that tag when running the clone. +The most recent release can be found near the bottom of +https://sourceforge.net/p/gnuplot/gnuplot-main/ref/master/tags/ ```sh DEVDOCS_ROOT=/path/to/devdocs -mkdir gnuplot-src gnuplot-conf $DEVDOCS_ROOT/docs/gnuplot +mkdir gnuplot-src $DEVDOCS_ROOT/docs/gnuplot git clone -b $RELEASE --depth 1 https://git.code.sf.net/p/gnuplot/gnuplot-main ./gnuplot-src cd gnuplot-src/ ./prepare -cd ../gnuplot-conf -../gnuplot-src/configure +./configure cd docs/ make nofigures.tex latex2html -html 5.0,math -split 4 -link 8 -long_titles 5 -dir $DEVDOCS_ROOT/docs/gnuplot -ascii_mode -no_auto_link nofigures.tex ``` +To install `latex2html` on macOS: `brew install basictex latex2html`, then edit +`/usr/local/Cellar/latex2html/2019.2/l2hconf.pm` to include the path to LaTeX: + +

    + +On line 21 (approximately): + +``` +# Give the paths to latex and dvips on your system: +# +$LATEX = '/Library/TeX/texbin/latex'; # LaTeX +$PDFLATEX = '/Library/TeX/texbin/pdflatex'; # pdfLaTeX +$LUALATEX = '/Library/TeX/texbin/lualatex'; # LuaLaTeX +$DVILUALATEX = '/Library/TeX/texbin/dvilualatex'; # dviLuaLaTeX +$DVIPS = '/Library/TeX/texbin/dvips'; # dvips +$DVIPNG = ''; # dvipng +$PDFTOCAIRO = '/usr/local/bin/pdf2svg'; # pdf to svg converter +$PDFCROP = ''; # pdfcrop +$GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript +``` +
    + ## NumPy ## OpenJDK From d6c9d2b41fad2b7f31182b47bac4698f32df2243 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 14 Jan 2020 12:22:55 -0500 Subject: [PATCH 0043/2496] Update gnuplot to 5.2.8 --- lib/docs/scrapers/gnuplot.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index dc55edb7fb..0682ade4b3 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -1,13 +1,12 @@ module Docs class Gnuplot < FileScraper - self.name = 'Gnuplot' - self.slug = 'gnuplot' self.type = 'gnuplot' + self.release = '5.2.8' self.links = { home: 'http://gnuplot.sourceforge.net/' } - self.root_path = 'index.html' + self.root_path = 'nofigures.html' html_filters.push 'gnuplot/entries', 'gnuplot/clean_html' @@ -30,6 +29,7 @@ class Gnuplot < FileScraper Commands.html Contents.html Bugs.html + Index.html ) options[:attribution] = <<-HTML From 13d33f106cdf8199b6c21622df379c5963fb72c4 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 14 Jan 2020 23:02:52 +0100 Subject: [PATCH 0044/2496] bootstrap: update to 3.4.1 and 4.4.1 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/bootstrap.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 18ceda8dd6..0e359e162a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -123,7 +123,7 @@ credits = [ 'https://raw.githubusercontent.com/petkaantonov/bluebird/master/LICENSE' ], [ 'Bootstrap', - '2011-2019 Twitter, Inc.
    2011-2019 The Bootstrap Authors', + '2011-2020 Twitter, Inc.
    2011-2020 The Bootstrap Authors', 'CC BY', 'https://creativecommons.org/licenses/by/3.0/' ], [ diff --git a/lib/docs/scrapers/bootstrap.rb b/lib/docs/scrapers/bootstrap.rb index 32de92d8f3..06ba3baec6 100644 --- a/lib/docs/scrapers/bootstrap.rb +++ b/lib/docs/scrapers/bootstrap.rb @@ -10,15 +10,15 @@ class Bootstrap < UrlScraper # https://github.com/twbs/bootstrap/blob/master/LICENSE options[:attribution] = <<-HTML - © 2011–2019 Twitter, Inc.
    - © 2011–2019 The Bootstrap Authors
    + © 2011–2020 Twitter, Inc.
    + © 2011–2020 The Bootstrap Authors
    Code licensed under the MIT License.
    Documentation licensed under the Creative Commons Attribution License v3.0. HTML version '4' do - self.release = '4.3.1' - self.base_url = 'https://getbootstrap.com/docs/4.3/' + self.release = '4.4.1' + self.base_url = 'https://getbootstrap.com/docs/4.4/' self.root_path = 'getting-started/introduction/' html_filters.push 'bootstrap/entries_v4', 'bootstrap/clean_html_v4' @@ -27,8 +27,8 @@ class Bootstrap < UrlScraper end version '3' do - self.release = '3.3.7' - self.base_url = 'https://getbootstrap.com/docs/3.3/' + self.release = '3.4.1' + self.base_url = 'https://getbootstrap.com/docs/3.4/' self.root_path = 'getting-started/' html_filters.push 'bootstrap/entries_v3', 'bootstrap/clean_html_v3' From 761752d5ad208cda30685aa799fe19fddc0aa4d0 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 14 Jan 2020 23:45:44 +0100 Subject: [PATCH 0045/2496] react: update to 16.12.0 --- lib/docs/scrapers/react.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb index baa5c6eec7..e293cf11d3 100644 --- a/lib/docs/scrapers/react.rb +++ b/lib/docs/scrapers/react.rb @@ -2,7 +2,7 @@ module Docs class React < UrlScraper self.name = 'React' self.type = 'simple' - self.release = '16.10.2' + self.release = '16.12.0' self.base_url = 'https://reactjs.org/docs/' self.root_path = 'hello-world.html' self.links = { From 3bc86573958392216b1a87dca9e278630345fea9 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 14 Jan 2020 23:54:42 +0100 Subject: [PATCH 0046/2496] git: update to 2.25.0 --- lib/docs/scrapers/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/git.rb b/lib/docs/scrapers/git.rb index f40fefb309..58d158af63 100644 --- a/lib/docs/scrapers/git.rb +++ b/lib/docs/scrapers/git.rb @@ -1,7 +1,7 @@ module Docs class Git < UrlScraper self.type = 'git' - self.release = '2.23.0' + self.release = '2.25.0' self.base_url = 'https://git-scm.com/docs' self.initial_paths = %w(/git.html) self.links = { From 8c2f6e5683c78375b9113bf1bb6668816eb76ec2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 14 Jan 2020 23:58:50 +0100 Subject: [PATCH 0047/2496] flow: update to 0.116.0 --- lib/docs/scrapers/flow.rb | 2 +- public/icons/docs/flow/SOURCE | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 public/icons/docs/flow/SOURCE diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb index b3b5a02f2a..8853c954ad 100644 --- a/lib/docs/scrapers/flow.rb +++ b/lib/docs/scrapers/flow.rb @@ -1,7 +1,7 @@ module Docs class Flow < UrlScraper self.type = 'simple' - self.release = '0.85.0' + self.release = '0.116.0' self.base_url = 'https://flow.org/en/docs/' self.links = { home: 'https://flow.org/', diff --git a/public/icons/docs/flow/SOURCE b/public/icons/docs/flow/SOURCE new file mode 100644 index 0000000000..77db35b42a --- /dev/null +++ b/public/icons/docs/flow/SOURCE @@ -0,0 +1,2 @@ +https://github.com/facebook/flow/blob/master/website/favicon.svg +https://github.com/facebook/flow/blob/master/website/static/favicon.png From bd1644a058e3ee67d83ac97825e9bcf4b0d69206 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 22 Jan 2020 21:30:23 -0500 Subject: [PATCH 0048/2496] Improve tensorflow docs --- lib/docs/filters/tensorflow/clean_html.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/tensorflow/clean_html.rb b/lib/docs/filters/tensorflow/clean_html.rb index cdacee5c8f..7eeab03ef4 100644 --- a/lib/docs/filters/tensorflow/clean_html.rb +++ b/lib/docs/filters/tensorflow/clean_html.rb @@ -4,7 +4,7 @@ class CleanHtmlFilter < Filter def call @doc = at_css('.devsite-article-inner') - css('hr', '.devsite-nav', '.devsite-content-footer', '.devsite-article-body > br', '.devsite-article-meta', 'devsite-nav-buttons').remove + css('hr', '.devsite-nav', '.devsite-content-footer', '.devsite-article-body > br', '.devsite-article-meta', 'devsite-nav-buttons', '.devsite-banner', '.tfo-api img').remove css('aside.note').each do |node| node.name = 'blockquote' From 1eb151e787896e03d1ab0f186f93c99de4e42203 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 28 Jan 2020 10:59:28 +0000 Subject: [PATCH 0049/2496] Update Django documentation (3.0.2) --- lib/docs/scrapers/django.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/django.rb b/lib/docs/scrapers/django.rb index f4996b228d..c6f3e042de 100644 --- a/lib/docs/scrapers/django.rb +++ b/lib/docs/scrapers/django.rb @@ -34,13 +34,18 @@ class Django < FileScraper Licensed under the BSD License. HTML + version '3.0' do + self.release = '3.0.2' + self.base_url = 'https://docs.djangoproject.com/en/3.0/' + end + version '2.2' do - self.release = '2.2.4' + self.release = '2.2.9' self.base_url = 'https://docs.djangoproject.com/en/2.2/' end version '2.1' do - self.release = '2.1.11' + self.release = '2.1.15' self.base_url = 'https://docs.djangoproject.com/en/2.1/' end @@ -50,7 +55,7 @@ class Django < FileScraper end version '1.11' do - self.release = '1.11.23' + self.release = '1.11.27' self.base_url = 'https://docs.djangoproject.com/en/1.11/' end From 18958f4cd271b44eaf3063a8f4c431e5d6cee392 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 11:49:15 -0500 Subject: [PATCH 0050/2496] Update Flow docs clean up homepage, 0.117 --- lib/docs/filters/flow/clean_html.rb | 5 ++++- lib/docs/scrapers/flow.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/flow/clean_html.rb b/lib/docs/filters/flow/clean_html.rb index 50269f8a0e..8d5a152f84 100644 --- a/lib/docs/filters/flow/clean_html.rb +++ b/lib/docs/filters/flow/clean_html.rb @@ -14,7 +14,10 @@ def root end css('a.card').each do |node| - node.at_css('.text-primary').replace %(
    Read more) + title = node.at_css('.card-title') + title.inner_html = %(#{title.inner_html}) + node.at_css('.text-primary').remove + node.css('[class]').each { |node| node.delete 'class' } node.before(node.children).remove end end diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb index 8853c954ad..ceb95fc9b3 100644 --- a/lib/docs/scrapers/flow.rb +++ b/lib/docs/scrapers/flow.rb @@ -1,7 +1,7 @@ module Docs class Flow < UrlScraper self.type = 'simple' - self.release = '0.116.0' + self.release = '0.117.0' self.base_url = 'https://flow.org/en/docs/' self.links = { home: 'https://flow.org/', From 7d04a3080d30fadbb63806f793de9e92c7b14d15 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 15:41:43 -0500 Subject: [PATCH 0051/2496] Update Prism to 1.19, add shellsession language --- assets/javascripts/vendor/prism.js | 2291 +++++++++++++++------------- 1 file changed, 1220 insertions(+), 1071 deletions(-) diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js index a01a207c53..86fbb0743b 100644 --- a/assets/javascripts/vendor/prism.js +++ b/assets/javascripts/vendor/prism.js @@ -1,11 +1,11 @@ -/* PrismJS 1.17.1 -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+c+bash+cpp+coffeescript+ruby+d+dart+markup-templating+elixir+erlang+go+groovy+java+php+json+julia+kotlin+crystal+lua+django+matlab+typescript+nginx+nim+perl+sql+scss+python+jsx+rust+yaml */ +/* PrismJS 1.19.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+coffeescript+crystal+d+dart+django+elixir+erlang+go+groovy+java+json+julia+kotlin+lua+markup-templating+matlab+nginx+nim+perl+php+python+jsx+ruby+rust+scss+shell-session+sql+typescript+yaml */ var _self = (typeof window !== 'undefined') ? window // if in browser : ( (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) - ? self // if in worker - : {} // if in node js + ? self // if in worker + : {} // if in node js ); /** @@ -17,529 +17,599 @@ var _self = (typeof window !== 'undefined') var Prism = (function (_self){ // Private helper vars - var lang = /\blang(?:uage)?-([\w-]+)\b/i; - var uniqueId = 0; - - var _ = { - manual: _self.Prism && _self.Prism.manual, - disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, - util: { - encode: function (tokens) { - if (tokens instanceof Token) { - return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); - } else if (Array.isArray(tokens)) { - return tokens.map(_.util.encode); - } else { - return tokens.replace(/&/g, '&').replace(/ text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } - if (strarr.length > text.length) { - // Something went terribly wrong, ABORT, ABORT! - return; - } + if (str instanceof Token) { + continue; + } - if (str instanceof Token) { - continue; + if (greedy && i != strarr.length - 1) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; } - if (greedy && i != strarr.length - 1) { - pattern.lastIndex = pos; - var match = pattern.exec(text); - if (!match) { - break; - } - - var from = match.index + (lookbehind ? match[1].length : 0), + var from = match.index + (lookbehind && match[1] ? match[1].length : 0), to = match.index + match[0].length, k = i, p = pos; - for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { - p += strarr[k].length; - // Move the index i to the element in strarr that is closest to from - if (from >= p) { - ++i; - pos = p; - } - } - - // If strarr[i] is a Token, then the match starts inside another Token, which is invalid - if (strarr[i] instanceof Token) { - continue; + for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { + p += strarr[k].length; + // Move the index i to the element in strarr that is closest to from + if (from >= p) { + ++i; + pos = p; } - - // Number of tokens to delete and replace with the new match - delNum = k - i; - str = text.slice(pos, p); - match.index -= pos; - } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str), - delNum = 1; } - if (!match) { - if (oneshot) { - break; - } - + // If strarr[i] is a Token, then the match starts inside another Token, which is invalid + if (strarr[i] instanceof Token) { continue; } - if(lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; + // Number of tokens to delete and replace with the new match + delNum = k - i; + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str), + delNum = 1; + } + + if (!match) { + if (oneshot) { + break; } - var from = match.index + lookbehindLength, + continue; + } + + if(lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, match = match[0].slice(lookbehindLength), to = from + match.length, before = str.slice(0, from), after = str.slice(to); - var args = [i, delNum]; + var args = [i, delNum]; - if (before) { - ++i; - pos += before.length; - args.push(before); - } + if (before) { + ++i; + pos += before.length; + args.push(before); + } - var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias, match, greedy); + var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias, match, greedy); - args.push(wrapped); + args.push(wrapped); - if (after) { - args.push(after); - } + if (after) { + args.push(after); + } - Array.prototype.splice.apply(strarr, args); + Array.prototype.splice.apply(strarr, args); - if (delNum != 1) - _.matchGrammar(text, strarr, grammar, i, pos, true, token); + if (delNum != 1) + _.matchGrammar(text, strarr, grammar, i, pos, true, token + ',' + j); - if (oneshot) - break; - } + if (oneshot) + break; } } - }, - - tokenize: function(text, grammar) { - var strarr = [text]; + } + }, - var rest = grammar.rest; + tokenize: function(text, grammar) { + var strarr = [text]; - if (rest) { - for (var token in rest) { - grammar[token] = rest[token]; - } + var rest = grammar.rest; - delete grammar.rest; + if (rest) { + for (var token in rest) { + grammar[token] = rest[token]; } - _.matchGrammar(text, strarr, grammar, 0, 0, false); - - return strarr; - }, - - hooks: { - all: {}, + delete grammar.rest; + } - add: function (name, callback) { - var hooks = _.hooks.all; + _.matchGrammar(text, strarr, grammar, 0, 0, false); - hooks[name] = hooks[name] || []; + return strarr; + }, - hooks[name].push(callback); - }, + hooks: { + all: {}, - run: function (name, env) { - var callbacks = _.hooks.all[name]; + add: function (name, callback) { + var hooks = _.hooks.all; - if (!callbacks || !callbacks.length) { - return; - } + hooks[name] = hooks[name] || []; - for (var i=0, callback; callback = callbacks[i++];) { - callback(env); - } - } + hooks[name].push(callback); }, - Token: Token - }; - - _self.Prism = _; + run: function (name, env) { + var callbacks = _.hooks.all[name]; - function Token(type, content, alias, matchedStr, greedy) { - this.type = type; - this.content = content; - this.alias = alias; - // Copy of the full string this token was created from - this.length = (matchedStr || "").length|0; - this.greedy = !!greedy; - } + if (!callbacks || !callbacks.length) { + return; + } - Token.stringify = function(o, language) { - if (typeof o == 'string') { - return o; + for (var i=0, callback; callback = callbacks[i++];) { + callback(env); + } } + }, - if (Array.isArray(o)) { - return o.map(function(element) { - return Token.stringify(element, language); - }).join(''); - } + Token: Token +}; - var env = { - type: o.type, - content: Token.stringify(o.content, language), - tag: 'span', - classes: ['token', o.type], - attributes: {}, - language: language - }; +_self.Prism = _; - if (o.alias) { - var aliases = Array.isArray(o.alias) ? o.alias : [o.alias]; - Array.prototype.push.apply(env.classes, aliases); - } +function Token(type, content, alias, matchedStr, greedy) { + this.type = type; + this.content = content; + this.alias = alias; + // Copy of the full string this token was created from + this.length = (matchedStr || '').length|0; + this.greedy = !!greedy; +} - _.hooks.run('wrap', env); +Token.stringify = function(o, language) { + if (typeof o == 'string') { + return o; + } - var attributes = Object.keys(env.attributes).map(function(name) { - return name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"'; - }).join(' '); + if (Array.isArray(o)) { + return o.map(function(element) { + return Token.stringify(element, language); + }).join(''); + } - return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + (attributes ? ' ' + attributes : '') + '>' + env.content + ''; + var env = { + type: o.type, + content: Token.stringify(o.content, language), + tag: 'span', + classes: ['token', o.type], + attributes: {}, + language: language }; - if (!_self.document) { - if (!_self.addEventListener) { - // in Node.js - return _; - } + if (o.alias) { + var aliases = Array.isArray(o.alias) ? o.alias : [o.alias]; + Array.prototype.push.apply(env.classes, aliases); + } - if (!_.disableWorkerMessageHandler) { - // In worker - _self.addEventListener('message', function (evt) { - var message = JSON.parse(evt.data), - lang = message.language, - code = message.code, - immediateClose = message.immediateClose; + _.hooks.run('wrap', env); - _self.postMessage(_.highlight(code, _.languages[lang], lang)); - if (immediateClose) { - _self.close(); - } - }, false); - } + var attributes = Object.keys(env.attributes).map(function(name) { + return name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"'; + }).join(' '); + return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + (attributes ? ' ' + attributes : '') + '>' + env.content + ''; +}; + +if (!_self.document) { + if (!_self.addEventListener) { + // in Node.js return _; } + if (!_.disableWorkerMessageHandler) { + // In worker + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), + lang = message.language, + code = message.code, + immediateClose = message.immediateClose; + + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + + return _; +} + //Get current script and highlight - var script = document.currentScript || [].slice.call(document.getElementsByTagName("script")).pop(); +var script = _.util.currentScript(); - if (script) { - _.filename = script.src; +if (script) { + _.filename = script.src; - if (!_.manual && !script.hasAttribute('data-manual')) { - if(document.readyState !== "loading") { - if (window.requestAnimationFrame) { - window.requestAnimationFrame(_.highlightAll); - } else { - window.setTimeout(_.highlightAll, 16); - } - } - else { - document.addEventListener('DOMContentLoaded', _.highlightAll); - } + if (script.hasAttribute('data-manual')) { + _.manual = true; + } +} + +if (!_.manual) { + function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); } } - return _; + // If the document state is "loading", then we'll use DOMContentLoaded. + // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the + // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they + // might take longer one animation frame to execute which can create a race condition where only some plugins have + // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. + // See https://github.com/PrismJS/prism/issues/2102 + var readyState = document.readyState; + if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { + document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); + } else { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(highlightAutomaticallyCallback); + } else { + window.setTimeout(highlightAutomaticallyCallback, 16); + } + } +} + +return _; })(_self); @@ -555,7 +625,10 @@ if (typeof global !== 'undefined') { Prism.languages.markup = { 'comment': //, 'prolog': /<\?[\s\S]+?\?>/, - 'doctype': //i, + 'doctype': { + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, + greedy: true + }, 'cdata': //i, 'tag': { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, @@ -728,17 +801,17 @@ Prism.languages.clike = { greedy: true }, 'class-name': { - pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, + pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: true, inside: { - punctuation: /[.\\]/ + 'punctuation': /[.\\]/ } }, 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, 'boolean': /\b(?:true|false)\b/, 'function': /\w+(?=\()/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, - 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, + 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, 'punctuation': /[{}[\];(),.:]/ }; @@ -756,21 +829,21 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ + 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, @@ -834,43 +907,6 @@ if (Prism.languages.markup) { Prism.languages.js = Prism.languages.javascript; -Prism.languages.c = Prism.languages.extend('clike', { - 'class-name': { - pattern: /(\b(?:enum|struct)\s+)\w+/, - lookbehind: true - }, - 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, - 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, - 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i -}); - -Prism.languages.insertBefore('c', 'string', { - 'macro': { - // allow for multiline macro definitions - // spaces after the # character compile fine with gcc - pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im, - lookbehind: true, - alias: 'property', - inside: { - // highlight the path of the include statement as a string - 'string': { - pattern: /(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/, - lookbehind: true - }, - // highlight macro directives as keywords - 'directive': { - pattern: /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/, - lookbehind: true, - alias: 'keyword' - } - } - }, - // highlight predefined macros as constants - 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ -}); - -delete Prism.languages.c['boolean']; - (function(Prism) { // $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|' // + LC_ALL, RANDOM, REPLY, SECONDS. @@ -980,7 +1016,7 @@ delete Prism.languages.c['boolean']; 'string': [ // Support for Here-documents https://en.wikipedia.org/wiki/Here_document { - pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/, + pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: true, greedy: true, inside: insideString @@ -988,7 +1024,7 @@ delete Prism.languages.c['boolean']; // Here-document with quotes around the tag // → No expansion (so no “inside”). { - pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/, + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: true, greedy: true }, @@ -1069,125 +1105,162 @@ delete Prism.languages.c['boolean']; Prism.languages.shell = Prism.languages.bash; })(Prism); -Prism.languages.cpp = Prism.languages.extend('c', { +Prism.languages.c = Prism.languages.extend('clike', { 'class-name': { - pattern: /(\b(?:class|enum|struct)\s+)\w+/, + pattern: /(\b(?:enum|struct)\s+)\w+/, lookbehind: true }, - 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, - 'number': { - pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i, - greedy: true - }, - 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, - 'boolean': /\b(?:true|false)\b/ -}); - -Prism.languages.insertBefore('cpp', 'string', { - 'raw-string': { - pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, - alias: 'string', - greedy: true - } + 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, + 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i }); -(function(Prism) { - -// Ignore comments starting with { to privilege string interpolation highlighting - var comment = /#(?!\{).+/, - interpolation = { - pattern: /#\{[^}]+\}/, - alias: 'variable' - }; - - Prism.languages.coffeescript = Prism.languages.extend('javascript', { - 'comment': comment, - 'string': [ - - // Strings are multiline - { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - greedy: true +Prism.languages.insertBefore('c', 'string', { + 'macro': { + // allow for multiline macro definitions + // spaces after the # character compile fine with gcc + pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im, + lookbehind: true, + alias: 'property', + inside: { + // highlight the path of the include statement as a string + 'string': { + pattern: /(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/, + lookbehind: true }, - - { - // Strings are multiline - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - greedy: true, - inside: { - 'interpolation': interpolation - } + // highlight macro directives as keywords + 'directive': { + pattern: /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/, + lookbehind: true, + alias: 'keyword' } - ], - 'keyword': /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, - 'class-member': { - pattern: /@(?!\d)\w+/, - alias: 'variable' } - }); + }, + // highlight predefined macros as constants + 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ +}); - Prism.languages.insertBefore('coffeescript', 'comment', { - 'multiline-comment': { - pattern: /###[\s\S]+?###/, - alias: 'comment' +delete Prism.languages.c['boolean']; + +Prism.languages.cpp = Prism.languages.extend('c', { + 'class-name': { + pattern: /(\b(?:class|enum|struct)\s+)\w+/, + lookbehind: true + }, + 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, + 'number': { + pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i, + greedy: true + }, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, + 'boolean': /\b(?:true|false)\b/ +}); + +Prism.languages.insertBefore('cpp', 'string', { + 'raw-string': { + pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, + alias: 'string', + greedy: true + } +}); + +(function(Prism) { + +// Ignore comments starting with { to privilege string interpolation highlighting +var comment = /#(?!\{).+/, + interpolation = { + pattern: /#\{[^}]+\}/, + alias: 'variable' + }; + +Prism.languages.coffeescript = Prism.languages.extend('javascript', { + 'comment': comment, + 'string': [ + + // Strings are multiline + { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + greedy: true }, - // Block regexp can contain comments and interpolation - 'block-regex': { - pattern: /\/{3}[\s\S]*?\/{3}/, - alias: 'regex', + { + // Strings are multiline + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + greedy: true, inside: { - 'comment': comment, 'interpolation': interpolation } } - }); + ], + 'keyword': /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, + 'class-member': { + pattern: /@(?!\d)\w+/, + alias: 'variable' + } +}); - Prism.languages.insertBefore('coffeescript', 'string', { - 'inline-javascript': { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, - inside: { - 'delimiter': { - pattern: /^`|`$/, - alias: 'punctuation' - }, - rest: Prism.languages.javascript - } - }, +Prism.languages.insertBefore('coffeescript', 'comment', { + 'multiline-comment': { + pattern: /###[\s\S]+?###/, + alias: 'comment' + }, - // Block strings - 'multiline-string': [ - { - pattern: /'''[\s\S]*?'''/, - greedy: true, - alias: 'string' + // Block regexp can contain comments and interpolation + 'block-regex': { + pattern: /\/{3}[\s\S]*?\/{3}/, + alias: 'regex', + inside: { + 'comment': comment, + 'interpolation': interpolation + } + } +}); + +Prism.languages.insertBefore('coffeescript', 'string', { + 'inline-javascript': { + pattern: /`(?:\\[\s\S]|[^\\`])*`/, + inside: { + 'delimiter': { + pattern: /^`|`$/, + alias: 'punctuation' }, - { - pattern: /"""[\s\S]*?"""/, - greedy: true, - alias: 'string', - inside: { - interpolation: interpolation - } + rest: Prism.languages.javascript + } + }, + + // Block strings + 'multiline-string': [ + { + pattern: /'''[\s\S]*?'''/, + greedy: true, + alias: 'string' + }, + { + pattern: /"""[\s\S]*?"""/, + greedy: true, + alias: 'string', + inside: { + interpolation: interpolation } - ] + } + ] - }); +}); - Prism.languages.insertBefore('coffeescript', 'keyword', { - // Object property - 'property': /(?!\d)\w+(?=\s*:(?!:))/ - }); +Prism.languages.insertBefore('coffeescript', 'keyword', { + // Object property + 'property': /(?!\d)\w+(?=\s*:(?!:))/ +}); - delete Prism.languages.coffeescript['template-string']; +delete Prism.languages.coffeescript['template-string']; - Prism.languages.coffee = Prism.languages.coffeescript; +Prism.languages.coffee = Prism.languages.coffeescript; }(Prism)); /** * Original by Samuel Flores * * Adds the following new token classes: - * constant, builtin, variable, symbol, regex + * constant, builtin, variable, symbol, regex */ (function(Prism) { Prism.languages.ruby = Prism.languages.extend('clike', { @@ -1198,7 +1271,14 @@ Prism.languages.insertBefore('cpp', 'string', { greedy: true } ], - 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/ + 'class-name': { + pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i, + lookbehind: true, + inside: { + 'punctuation': /[.\\]/ + } + }, + 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ }); var interpolation = { @@ -1253,7 +1333,7 @@ Prism.languages.insertBefore('cpp', 'string', { } }, { - pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/, + pattern: /(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/, lookbehind: true, greedy: true } @@ -1327,22 +1407,109 @@ Prism.languages.insertBefore('cpp', 'string', { Prism.languages.rb = Prism.languages.ruby; }(Prism)); +(function(Prism) { + Prism.languages.crystal = Prism.languages.extend('ruby', { + keyword: [ + /\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/, + { + pattern: /(\.\s*)(?:is_a|responds_to)\?/, + lookbehind: true + } + ], + + number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/ + }); + + Prism.languages.insertBefore('crystal', 'string', { + attribute: { + pattern: /@\[.+?\]/, + alias: 'attr-name', + inside: { + delimiter: { + pattern: /^@\[|\]$/, + alias: 'tag' + }, + rest: Prism.languages.crystal + } + }, + + expansion: [ + { + pattern: /\{\{.+?\}\}/, + inside: { + delimiter: { + pattern: /^\{\{|\}\}$/, + alias: 'tag' + }, + rest: Prism.languages.crystal + } + }, + { + pattern: /\{%.+?%\}/, + inside: { + delimiter: { + pattern: /^\{%|%\}$/, + alias: 'tag' + }, + rest: Prism.languages.crystal + } + } + ] + }); + +}(Prism)); + Prism.languages.d = Prism.languages.extend('clike', { + 'comment': [ + { + // Shebang + pattern: /^\s*#!.+/, + greedy: true + }, + { + pattern: RegExp(/(^|[^\\])/.source + '(?:' + [ + // /+ comment +/ + // Allow one level of nesting + /\/\+(?:\/\+[\s\S]*?\+\/|(?!\/\+)[\s\S])*?\+\//.source, + // // comment + /\/\/.*/.source, + // /* comment */ + /\/\*[\s\S]*?\*\//.source + ].join('|') + ')'), + lookbehind: true, + greedy: true + } + ], 'string': [ - // r"", x"" - /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/, - // q"[]", q"()", q"<>", q"{}" - /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/, - // q"IDENT - // ... - // IDENT" - /\bq"([_a-zA-Z][_a-zA-Z\d]*)(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\1"/, - // q"//", q"||", etc. - /\bq"(.)[\s\S]*?\1"/, - // Characters - /'(?:\\'|\\?[^']+)'/, - - /(["`])(?:\\[\s\S]|(?!\1)[^\\])*\1[cwd]?/ + { + pattern: RegExp([ + // r"", x"" + /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, + + // q"[]", q"()", q"<>", q"{}" + /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, + + // q"IDENT + // ... + // IDENT" + /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, + + // q"//", q"||", etc. + /\bq"(.)[\s\S]*?\2"/.source, + + // Characters + // 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot' + /'(?:\\(?:\W|\w+)|[^\\])'/.source, + + /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source + ].join('|'), 'm'), + greedy: true + }, + { + pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/, + greedy: true, + alias: 'token-string' + } ], 'number': [ @@ -1360,26 +1527,6 @@ Prism.languages.d = Prism.languages.extend('clike', { 'operator': /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/ }); - -Prism.languages.d.comment = [ - // Shebang - /^\s*#!.+/, - // /+ +/ - { - // Allow one level of nesting - pattern: /(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//, - lookbehind: true - } -].concat(Prism.languages.d.comment); - -Prism.languages.insertBefore('d', 'comment', { - 'token-string': { - // Allow one level of nesting - pattern: /\bq\{(?:\{[^}]*\}|[^}])*\}/, - alias: 'string' - } -}); - Prism.languages.insertBefore('d', 'keyword', { 'property': /\B@\w*/ }); @@ -1391,6 +1538,7 @@ Prism.languages.insertBefore('d', 'function', { alias: 'variable' } }); + Prism.languages.dart = Prism.languages.extend('clike', { 'string': [ { @@ -1539,50 +1687,111 @@ Prism.languages.insertBefore('dart','function',{ }(Prism)); -Prism.languages.elixir = { - 'comment': /#.*/m, - // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r - 'regex': { - pattern: /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/, - greedy: true - }, - 'string': [ - { - // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s - pattern: /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/, - greedy: true, - inside: { - // See interpolation below - } +// Django/Jinja2 syntax definition for Prism.js syntax highlighter. +// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations. + +(function (Prism) { + + Prism.languages.django = { + 'comment': /^{#[\s\S]*?#}$/, + 'tag': { + pattern: /(^{%[+-]?\s*)\w+/, + lookbehind: true, + alias: 'keyword' }, - { - pattern: /("""|''')[\s\S]*?\1/, - greedy: true, - inside: { - // See interpolation below - } + 'delimiter': { + pattern: /^{[{%][+-]?|[+-]?[}%]}$/, + alias: 'punctuation' }, - { - // Multi-line strings are allowed - pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: true, - inside: { - // See interpolation below - } - } - ], - 'atom': { - // Look-behind prevents bad highlighting of the :: operator - pattern: /(^|[^:]):\w+/, - lookbehind: true, - alias: 'symbol' - }, - // Look-ahead prevents bad highlighting of the :: operator - 'attr-name': /\w+:(?!:)/, - 'capture': { - // Look-behind prevents bad highlighting of the && operator - pattern: /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/, - lookbehind: true, + 'string': { + pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'filter': { + pattern: /(\|)\w+/, + lookbehind: true, + alias: 'function' + }, + 'test': { + pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/, + lookbehind: true, + alias: 'function' + }, + 'function': /\b[a-z_]\w+(?=\s*\()/i, + 'keyword': /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/, + 'operator': /[-+*/%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, + 'number': /\b\d+(?:\.\d+)?\b/, + 'boolean': /[Tt]rue|[Ff]alse|[Nn]one/, + 'variable': /\b\w+?\b/, + 'punctuation': /[{}[\](),.:;]/ + }; + + + var pattern = /{{[\s\S]*?}}|{%[\s\S]*?%}|{#[\s\S]*?#}/g; + var markupTemplating = Prism.languages['markup-templating']; + + Prism.hooks.add('before-tokenize', function (env) { + markupTemplating.buildPlaceholders(env, 'django', pattern); + }); + Prism.hooks.add('after-tokenize', function (env) { + markupTemplating.tokenizePlaceholders(env, 'django'); + }); + + // Add an Jinja2 alias + Prism.languages.jinja2 = Prism.languages.django; + Prism.hooks.add('before-tokenize', function (env) { + markupTemplating.buildPlaceholders(env, 'jinja2', pattern); + }); + Prism.hooks.add('after-tokenize', function (env) { + markupTemplating.tokenizePlaceholders(env, 'jinja2'); + }); + +})(Prism); + +Prism.languages.elixir = { + 'comment': /#.*/m, + // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r + 'regex': { + pattern: /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/, + greedy: true + }, + 'string': [ + { + // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s + pattern: /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/, + greedy: true, + inside: { + // See interpolation below + } + }, + { + pattern: /("""|''')[\s\S]*?\1/, + greedy: true, + inside: { + // See interpolation below + } + }, + { + // Multi-line strings are allowed + pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true, + inside: { + // See interpolation below + } + } + ], + 'atom': { + // Look-behind prevents bad highlighting of the :: operator + pattern: /(^|[^:]):\w+/, + lookbehind: true, + alias: 'symbol' + }, + // Look-ahead prevents bad highlighting of the :: operator + 'attr-name': /\w+\??:(?!:)/, + 'capture': { + // Look-behind prevents bad highlighting of the && operator + pattern: /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/, + lookbehind: true, alias: 'function' }, 'argument': { @@ -1680,30 +1889,32 @@ Prism.languages.go = Prism.languages.extend('clike', { 'operator': /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, 'number': /(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i, 'string': { - pattern: /(["'`])(\\[\s\S]|(?!\1)[^\\])*\1/, + pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/, greedy: true } }); delete Prism.languages.go['class-name']; Prism.languages.groovy = Prism.languages.extend('clike', { - 'keyword': /\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/, 'string': [ { - pattern: /("""|''')[\s\S]*?\1|(?:\$\/)(?:\$\/\$|[\s\S])*?\/\$/, + pattern: /("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:\$\/\$|[\s\S])*?\/\$/, greedy: true }, { - pattern: /(["'\/])(?:\\.|(?!\1)[^\\\r\n])*\1/, + // TODO: Slash strings (e.g. /foo/) can contain line breaks but this will cause a lot of trouble with + // simple division (see JS regex), so find a fix maybe? + pattern: /(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/, greedy: true } ], + 'keyword': /\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/, 'number': /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i, 'operator': { - pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.{1,2}(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/, + pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/, lookbehind: true }, - 'punctuation': /\.+|[{}[\];(),:$]/ + 'punctuation': /\.+|[{}[\];(),.:$]/ }); Prism.languages.insertBefore('groovy', 'string', { @@ -1719,9 +1930,9 @@ Prism.languages.insertBefore('groovy', 'punctuation', { Prism.languages.insertBefore('groovy', 'function', { 'annotation': { - alias: 'punctuation', pattern: /(^|[^.])@\w+/, - lookbehind: true + lookbehind: true, + alias: 'punctuation' } }); @@ -1754,7 +1965,7 @@ Prism.hooks.add('wrap', function(env) { (function (Prism) { - var keywords = /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/; + var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; // based on the java naming conventions var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; @@ -1777,11 +1988,20 @@ Prism.hooks.add('wrap', function(env) { ], 'number': /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, 'operator': { - pattern: /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m, + pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: true } }); + Prism.languages.insertBefore('java', 'string', { + 'triple-quoted-string': { + // http://openjdk.java.net/jeps/355#Description + pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, + greedy: true, + alias: 'string' + } + }); + Prism.languages.insertBefore('java', 'class-name', { 'annotation': { alias: 'punctuation', @@ -1789,7 +2009,7 @@ Prism.hooks.add('wrap', function(env) { lookbehind: true }, 'namespace': { - pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/, + pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/, lookbehind: true, inside: { 'punctuation': /\./, @@ -1807,139 +2027,6 @@ Prism.hooks.add('wrap', function(env) { }); }(Prism)); -/** - * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/ - * Modified by Miles Johnson: http://milesj.me - * - * Supports the following: - * - Extends clike syntax - * - Support for PHP 5.3+ (namespaces, traits, generators, etc) - * - Smarter constant and function matching - * - * Adds the following new token classes: - * constant, delimiter, variable, function, package - */ -(function (Prism) { - Prism.languages.php = Prism.languages.extend('clike', { - 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, - 'boolean': { - pattern: /\b(?:false|true)\b/i, - alias: 'constant' - }, - 'constant': [ - /\b[A-Z_][A-Z0-9_]*\b/, - /\b(?:null)\b/i, - ], - 'comment': { - pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, - lookbehind: true - } - }); - - Prism.languages.insertBefore('php', 'string', { - 'shell-comment': { - pattern: /(^|[^\\])#.*/, - lookbehind: true, - alias: 'comment' - } - }); - - Prism.languages.insertBefore('php', 'comment', { - 'delimiter': { - pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, - alias: 'important' - } - }); - - Prism.languages.insertBefore('php', 'keyword', { - 'variable': /\$+(?:\w+\b|(?={))/i, - 'package': { - pattern: /(\\|namespace\s+|use\s+)[\w\\]+/, - lookbehind: true, - inside: { - punctuation: /\\/ - } - } - }); - - // Must be defined after the function pattern - Prism.languages.insertBefore('php', 'operator', { - 'property': { - pattern: /(->)[\w]+/, - lookbehind: true - } - }); - - var string_interpolation = { - pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/, - lookbehind: true, - inside: { - rest: Prism.languages.php - } - }; - - Prism.languages.insertBefore('php', 'string', { - 'nowdoc-string': { - pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/, - greedy: true, - alias: 'string', - inside: { - 'delimiter': { - pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<'?|[';]$/ - } - } - } - }, - 'heredoc-string': { - pattern: /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i, - greedy: true, - alias: 'string', - inside: { - 'delimiter': { - pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<"?|[";]$/ - } - }, - 'interpolation': string_interpolation // See below - } - }, - 'single-quoted-string': { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - greedy: true, - alias: 'string' - }, - 'double-quoted-string': { - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - greedy: true, - alias: 'string', - inside: { - 'interpolation': string_interpolation // See below - } - } - }); - // The different types of PHP strings "replace" the C-like standard string - delete Prism.languages.php['string']; - - Prism.hooks.add('before-tokenize', function(env) { - if (!/<\?/.test(env.code)) { - return; - } - - var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; - Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); - }); - - Prism.hooks.add('after-tokenize', function(env) { - Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); - }); - -}(Prism)); - Prism.languages.json = { 'property': { pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, @@ -1950,7 +2037,7 @@ Prism.languages.json = { greedy: true }, 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, - 'number': /-?\d+\.?\d*(e[+-]?\d+)?/i, + 'number': /-?\d+\.?\d*(?:e[+-]?\d+)?/i, 'punctuation': /[{}[\],]/, 'operator': /:/, 'boolean': /\b(?:true|false)\b/, @@ -2018,7 +2105,7 @@ Prism.languages.julia= { { pattern: /\$\{[^}]+\}/, inside: { - delimiter: { + 'delimiter': { pattern: /^\$\{|\}$/, alias: 'variable' }, @@ -2037,58 +2124,6 @@ Prism.languages.julia= { }(Prism)); -(function(Prism) { - Prism.languages.crystal = Prism.languages.extend('ruby', { - keyword: [ - /\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/, - { - pattern: /(\.\s*)(?:is_a|responds_to)\?/, - lookbehind: true - } - ], - - number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/ - }); - - Prism.languages.insertBefore('crystal', 'string', { - attribute: { - pattern: /@\[.+?\]/, - alias: 'attr-name', - inside: { - delimiter: { - pattern: /^@\[|\]$/, - alias: 'tag' - }, - rest: Prism.languages.crystal - } - }, - - expansion: [ - { - pattern: /\{\{.+?\}\}/, - inside: { - delimiter: { - pattern: /^\{\{|\}\}$/, - alias: 'tag' - }, - rest: Prism.languages.crystal - } - }, - { - pattern: /\{%.+?%\}/, - inside: { - delimiter: { - pattern: /^\{%|%\}$/, - alias: 'tag' - }, - rest: Prism.languages.crystal - } - } - ] - }); - -}(Prism)); - Prism.languages.lua = { 'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m, // \z may be used to skip the following space @@ -2109,67 +2144,6 @@ Prism.languages.lua = { ], 'punctuation': /[\[\](){},;]|\.+|:+/ }; -// Django/Jinja2 syntax definition for Prism.js syntax highlighter. -// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations. - -(function (Prism) { - - Prism.languages.django = { - 'comment': /^{#[\s\S]*?#}$/, - 'tag': { - pattern: /(^{%[+-]?\s*)\w+/, - lookbehind: true, - alias: 'keyword' - }, - 'delimiter': { - pattern: /^{[{%][+-]?|[+-]?[}%]}$/, - alias: 'punctuation' - }, - 'string': { - pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, - greedy: true - }, - 'filter': { - pattern: /(\|)\w+/, - lookbehind: true, - alias: 'function' - }, - 'test': { - pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/, - lookbehind: true, - alias: 'function' - }, - 'function': /\b[a-z_]\w+(?=\s*\()/i, - 'keyword': /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/, - 'operator': /[-+*/%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, - 'number': /\b\d+(?:\.\d+)?\b/, - 'boolean': /[Tt]rue|[Ff]alse|[Nn]one/, - 'variable': /\b\w+?\b/, - 'punctuation': /[{}[\](),.:;]/ - }; - - - var pattern = /{{[\s\S]*?}}|{%[\s\S]*?%}|{#[\s\S]*?#}/g; - var markupTemplating = Prism.languages['markup-templating']; - - Prism.hooks.add('before-tokenize', function (env) { - markupTemplating.buildPlaceholders(env, 'django', pattern); - }); - Prism.hooks.add('after-tokenize', function (env) { - markupTemplating.tokenizePlaceholders(env, 'django'); - }); - - // Add an Jinja2 alias - Prism.languages.jinja2 = Prism.languages.django; - Prism.hooks.add('before-tokenize', function (env) { - markupTemplating.buildPlaceholders(env, 'jinja2', pattern); - }); - Prism.hooks.add('after-tokenize', function (env) { - markupTemplating.tokenizePlaceholders(env, 'jinja2'); - }); - -})(Prism); - Prism.languages.matlab = { 'comment': [ /%\{[\s\S]*?\}%/, @@ -2186,14 +2160,6 @@ Prism.languages.matlab = { 'operator': /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/, 'punctuation': /\.{3}|[.,;\[\](){}!]/ }; -Prism.languages.typescript = Prism.languages.extend('javascript', { - // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words - 'keyword': /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/, - 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, -}); - -Prism.languages.ts = Prism.languages.typescript; - Prism.languages.nginx = Prism.languages.extend('clike', { 'comment': { pattern: /(^|[^"{\\])#.*/, @@ -2388,7 +2354,7 @@ Prism.languages.perl = { // the same line from being highlighted as regex. // This does not support multi-line regex. { - pattern: /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/, + pattern: /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/, greedy: true } ], @@ -2431,108 +2397,136 @@ Prism.languages.perl = { 'punctuation': /[{}[\];(),:]/ }; -Prism.languages.sql = { - 'comment': { - pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, - lookbehind: true - }, - 'variable': [ - { - pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, - greedy: true +/** + * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/ + * Modified by Miles Johnson: http://milesj.me + * + * Supports the following: + * - Extends clike syntax + * - Support for PHP 5.3+ (namespaces, traits, generators, etc) + * - Smarter constant and function matching + * + * Adds the following new token classes: + * constant, delimiter, variable, function, package + */ +(function (Prism) { + Prism.languages.php = Prism.languages.extend('clike', { + 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, + 'boolean': { + pattern: /\b(?:false|true)\b/i, + alias: 'constant' }, - /@[\w.$]+/ - ], - 'string': { - pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, - greedy: true, - lookbehind: true - }, - 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too? - 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, - 'boolean': /\b(?:TRUE|FALSE|NULL)\b/i, - 'number': /\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i, - 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, - 'punctuation': /[;[\]()`,.]/ -}; + 'constant': [ + /\b[A-Z_][A-Z0-9_]*\b/, + /\b(?:null)\b/i, + ], + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, + lookbehind: true + } + }); -Prism.languages.scss = Prism.languages.extend('css', { - 'comment': { - pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, - lookbehind: true - }, - 'atrule': { - pattern: /@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/, - inside: { - 'rule': /@[\w-]+/ - // See rest below + Prism.languages.insertBefore('php', 'string', { + 'shell-comment': { + pattern: /(^|[^\\])#.*/, + lookbehind: true, + alias: 'comment' } - }, - // url, compassified - 'url': /(?:[-a-z]+-)?url(?=\()/i, - // CSS selector regex is not appropriate for Sass - // since there can be lot more things (var, @ directive, nesting..) - // a selector must start at the end of a property or after a brace (end of other rules or nesting) - // it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable - // the end of a selector is found when there is no rules in it ( {} or {\s}) or if there is a property (because an interpolated var - // can "pass" as a selector- e.g: proper#{$erty}) - // this one was hard to do, so please be careful if you edit this one :) - 'selector': { - // Initial look-ahead is used to prevent matching of blank selectors - pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m, - inside: { - 'parent': { - pattern: /&/, - alias: 'important' - }, - 'placeholder': /%[-\w]+/, - 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ + }); + + Prism.languages.insertBefore('php', 'comment', { + 'delimiter': { + pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, + alias: 'important' } - }, - 'property': { - pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/, - inside: { - 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ + }); + + Prism.languages.insertBefore('php', 'keyword', { + 'variable': /\$+(?:\w+\b|(?={))/i, + 'package': { + pattern: /(\\|namespace\s+|use\s+)[\w\\]+/, + lookbehind: true, + inside: { + punctuation: /\\/ + } } - } -}); + }); -Prism.languages.insertBefore('scss', 'atrule', { - 'keyword': [ - /@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i, - { - pattern: /( +)(?:from|through)(?= )/, + // Must be defined after the function pattern + Prism.languages.insertBefore('php', 'operator', { + 'property': { + pattern: /(->)[\w]+/, lookbehind: true } - ] -}); + }); -Prism.languages.insertBefore('scss', 'important', { - // var and interpolated vars - 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ -}); + var string_interpolation = { + pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/, + lookbehind: true, + inside: Prism.languages.php + }; -Prism.languages.insertBefore('scss', 'function', { - 'placeholder': { - pattern: /%[-\w]+/, - alias: 'selector' - }, - 'statement': { - pattern: /\B!(?:default|optional)\b/i, - alias: 'keyword' - }, - 'boolean': /\b(?:true|false)\b/, - 'null': { - pattern: /\bnull\b/, - alias: 'keyword' - }, - 'operator': { - pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/, - lookbehind: true - } -}); + Prism.languages.insertBefore('php', 'string', { + 'nowdoc-string': { + pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/, + greedy: true, + alias: 'string', + inside: { + 'delimiter': { + pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<'?|[';]$/ + } + } + } + }, + 'heredoc-string': { + pattern: /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i, + greedy: true, + alias: 'string', + inside: { + 'delimiter': { + pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<"?|[";]$/ + } + }, + 'interpolation': string_interpolation // See below + } + }, + 'single-quoted-string': { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + greedy: true, + alias: 'string' + }, + 'double-quoted-string': { + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + greedy: true, + alias: 'string', + inside: { + 'interpolation': string_interpolation // See below + } + } + }); + // The different types of PHP strings "replace" the C-like standard string + delete Prism.languages.php['string']; -Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss; + Prism.hooks.add('before-tokenize', function(env) { + if (!/<\?/.test(env.code)) { + return; + } + + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; + Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); + }); + + Prism.hooks.add('after-tokenize', function(env) { + Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); + }); + +}(Prism)); Prism.languages.python = { 'comment': { @@ -2580,7 +2574,7 @@ Prism.languages.python = { lookbehind: true }, 'decorator': { - pattern: /(^\s*)@\w+(?:\.\w+)*/i, + pattern: /(^\s*)@\w+(?:\.\w+)*/im, lookbehind: true, alias: ['annotation', 'punctuation'], inside: { @@ -2598,138 +2592,139 @@ Prism.languages.python = { Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; Prism.languages.py = Prism.languages.python; + (function(Prism) { - var javascript = Prism.util.clone(Prism.languages.javascript); +var javascript = Prism.util.clone(Prism.languages.javascript); - Prism.languages.jsx = Prism.languages.extend('markup', javascript); - Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i; +Prism.languages.jsx = Prism.languages.extend('markup', javascript); +Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; - Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; - Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; - Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; +Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; +Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; +Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; - Prism.languages.insertBefore('inside', 'attr-name', { - 'spread': { - pattern: /\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/, - inside: { - 'punctuation': /\.{3}|[{}.]/, - 'attr-value': /\w+/ - } +Prism.languages.insertBefore('inside', 'attr-name', { + 'spread': { + pattern: /\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/, + inside: { + 'punctuation': /\.{3}|[{}.]/, + 'attr-value': /\w+/ } - }, Prism.languages.jsx.tag); + } +}, Prism.languages.jsx.tag); - Prism.languages.insertBefore('inside', 'attr-value',{ - 'script': { - // Allow for two levels of nesting - pattern: /=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i, - inside: { - 'script-punctuation': { - pattern: /^=(?={)/, - alias: 'punctuation' - }, - rest: Prism.languages.jsx +Prism.languages.insertBefore('inside', 'attr-value',{ + 'script': { + // Allow for two levels of nesting + pattern: /=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i, + inside: { + 'script-punctuation': { + pattern: /^=(?={)/, + alias: 'punctuation' }, - 'alias': 'language-javascript' - } - }, Prism.languages.jsx.tag); + rest: Prism.languages.jsx + }, + 'alias': 'language-javascript' + } +}, Prism.languages.jsx.tag); // The following will handle plain text inside tags - var stringifyToken = function (token) { - if (!token) { - return ''; - } - if (typeof token === 'string') { - return token; - } - if (typeof token.content === 'string') { - return token.content; - } - return token.content.map(stringifyToken).join(''); - }; +var stringifyToken = function (token) { + if (!token) { + return ''; + } + if (typeof token === 'string') { + return token; + } + if (typeof token.content === 'string') { + return token.content; + } + return token.content.map(stringifyToken).join(''); +}; - var walkTokens = function (tokens) { - var openedTags = []; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - var notTagNorBrace = false; - - if (typeof token !== 'string') { - if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') { - // We found a tag, now find its kind - - if (token.content[0].content[0].content === ' 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) { - // Pop matching opening tag - openedTags.pop(); - } +var walkTokens = function (tokens) { + var openedTags = []; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var notTagNorBrace = false; + + if (typeof token !== 'string') { + if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') { + // We found a tag, now find its kind + + if (token.content[0].content[0].content === ' 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) { + // Pop matching opening tag + openedTags.pop(); + } + } else { + if (token.content[token.content.length - 1].content === '/>') { + // Autoclosed tag, ignore } else { - if (token.content[token.content.length - 1].content === '/>') { - // Autoclosed tag, ignore - } else { - // Opening tag - openedTags.push({ - tagName: stringifyToken(token.content[0].content[1]), - openedBraces: 0 - }); - } + // Opening tag + openedTags.push({ + tagName: stringifyToken(token.content[0].content[1]), + openedBraces: 0 + }); } - } else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') { + } + } else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') { - // Here we might have entered a JSX context inside a tag - openedTags[openedTags.length - 1].openedBraces++; + // Here we might have entered a JSX context inside a tag + openedTags[openedTags.length - 1].openedBraces++; - } else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') { + } else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') { - // Here we might have left a JSX context inside a tag - openedTags[openedTags.length - 1].openedBraces--; + // Here we might have left a JSX context inside a tag + openedTags[openedTags.length - 1].openedBraces--; - } else { - notTagNorBrace = true - } + } else { + notTagNorBrace = true } - if (notTagNorBrace || typeof token === 'string') { - if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) { - // Here we are inside a tag, and not inside a JSX context. - // That's plain text: drop any tokens matched. - var plainText = stringifyToken(token); - - // And merge text with adjacent text - if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) { - plainText += stringifyToken(tokens[i + 1]); - tokens.splice(i + 1, 1); - } - if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) { - plainText = stringifyToken(tokens[i - 1]) + plainText; - tokens.splice(i - 1, 1); - i--; - } + } + if (notTagNorBrace || typeof token === 'string') { + if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) { + // Here we are inside a tag, and not inside a JSX context. + // That's plain text: drop any tokens matched. + var plainText = stringifyToken(token); - tokens[i] = new Prism.Token('plain-text', plainText, null, plainText); + // And merge text with adjacent text + if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) { + plainText += stringifyToken(tokens[i + 1]); + tokens.splice(i + 1, 1); + } + if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) { + plainText = stringifyToken(tokens[i - 1]) + plainText; + tokens.splice(i - 1, 1); + i--; } - } - if (token.content && typeof token.content !== 'string') { - walkTokens(token.content); + tokens[i] = new Prism.Token('plain-text', plainText, null, plainText); } } - }; - Prism.hooks.add('after-tokenize', function (env) { - if (env.language !== 'jsx' && env.language !== 'tsx') { - return; + if (token.content && typeof token.content !== 'string') { + walkTokens(token.content); } - walkTokens(env.tokens); - }); + } +}; + +Prism.hooks.add('after-tokenize', function (env) { + if (env.language !== 'jsx' && env.language !== 'tsx') { + return; + } + walkTokens(env.tokens); +}); }(Prism)); /* TODO - Add support for Markdown notation inside doc comments - Add support for nested block comments... - Match closure params even when not followed by dash or brace - Add better support for macro definition + Add support for Markdown notation inside doc comments + Add support for nested block comments... + Match closure params even when not followed by dash or brace + Add better support for macro definition */ Prism.languages.rust = { @@ -2780,7 +2775,7 @@ Prism.languages.rust = { }, // Hex, oct, bin, dec numbers with visual separators and type suffix - 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/, + 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/, // Closure params should not be confused with bitwise OR | 'closure-params': { @@ -2794,6 +2789,160 @@ Prism.languages.rust = { 'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/ }; +Prism.languages.scss = Prism.languages.extend('css', { + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, + lookbehind: true + }, + 'atrule': { + pattern: /@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/, + inside: { + 'rule': /@[\w-]+/ + // See rest below + } + }, + // url, compassified + 'url': /(?:[-a-z]+-)?url(?=\()/i, + // CSS selector regex is not appropriate for Sass + // since there can be lot more things (var, @ directive, nesting..) + // a selector must start at the end of a property or after a brace (end of other rules or nesting) + // it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable + // the end of a selector is found when there is no rules in it ( {} or {\s}) or if there is a property (because an interpolated var + // can "pass" as a selector- e.g: proper#{$erty}) + // this one was hard to do, so please be careful if you edit this one :) + 'selector': { + // Initial look-ahead is used to prevent matching of blank selectors + pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m, + inside: { + 'parent': { + pattern: /&/, + alias: 'important' + }, + 'placeholder': /%[-\w]+/, + 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ + } + }, + 'property': { + pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/, + inside: { + 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ + } + } +}); + +Prism.languages.insertBefore('scss', 'atrule', { + 'keyword': [ + /@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i, + { + pattern: /( +)(?:from|through)(?= )/, + lookbehind: true + } + ] +}); + +Prism.languages.insertBefore('scss', 'important', { + // var and interpolated vars + 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ +}); + +Prism.languages.insertBefore('scss', 'function', { + 'placeholder': { + pattern: /%[-\w]+/, + alias: 'selector' + }, + 'statement': { + pattern: /\B!(?:default|optional)\b/i, + alias: 'keyword' + }, + 'boolean': /\b(?:true|false)\b/, + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + }, + 'operator': { + pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/, + lookbehind: true + } +}); + +Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss; + +(function (Prism) { + + // CAREFUL! + // The following patterns are concatenated, so the group referenced by a back reference is non-obvious! + + var strings = [ + // normal string + // 1 capturing group + /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/.source, + + // here doc + // 1 capturing group + /<<-?\s*(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/.source, + + // here doc quoted + // 2 capturing group + /<<-?\s*(["'])(\w+)\3\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\4/.source + ].join('|'); + + Prism.languages['shell-session'] = { + 'command': { + pattern: RegExp(/\$(?:[^\r\n'"<]|<>)+/.source.replace(/<>/g, strings)), + inside: { + 'bash': { + pattern: /(\$\s*)[\s\S]+/, + lookbehind: true, + alias: 'language-bash', + inside: Prism.languages.bash + }, + 'sh': { + pattern: /^\$/, + alias: 'important' + } + } + }, + 'output': { + pattern: /.(?:.*(?:\r\n?|\n|.$))*/ + // output highlighting? + } + }; + +}(Prism)); + +Prism.languages.sql = { + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, + lookbehind: true + }, + 'variable': [ + { + pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, + greedy: true + }, + /@[\w.$]+/ + ], + 'string': { + pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, + greedy: true, + lookbehind: true + }, + 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too? + 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, + 'boolean': /\b(?:TRUE|FALSE|NULL)\b/i, + 'number': /\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i, + 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, + 'punctuation': /[;[\]()`,.]/ +}; + +Prism.languages.typescript = Prism.languages.extend('javascript', { + // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words + 'keyword': /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/, + 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, +}); + +Prism.languages.ts = Prism.languages.typescript; + Prism.languages.yaml = { 'scalar': { pattern: /([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/, From bad02f87ba71c558943ef2a0316ecb749e0b9285 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 15:41:54 -0500 Subject: [PATCH 0052/2496] Syntax highlighting in Git docs --- lib/docs/filters/git/clean_html.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/docs/filters/git/clean_html.rb b/lib/docs/filters/git/clean_html.rb index 6b76e1f0b9..b2433a76a1 100644 --- a/lib/docs/filters/git/clean_html.rb +++ b/lib/docs/filters/git/clean_html.rb @@ -42,6 +42,8 @@ def other css('pre').each do |node| node.content = node.content.gsub("\t", ' ' * 8) + node['data-language'] = 'shell' if node.content.starts_with?('git ') + node['data-language'] = 'shell-session' if node.content[0] == '$' end end end From 7894269c33965bcbed83047f9c5696aff967fc56 Mon Sep 17 00:00:00 2001 From: Daniel Zhu Date: Wed, 29 Jan 2020 20:16:55 -0500 Subject: [PATCH 0053/2496] Fix Haskell entry names --- lib/docs/filters/haskell/entries.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/docs/filters/haskell/entries.rb b/lib/docs/filters/haskell/entries.rb index ed590d2beb..00e19bb4f2 100644 --- a/lib/docs/filters/haskell/entries.rb +++ b/lib/docs/filters/haskell/entries.rb @@ -53,19 +53,15 @@ def additional_entries return [] if IGNORE_ENTRIES_PATHS.include?(subpath.split('/').last) css('#synopsis > details > ul > li').each_with_object [] do |node, entries| - link = node.at_css('a') - name = node.content.strip - name.remove! %r{\A(?:module|data|newtype|class|type family m|type)\s+} - name.sub! %r{\A\((.+?)\)}, '\1' - name.sub!(/ (?:\:\: (\w+))?.*\z/) { |_| $1 ? " (#{$1})" : '' } + link = node.at_css('a:not([title])') + name = link.content if ADD_SUB_ENTRIES_KEYWORDS.include?(node.at_css('.keyword').try(:content)) node.css('.subs > li').each do |sub_node| sub_link = sub_node.at_css('a') next unless sub_link['href'].start_with?('#') - sub_name = sub_node.content.strip - sub_name.remove! %r{\s.*} - sub_name.prepend "#{name} " + sub_name = sub_link.content + sub_name << " (#{name})" entries << [sub_name, sub_link['href'].remove('#')] end end From 038869aa675511c4f0625bd4e45ed59f8af2973f Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 20:19:14 -0500 Subject: [PATCH 0054/2496] Improve React docs --- lib/docs/filters/react/clean_html.rb | 7 ++++++- lib/docs/filters/react/entries.rb | 22 +++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/lib/docs/filters/react/clean_html.rb b/lib/docs/filters/react/clean_html.rb index 274bc5503c..ec40dbe0e8 100644 --- a/lib/docs/filters/react/clean_html.rb +++ b/lib/docs/filters/react/clean_html.rb @@ -8,7 +8,7 @@ def call at_css('h1').content = 'React Documentation' end - css('header', 'div[class^="css-"]', '.gatsby-resp-image-link span').each do |node| + css('header', 'div[class^="css-"]', '.gatsby-resp-image-link span', 'div.scary').each do |node| node.before(node.children).remove end @@ -24,6 +24,11 @@ def call css('a').remove_attr('rel').remove_attr('target').remove_attr('class').remove_attr('style') css('img').remove_attr('style').remove_attr('srcset').remove_attr('sizes').remove_attr('class') + css('[class*="css-"]').each do |node| + node['class'] = node['class'].sub(/css-[^ ]+(\b|$)/, '') + node.delete 'class' if node['class'] == '' + end + doc end end diff --git a/lib/docs/filters/react/entries.rb b/lib/docs/filters/react/entries.rb index 975f171b51..d2c54826d9 100644 --- a/lib/docs/filters/react/entries.rb +++ b/lib/docs/filters/react/entries.rb @@ -2,22 +2,30 @@ module Docs class React class EntriesFilter < Docs::EntriesFilter def get_name - at_css('article h1').content + at_css('article h1').content.sub(' (Experimental)', '') end def get_type + return 'API Reference' if slug == 'legacy-context' + return 'Glossary' if slug == 'glossary' link = css("nav a[href='#{result[:path].split('/').last}']").last return 'Miscellaneous' unless link type = link.ancestors('ul').last.previous_element.content type.remove! %r{\s*\(.*\)} - type + if type == 'Concurrent Mode' + type + ' (Experimental)' # TODO: Remove when CM is stable + else + type + end end def additional_entries entries = [] - css('article h3 code, article h4 code').each do |node| - next if node.previous.try(:content).present? + is_glossary = slug == 'glossary' + css(is_glossary ? 'article h2, article h3' : 'article h3 code, article h4 code').each do |node| + next if !is_glossary && node.previous.try(:content).present? + next if slug == 'testing-recipes' name = node.content.strip # name.remove! %r{[#\(\)]} # name.remove! %r{\w+\:} @@ -29,10 +37,14 @@ def additional_entries 'Reference: React' elsif slug == 'hooks-reference' 'Hooks' + elsif slug == 'test-utils' + 'Reference: Test Utilities' + elsif slug == 'glossary' + 'Glossary' else 'Reference' end - entries << [name, node.parent['id'], type] + entries << [name, node['id'] || node.ancestors('[id]').first['id'], type] end entries From 55332ca7e9fc18483620df13c0bb61175a91ec77 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 22:32:58 -0500 Subject: [PATCH 0055/2496] Highlight table rows that are :target --- assets/stylesheets/components/_content.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/stylesheets/components/_content.scss b/assets/stylesheets/components/_content.scss index c8b1863c2b..18c5622b4c 100644 --- a/assets/stylesheets/components/_content.scss +++ b/assets/stylesheets/components/_content.scss @@ -377,7 +377,7 @@ ._note-green { @extend %note-green; } ._label { @extend %label; } ._code { @extend %code; } -._highlight { background: var(--highlightBackground) !important; } +._highlight, ._highlight > td { background: var(--highlightBackground) !important; } ._table { width: 100%; } ._mobile ._table { overflow-x: auto; } From 40df521a7cef562aa72a01a59aa58d92828c906e Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Fri, 31 Jan 2020 16:15:59 -0500 Subject: [PATCH 0056/2496] Skip broken page in Bootstrap 4 --- lib/docs/scrapers/bootstrap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/bootstrap.rb b/lib/docs/scrapers/bootstrap.rb index 06ba3baec6..140c9f759b 100644 --- a/lib/docs/scrapers/bootstrap.rb +++ b/lib/docs/scrapers/bootstrap.rb @@ -23,7 +23,7 @@ class Bootstrap < UrlScraper html_filters.push 'bootstrap/entries_v4', 'bootstrap/clean_html_v4' - options[:only_patterns] = [/\Agetting-started\//, /\Alayout\//, /\Acontent\//, /\Acomponents\//, /\Autilities\//, /\Amigration\//] + options[:only_patterns] = [/\Agetting-started\//, /\Alayout\//, /\Acontent\//, /\Acomponents\//, /\Autilities\/.+/, /\Amigration\//] end version '3' do From 4e1d561c078aba3f48c473987a86458af8910826 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:04:16 +0100 Subject: [PATCH 0057/2496] bundle update ffi --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 473542b632..a73db0362e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM eventmachine (1.2.7) execjs (2.7.0) exifr (1.3.6) - ffi (1.11.1) + ffi (1.12.2) fspath (3.1.2) highline (2.0.3) html-pipeline (2.12.0) From b1a143440f48d71edb78039e94e17f6d2e7dcb2c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:17:09 +0100 Subject: [PATCH 0058/2496] Fix get_latest_version for various scrapers --- lib/docs/scrapers/ansible.rb | 2 +- lib/docs/scrapers/dart.rb | 2 +- lib/docs/scrapers/gnuplot.rb | 6 ++++++ lib/docs/scrapers/pandas.rb | 4 +--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 6826b393f3..5a19e39344 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -71,7 +71,7 @@ class Ansible < UrlScraper def get_latest_version(opts) doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts) - doc.at_css('.DocSiteProduct-CurrentVersion').content.strip + doc.at_css('.version').content.strip end end end diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index e3b8c28998..4522762b1a 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -33,7 +33,7 @@ class Dart < FileScraper def get_latest_version(opts) doc = fetch_doc('https://api.dartlang.org/', opts) label = doc.at_css('footer > span').content.strip - label.sub(/Dart /, '') + label.sub(/Dart\s*/, '') end end end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index 0682ade4b3..d6d5b1955a 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -37,5 +37,11 @@ class Gnuplot < FileScraper Distributed under the gnuplot license (rights to distribute modified versions are withheld). HTML + def get_latest_version(opts) + doc = fetch_doc('http://www.gnuplot.info/download.html', opts) + label = doc.at_css('h2').content.strip + label.sub(/[^0-9.]*/, '') + end + end end diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index e333da7f6a..fedba47b26 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -62,9 +62,7 @@ class Pandas < UrlScraper end def get_latest_version(opts) - doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts) - label = doc.at_css('.body > .section > p').content - label.scan(/Version: ([0-9.]+)/)[0][0] + get_latest_github_release('pandas-dev', 'pandas', opts) end end end From c25fbb4b3c8d61802fca38e175373ce26b491b09 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:23:56 +0100 Subject: [PATCH 0059/2496] doc.fetch: read GITHUB_TOKEN also from ENV --- lib/docs/core/doc.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/docs/core/doc.rb b/lib/docs/core/doc.rb index a5268300db..9461120821 100644 --- a/lib/docs/core/doc.rb +++ b/lib/docs/core/doc.rb @@ -220,6 +220,8 @@ def fetch(url, opts) if opts.key?(:github_token) and url.start_with?('https://api.github.com/') headers['Authorization'] = "token #{opts[:github_token]}" + elsif ENV['GITHUB_TOKEN'] and url.start_with?('https://api.github.com/') + headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}" end opts[:logger].debug("Fetching #{url}") From 0124b10ade2217710897acfbad8864048f1a81a5 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 10 Feb 2020 13:00:34 -0500 Subject: [PATCH 0060/2496] Fix entries for Julia base pages --- lib/docs/filters/julia/entries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/julia/entries.rb b/lib/docs/filters/julia/entries.rb index f9774394aa..79696a6c57 100644 --- a/lib/docs/filters/julia/entries.rb +++ b/lib/docs/filters/julia/entries.rb @@ -14,7 +14,7 @@ def get_type end def additional_entries - return [] unless slug.start_with?('stdlib') + return [] if slug.start_with?('manual') entries = [] used_names = {} From 4ea57bd6bd85a20558b33537fe6661fa7e73bf86 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 10 Feb 2020 14:46:15 -0500 Subject: [PATCH 0061/2496] Update Django file scraper ref --- docs/file-scrapers.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 8bbc4afe08..855c0a3fb9 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -25,6 +25,9 @@ and put it in `/path/to/devdocs/docs/` Go to https://docs.djangoproject.com/, select the version from the bubble in the bottom-right corner, then download the HTML version from the sidebar. +URL: `https://media.djangoproject.com/docs/django-docs-$VERSION-en.zip` + + ## Erlang Go to https://www.erlang.org/downloads and download the HTML documentation file. From cb790e95abe398e56392441abb56def3f64ab989 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 10 Feb 2020 14:46:45 -0500 Subject: [PATCH 0062/2496] [django] Clean up the multi-platform console blocks --- lib/docs/filters/django/clean_html.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/docs/filters/django/clean_html.rb b/lib/docs/filters/django/clean_html.rb index 30a0d9e97b..03f8c2babd 100644 --- a/lib/docs/filters/django/clean_html.rb +++ b/lib/docs/filters/django/clean_html.rb @@ -4,6 +4,14 @@ class CleanHtmlFilter < Filter def call @doc = at_css('.yui-g') + css('.console-block').each do |node| + node.css('input', 'label').remove + node.css('section').each do |sec| + sec.before(sec.children).remove + end + node.before(node.children).remove + end + doc end end From d1167597c0351abbcda9163bcb02047a512025a2 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Mon, 10 Feb 2020 14:46:51 -0500 Subject: [PATCH 0063/2496] Update the Django versions --- lib/docs/scrapers/django.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/django.rb b/lib/docs/scrapers/django.rb index c6f3e042de..7b17db3afc 100644 --- a/lib/docs/scrapers/django.rb +++ b/lib/docs/scrapers/django.rb @@ -35,12 +35,12 @@ class Django < FileScraper HTML version '3.0' do - self.release = '3.0.2' + self.release = '3.0.3' self.base_url = 'https://docs.djangoproject.com/en/3.0/' end version '2.2' do - self.release = '2.2.9' + self.release = '2.2.10' self.base_url = 'https://docs.djangoproject.com/en/2.2/' end @@ -55,7 +55,7 @@ class Django < FileScraper end version '1.11' do - self.release = '1.11.27' + self.release = '1.11.28' self.base_url = 'https://docs.djangoproject.com/en/1.11/' end From e75655ac086c2f1c9dd9d05dc6c7b81ba45e5748 Mon Sep 17 00:00:00 2001 From: Mark Knol Date: Thu, 20 Feb 2020 11:41:43 +0100 Subject: [PATCH 0064/2496] Update haxe.rb --- lib/docs/scrapers/haxe.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 2dbab01ad8..892085be3a 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '3.4.7' + self.release = '4.0.5' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries' @@ -10,7 +10,7 @@ class Haxe < UrlScraper options[:container] = '.span9' options[:attribution] = <<-HTML - © 2005–2018 Haxe Foundation
    + © 2005–2020 Haxe Foundation
    Licensed under a MIT license. HTML @@ -20,7 +20,7 @@ class Haxe < UrlScraper code: 'https://github.com/HaxeFoundation/haxe' } - options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i] + options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i] end version 'C++' do @@ -67,6 +67,10 @@ class Haxe < UrlScraper self.base_url = 'https://api.haxe.org/python/' end + version 'Eval' do + self.base_url = 'https://api.haxe.org/eval/' + end + def get_latest_version(opts) doc = fetch_doc('https://api.haxe.org/', opts) label = doc.at_css('.container.main-content h1 > small').content From 89ca063d86401efb18036acffc868414846bd3d9 Mon Sep 17 00:00:00 2001 From: Daniel Worrall Date: Fri, 6 Mar 2020 21:12:38 +0000 Subject: [PATCH 0065/2496] Update crystal 0.33 --- lib/docs/scrapers/crystal.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 7813b848ab..12e131dd9a 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -25,6 +25,32 @@ class Crystal < UrlScraper end } + version '0.33' do + self.release = '0.33.0' + self.root_path = "api/#{release}/index.html" + + options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] + options[:skip_patterns] = [/debug/i] + + options[:replace_paths] = { + "api/#{release}/" => "api/#{release}/index.html", + 'docs/' => 'docs/index.html' + } + end + + version '0.32' do + self.release = '0.32.1' + self.root_path = "api/#{release}/index.html" + + options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] + options[:skip_patterns] = [/debug/i] + + options[:replace_paths] = { + "api/#{release}/" => "api/#{release}/index.html", + 'docs/' => 'docs/index.html' + } + end + version '0.31' do self.release = '0.31.1' self.root_path = "api/#{release}/index.html" From 4eb4bfe5da24db5a3f5041ca449cf75d7c70b6f5 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Sun, 22 Mar 2020 10:21:16 -0400 Subject: [PATCH 0066/2496] Update Haskell to 8.8.3 --- lib/docs/scrapers/haskell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/haskell.rb b/lib/docs/scrapers/haskell.rb index fb118851c1..b668f1c2d8 100755 --- a/lib/docs/scrapers/haskell.rb +++ b/lib/docs/scrapers/haskell.rb @@ -57,7 +57,7 @@ class Haskell < UrlScraper end version '8' do - self.release = '8.6.1' + self.release = '8.8.3' self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/" end From c55dc57e64501551c7d8868ca9f3140c58a2c071 Mon Sep 17 00:00:00 2001 From: Ignas Kiela Date: Thu, 2 Apr 2020 20:08:57 +0300 Subject: [PATCH 0067/2496] Update Godot versions Godot 3.2 released Jan 29th After discussion in IRC remove 3.0 and 3.1 docs as almost nobody uses 3.0 anymore and 3.2 docs are mostly compatable with 3.1 --- lib/docs/scrapers/godot.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/docs/scrapers/godot.rb b/lib/docs/scrapers/godot.rb index 1ccf693f14..e5c50154d6 100644 --- a/lib/docs/scrapers/godot.rb +++ b/lib/docs/scrapers/godot.rb @@ -28,18 +28,13 @@ class Godot < UrlScraper end end - version '3.1' do - self.release = '3.1.1' - self.base_url = "http://docs.godotengine.org/en/#{self.version}/" - end - - version '3.0' do - self.release = '3.0.6' + version '3.2' do + self.release = '3.2.1' self.base_url = "http://docs.godotengine.org/en/#{self.version}/" end version '2.1' do - self.release = '2.1' + self.release = '2.1.6' self.base_url = "http://docs.godotengine.org/en/#{self.version}/" end From 6c9f765c046beb851feaa86953b1ff194bd9eb09 Mon Sep 17 00:00:00 2001 From: Daniel Worrall Date: Mon, 11 May 2020 21:24:48 +0100 Subject: [PATCH 0068/2496] Add crystal 0.34 --- lib/docs/scrapers/crystal.rb | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 12e131dd9a..0a14ab4372 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -25,21 +25,8 @@ class Crystal < UrlScraper end } - version '0.33' do - self.release = '0.33.0' - self.root_path = "api/#{release}/index.html" - - options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] - options[:skip_patterns] = [/debug/i] - - options[:replace_paths] = { - "api/#{release}/" => "api/#{release}/index.html", - 'docs/' => 'docs/index.html' - } - end - - version '0.32' do - self.release = '0.32.1' + version '0.34' do + self.release = '0.34.0' self.root_path = "api/#{release}/index.html" options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] @@ -51,21 +38,8 @@ class Crystal < UrlScraper } end - version '0.31' do - self.release = '0.31.1' - self.root_path = "api/#{release}/index.html" - - options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] - options[:skip_patterns] = [/debug/i] - - options[:replace_paths] = { - "api/#{release}/" => "api/#{release}/index.html", - 'docs/' => 'docs/index.html' - } - end - - version '0.30' do - self.release = '0.30.1' + version '0.33' do + self.release = '0.33.0' self.root_path = "api/#{release}/index.html" options[:only_patterns] = [/\Adocs\//, /\Aapi\/#{release}\//] From f4b66063ac8a235b228a82b5bfd318bc03b05c8a Mon Sep 17 00:00:00 2001 From: Aymen Hosni Date: Sat, 16 May 2020 03:00:17 +0100 Subject: [PATCH 0069/2496] Add documentation for Spring Boot --- .../templates/pages/about_tmpl.coffee | 5 ++++ lib/docs/filters/spring_boot/clean_html.rb | 15 ++++++++++ lib/docs/filters/spring_boot/entries.rb | 21 +++++++++++++ lib/docs/scrapers/spring_boot.rb | 28 ++++++++++++++++++ public/icons/docs/spring_boot/16.png | Bin 0 -> 2781 bytes public/icons/docs/spring_boot/16@2x.png | Bin 0 -> 4929 bytes public/icons/docs/spring_boot/SOURCE | 1 + 7 files changed, 70 insertions(+) create mode 100644 lib/docs/filters/spring_boot/clean_html.rb create mode 100644 lib/docs/filters/spring_boot/entries.rb create mode 100644 lib/docs/scrapers/spring_boot.rb create mode 100644 public/icons/docs/spring_boot/16.png create mode 100644 public/icons/docs/spring_boot/16@2x.png create mode 100644 public/icons/docs/spring_boot/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8ac93ed428..b86ab6e6cc 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -821,5 +821,10 @@ credits = [ '2008-2017 by Yii Software LLC', 'BSD', 'https://raw.githubusercontent.com/yiisoft/yii/master/LICENSE' + ], [ + 'Spring Boot', + '2002 - 2020 Pivotal, Inc. All Rights Reserved.', + 'Apache License 2.0', + 'https://raw.githubusercontent.com/spring-projects/spring-boot/master/LICENSE.txt' ] ] diff --git a/lib/docs/filters/spring_boot/clean_html.rb b/lib/docs/filters/spring_boot/clean_html.rb new file mode 100644 index 0000000000..eb1639d335 --- /dev/null +++ b/lib/docs/filters/spring_boot/clean_html.rb @@ -0,0 +1,15 @@ +module Docs + class SpringBoot + class CleanHtmlFilter < Filter + def call + + css('pre').each do |node| + language = node.children.first['data-lang'] if node.children.first.name == 'code' + node['data-language'] = language + end + + doc + end + end + end +end diff --git a/lib/docs/filters/spring_boot/entries.rb b/lib/docs/filters/spring_boot/entries.rb new file mode 100644 index 0000000000..f680902408 --- /dev/null +++ b/lib/docs/filters/spring_boot/entries.rb @@ -0,0 +1,21 @@ +module Docs + class SpringBoot + class EntriesFilter < Docs::EntriesFilter + + def get_type + slug.gsub('-', ' ').capitalize + end + + def additional_entries + css('td a[href], li a[href]').each_with_object [] do |node, entries| + next if root_page? + next if node['href'].start_with?('http') + name = node.content.strip + id = node['href'].remove('#') + next if id.blank? + entries << [name, id, get_type] + end + end + end + end +end diff --git a/lib/docs/scrapers/spring_boot.rb b/lib/docs/scrapers/spring_boot.rb new file mode 100644 index 0000000000..10792cb90d --- /dev/null +++ b/lib/docs/scrapers/spring_boot.rb @@ -0,0 +1,28 @@ +module Docs + class SpringBoot < UrlScraper + self.name = 'Spring Boot' + self.slug = 'spring_boot' + self.type = 'simple' + self.release = '2.3.0.RELEASE' + self.base_url = 'https://docs.spring.io/spring-boot/docs/current/reference/html/' + self.root_path = "index.html" + self.links = { + home: 'https://spring.io/', + code: 'https://github.com/spring-projects/spring-boot' + } + + html_filters.push 'spring_boot/entries', 'spring_boot/clean_html' + + options[:skip_patterns] = [/legal/] + + options[:attribution] = <<-HTML + Copyright © 2002 - 2020 Pivotal, Inc. All Rights Reserved. + HTML + + def get_latest_version(opts) + doc = fetch_doc('https://docs.spring.io/spring-boot/docs/current/reference/html/legal.html', opts) + table = doc.at_css('#content p').inner_text + end + + end +end diff --git a/public/icons/docs/spring_boot/16.png b/public/icons/docs/spring_boot/16.png new file mode 100644 index 0000000000000000000000000000000000000000..8668b90404ad6f76e51eeff3ba4b3d34ec2e3615 GIT binary patch literal 2781 zcmV<33L^E1P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1bvvg9ZX{O1&N1dsrUo&+=XtSL=V{#B6NDi~%llRG zS)VZ;K0df)xbi%1^vsZ+joiKQ`tg)J`|VLljME->{%n-`?!=_>sA@SI)w6J^a&CXC zwVU~Fo(2RcwE#g()Y-9JPu&{uzBBHCr{joqc8y?-+0EGufIJ=V2GBkN^aS$NGq331 zy%+E)pK*S{G9HZ3`RjxWFXMcRp+~`dYedfzTCKbt=iFm79i#8lWgmfPJQlUUcGoso zSO7V%&mu0t9nhC`C0uH=t)RTwY74IFk|VG(jPtI!?1t;Bt*$~vPn`rUQ6*ku%0h`M zICAXg6)@mJpavz$GrYwJDNWhlduK!x}B7<~q4q!>AFtws13? zgvl8gBk#btOa@@kG&!^Cyr;?B;^wG8jWeAjG9^Gs^_sT~M^t2{qS% zZozCB%C2td8H&~cdX5|fwLoESl#-X)iw_QUK#Q(dJG+RdZg_388wOQLc8v!6*VcSC z@m0$Q0w2;+G*|dq*&>qy)VddpoVf}2X-(@qK?l9z_|ls17QD4_Nk+PFwB-oZp0iog zeQ>t@Xgpx#Nb6ha>2TjuHo^XuGWVuR84IgeL+Z+#q+;NhDet$~F(ZdQt;mQf`-NP( znEb3Ywk^r1pVDU><)spGu3j7gh>cINt@aATCSWu?z(PP+%UW$#x3wvfB5zKiYK`Ld zktAirg;&MQtzfxceC!w4-pGseOIM7uMd= zW$txr11C=v)8%dH1?5lLPR<%b49$IrNEqMF;?H!L`eR}F2Wl$PY0Ti z5RFe4@ype^HgciP3Z=_23C;3Bq2EUgwhq4?tF*$+vh;1rmE!`${2+?FMHSk(K{V3B z=E%d2%0XM(bd9~lajJv2-IVH4_Fi_4P`*zrk{U_A48$N$_Cu%r&U#;4m$n;3iqQxk zR$zV|yc~)w1Rr5BIK=wZM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QcQohpndI|Z!iDAg`djfAO*do(Ah2tz1}LD=+K?3^|Igo@o3PiWKDYZ) zIkPPklR$lDSEgs&+J&8{_~lKbTc{NEhX>bmvNW!*w7)646YT=<&q|)D(v49U_(H_= zP87zPbGv%AG2$^-`I`reQ#x51=l;TNZHeunfB*YtXMC>!RQ(Fy|8ZsJX7Q&X7Z?%b z((>y3sjIin>ci?BOVv5*-Kg$u+Q*U3lag)f64!*J;+M7X@E)W0zP2~=Bj=}=e*aMb z4iD{Wey97RK_lka literal 0 HcmV?d00001 diff --git a/public/icons/docs/spring_boot/16@2x.png b/public/icons/docs/spring_boot/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..cfaf4d833017ab93f49dd8946b76321908b9f09c GIT binary patch literal 4929 zcmV-H6Ta+;P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3#rlH58Dg#Ysta|DqfxEzOT#N1$xKOZP{^=A9I zC#K~psU(U7kU%17xBm0*?f%7|T;+06b4fL&i@#W74ULO(-GB9b`zxOB^B0~+{Qh*` zy&eQ^31_)~=Jt$l+}HOP-q!H_^L*`DJLwoMamsqAJMqK>zf!8nh<+V)sxUjq|3ZEa$aJ6sl zJfFR1*?ZmIwU~%#dNS$++rLf2z)r~Jyp}jJALTlqqjD6M89+X-adnR2s}G>EosWL{ z=C@zxJp91K7*@!fLl{BMy&^f(FaX9&w8QU^rOK27W+N;o!tL;~#h-QSS#S8l%F{D6 zcqa3_^4r7x>ETZfxA(9R`K!EQg(Q{Fitt&CFEV6&jf^swH0H$fWVc!s89aNA!P4~V*#LsM~U~BVE_GfI+kb>QYn*c&3Nd}uL4X|QV@+Zea4mA~xs+u%waay${Nik_k zDJLVjmLuk%r1yiiJbfuM7S#`Bdu5HrOlGvg>Xy z)E-p79X~+LKd6O+l#RR@K4A&gYN%>OZVs{l~luW5c zecaM@`IW!9{J+NN{Y(kSOzJeoI!m17LcreIDi-%^4b5#=%%3H75{%~1%h=@j&SXXC z*DiG_ZsoCdRCh-{cm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 insertion(+), 1 deletion(-) diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index 4e7cbcced1..65f6298075 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -119,7 +119,7 @@ class DocsCLI < Thor puts 'Done' end - desc 'download ( ... | --default | --installed)', 'Download documentations' + desc 'download ( ... | --default | --installed | --all)', 'Download documentations' option :default, type: :boolean option :installed, type: :boolean option :all, type: :boolean From fd5b25c92adb80c2b39431f8fc9d993d99886b8d Mon Sep 17 00:00:00 2001 From: Rick Mac Gillis <8941225+rickmacgillis@users.noreply.github.com> Date: Mon, 18 May 2020 09:07:50 -0400 Subject: [PATCH 0071/2496] Document thor docs:download --all --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63d31ddcea..cecd562787 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ bundle exec rackup Finally, point your browser at [localhost:9292](http://localhost:9292) (the first request will take a few seconds to compile the assets). You're all set. -The `thor docs:download` command is used to download pre-generated documentations from DevDocs's servers (e.g. `thor docs:download html css`). You can see the list of available documentations and versions by running `thor docs:list`. To update all downloaded documentations, run `thor docs:download --installed`. +The `thor docs:download` command is used to download pre-generated documentations from DevDocs's servers (e.g. `thor docs:download html css`). You can see the list of available documentations and versions by running `thor docs:list`. To update all downloaded documentations, run `thor docs:download --installed`. To download and install all documentation this project has available, run `thor docs:download --all`. **Note:** there is currently no update mechanism other than `git pull origin master` to update the code and `thor docs:download --installed` to download the latest version of the docs. To stay informed about new releases, be sure to [watch](https://github.com/freeCodeCamp/devdocs/subscription) this repository. From 7ce6008b91896c3162047cf2169bb0d66f4152a3 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sat, 23 May 2020 12:47:37 -0700 Subject: [PATCH 0072/2496] Add ruby 2.7.1 docs --- lib/docs/scrapers/rdoc/ruby.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/docs/scrapers/rdoc/ruby.rb b/lib/docs/scrapers/rdoc/ruby.rb index 3a2b8b7619..8dab6bf420 100644 --- a/lib/docs/scrapers/rdoc/ruby.rb +++ b/lib/docs/scrapers/rdoc/ruby.rb @@ -69,6 +69,10 @@ class Ruby < Rdoc Licensed under their own licenses. HTML + version '2.7' do + self.release = '2.7.1' + end + version '2.6' do self.release = '2.6.3' end From db0746c16ebc2cae9499011abb79e8f918f2ac54 Mon Sep 17 00:00:00 2001 From: Antoine Pietri Date: Sun, 24 May 2020 11:42:28 +0200 Subject: [PATCH 0073/2496] Add documentation for OCaml --- .../templates/pages/about_tmpl.coffee | 5 + assets/javascripts/vendor/prism.js | 5698 +++++++++-------- docs/file-scrapers.md | 12 + lib/docs/filters/ocaml/clean_html.rb | 13 + lib/docs/filters/ocaml/entries.rb | 65 + lib/docs/scrapers/ocaml.rb | 28 + public/icons/docs/ocaml/16.png | Bin 0 -> 606 bytes public/icons/docs/ocaml/16@2x.png | Bin 0 -> 1183 bytes public/icons/docs/ocaml/SOURCE | 2 + 9 files changed, 3132 insertions(+), 2691 deletions(-) create mode 100644 lib/docs/filters/ocaml/clean_html.rb create mode 100644 lib/docs/filters/ocaml/entries.rb create mode 100644 lib/docs/scrapers/ocaml.rb create mode 100644 public/icons/docs/ocaml/16.png create mode 100644 public/icons/docs/ocaml/16@2x.png create mode 100644 public/icons/docs/ocaml/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8ac93ed428..1b8082dcfd 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -541,6 +541,11 @@ credits = [ '2005-2019 NumPy Developers', 'BSD', 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt' + ], [ + 'OCaml', + '1995-2020 Inria', + 'CC BY-SA', + 'https://ocaml.org/docs/' ], [ 'Octave', '1996-2018 John W. Eaton', diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js index 86fbb0743b..608f999c94 100644 --- a/assets/javascripts/vendor/prism.js +++ b/assets/javascripts/vendor/prism.js @@ -1,12 +1,12 @@ -/* PrismJS 1.19.0 -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+coffeescript+crystal+d+dart+django+elixir+erlang+go+groovy+java+json+julia+kotlin+lua+markup-templating+matlab+nginx+nim+perl+php+python+jsx+ruby+rust+scss+shell-session+sql+typescript+yaml */ +/* PrismJS 1.20.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+coffeescript+crystal+d+dart+django+elixir+erlang+go+groovy+java+json+julia+kotlin+lua+markup-templating+matlab+nginx+nim+ocaml+perl+php+python+jsx+ruby+rust+scss+shell-session+sql+typescript+yaml */ var _self = (typeof window !== 'undefined') - ? window // if in browser - : ( - (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) - ? self // if in worker - : {} // if in node js - ); + ? window // if in browser + : ( + (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) + ? self // if in worker + : {} // if in node js + ); /** * Prism: Lightweight, robust, elegant syntax highlighting @@ -22,591 +22,695 @@ var uniqueId = 0; var _ = { - manual: _self.Prism && _self.Prism.manual, - disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, - util: { - encode: function (tokens) { - if (tokens instanceof Token) { - return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); - } else if (Array.isArray(tokens)) { - return tokens.map(_.util.encode); - } else { - return tokens.replace(/&/g, '&').replace(/ text.length) { - // Something went terribly wrong, ABORT, ABORT! - return; - } - - if (str instanceof Token) { - continue; - } - - if (greedy && i != strarr.length - 1) { - pattern.lastIndex = pos; - var match = pattern.exec(text); - if (!match) { - break; - } - - var from = match.index + (lookbehind && match[1] ? match[1].length : 0), - to = match.index + match[0].length, - k = i, - p = pos; - - for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { - p += strarr[k].length; - // Move the index i to the element in strarr that is closest to from - if (from >= p) { - ++i; - pos = p; - } - } - - // If strarr[i] is a Token, then the match starts inside another Token, which is invalid - if (strarr[i] instanceof Token) { - continue; - } - - // Number of tokens to delete and replace with the new match - delNum = k - i; - str = text.slice(pos, p); - match.index -= pos; - } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str), - delNum = 1; - } - - if (!match) { - if (oneshot) { - break; - } - - continue; - } - - if(lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; - } - - var from = match.index + lookbehindLength, - match = match[0].slice(lookbehindLength), - to = from + match.length, - before = str.slice(0, from), - after = str.slice(to); - - var args = [i, delNum]; + manual: _self.Prism && _self.Prism.manual, + disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, + util: { + encode: function encode(tokens) { + if (tokens instanceof Token) { + return new Token(tokens.type, encode(tokens.content), tokens.alias); + } else if (Array.isArray(tokens)) { + return tokens.map(encode); + } else { + return tokens.replace(/&/g, '&').replace(/' + env.content + ''; +}; - run: function (name, env) { - var callbacks = _.hooks.all[name]; +/** + * @param {string} text + * @param {LinkedList} tokenList + * @param {any} grammar + * @param {LinkedListNode} startNode + * @param {number} startPos + * @param {boolean} [oneshot=false] + * @param {string} [target] + */ +function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + + for (var j = 0; j < patterns.length; ++j) { + if (target && target == token + ',' + j) { + return; + } + + var pattern = patterns[j], + inside = pattern.inside, + lookbehind = !!pattern.lookbehind, + greedy = !!pattern.greedy, + lookbehindLength = 0, + alias = pattern.alias; + + if (greedy && !pattern.pattern.global) { + // Without the global flag, lastIndex won't work + var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; + pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); + } + + pattern = pattern.pattern || pattern; + + for ( // iterate the token list and keep track of the current token/string position + var currentNode = startNode.next, pos = startPos; + currentNode !== tokenList.tail; + pos += currentNode.value.length, currentNode = currentNode.next + ) { + + var str = currentNode.value; + + if (tokenList.length > text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + + if (str instanceof Token) { + continue; + } + + var removeCount = 1; // this is the to parameter of removeBetween + + if (greedy && currentNode != tokenList.tail.prev) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + + var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var to = match.index + match[0].length; + var p = pos; + + // find the node that contains the match + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + // adjust pos (and p) + p -= currentNode.value.length; + pos = p; + + // the current node is a Token, then the match starts inside another Token, which is invalid + if (currentNode.value instanceof Token) { + continue; + } + + // find the last node which is affected by this match + for ( + var k = currentNode; + k !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy)); + k = k.next + ) { + removeCount++; + p += k.value.length; + } + removeCount--; + + // replace with the new match + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str); + } + + if (!match) { + if (oneshot) { + break; + } + + continue; + } + + if (lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + + var removeFrom = currentNode.prev; + + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + + removeRange(tokenList, removeFrom, removeCount); + + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); + currentNode = addAfter(tokenList, removeFrom, wrapped); + + if (after) { + addAfter(tokenList, currentNode, after); + } + + + if (removeCount > 1) + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); + + if (oneshot) + break; + } + } + } +} - if (!callbacks || !callbacks.length) { - return; - } +/** + * @typedef LinkedListNode + * @property {T} value + * @property {LinkedListNode | null} prev The previous node. + * @property {LinkedListNode | null} next The next node. + * @template T + */ - for (var i=0, callback; callback = callbacks[i++];) { - callback(env); - } - } - }, +/** + * @template T + */ +function LinkedList() { + /** @type {LinkedListNode} */ + var head = { value: null, prev: null, next: null }; + /** @type {LinkedListNode} */ + var tail = { value: null, prev: head, next: null }; + head.next = tail; + + /** @type {LinkedListNode} */ + this.head = head; + /** @type {LinkedListNode} */ + this.tail = tail; + this.length = 0; +} - Token: Token -}; +/** + * Adds a new node with the given value to the list. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {T} value + * @returns {LinkedListNode} The added node. + * @template T + */ +function addAfter(list, node, value) { + // assumes that node != list.tail && values.length >= 0 + var next = node.next; -_self.Prism = _; + var newNode = { value: value, prev: node, next: next }; + node.next = newNode; + next.prev = newNode; + list.length++; -function Token(type, content, alias, matchedStr, greedy) { - this.type = type; - this.content = content; - this.alias = alias; - // Copy of the full string this token was created from - this.length = (matchedStr || '').length|0; - this.greedy = !!greedy; + return newNode; +} +/** + * Removes `count` nodes after the given node. The given node will not be removed. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {number} count + * @template T + */ +function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; +} +/** + * @param {LinkedList} list + * @returns {T[]} + * @template T + */ +function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; } -Token.stringify = function(o, language) { - if (typeof o == 'string') { - return o; - } - - if (Array.isArray(o)) { - return o.map(function(element) { - return Token.stringify(element, language); - }).join(''); - } - - var env = { - type: o.type, - content: Token.stringify(o.content, language), - tag: 'span', - classes: ['token', o.type], - attributes: {}, - language: language - }; - - if (o.alias) { - var aliases = Array.isArray(o.alias) ? o.alias : [o.alias]; - Array.prototype.push.apply(env.classes, aliases); - } - - _.hooks.run('wrap', env); - - var attributes = Object.keys(env.attributes).map(function(name) { - return name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"'; - }).join(' '); - - return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + (attributes ? ' ' + attributes : '') + '>' + env.content + ''; -}; if (!_self.document) { - if (!_self.addEventListener) { - // in Node.js - return _; - } - - if (!_.disableWorkerMessageHandler) { - // In worker - _self.addEventListener('message', function (evt) { - var message = JSON.parse(evt.data), - lang = message.language, - code = message.code, - immediateClose = message.immediateClose; - - _self.postMessage(_.highlight(code, _.languages[lang], lang)); - if (immediateClose) { - _self.close(); - } - }, false); - } - - return _; + if (!_self.addEventListener) { + // in Node.js + return _; + } + + if (!_.disableWorkerMessageHandler) { + // In worker + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), + lang = message.language, + code = message.code, + immediateClose = message.immediateClose; + + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + + return _; } //Get current script and highlight var script = _.util.currentScript(); if (script) { - _.filename = script.src; + _.filename = script.src; + + if (script.hasAttribute('data-manual')) { + _.manual = true; + } +} - if (script.hasAttribute('data-manual')) { - _.manual = true; - } +function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); + } } if (!_.manual) { - function highlightAutomaticallyCallback() { - if (!_.manual) { - _.highlightAll(); - } - } - - // If the document state is "loading", then we'll use DOMContentLoaded. - // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the - // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they - // might take longer one animation frame to execute which can create a race condition where only some plugins have - // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. - // See https://github.com/PrismJS/prism/issues/2102 - var readyState = document.readyState; - if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { - document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); - } else { - if (window.requestAnimationFrame) { - window.requestAnimationFrame(highlightAutomaticallyCallback); - } else { - window.setTimeout(highlightAutomaticallyCallback, 16); - } - } + // If the document state is "loading", then we'll use DOMContentLoaded. + // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the + // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they + // might take longer one animation frame to execute which can create a race condition where only some plugins have + // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. + // See https://github.com/PrismJS/prism/issues/2102 + var readyState = document.readyState; + if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { + document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); + } else { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(highlightAutomaticallyCallback); + } else { + window.setTimeout(highlightAutomaticallyCallback, 16); + } + } } return _; @@ -614,642 +718,724 @@ return _; })(_self); if (typeof module !== 'undefined' && module.exports) { - module.exports = Prism; + module.exports = Prism; } // hack for components to work correctly in node.js if (typeof global !== 'undefined') { - global.Prism = Prism; + global.Prism = Prism; } ; Prism.languages.markup = { - 'comment': //, - 'prolog': /<\?[\s\S]+?\?>/, - 'doctype': { - pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, - greedy: true - }, - 'cdata': //i, - 'tag': { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, - greedy: true, - inside: { - 'tag': { - pattern: /^<\/?[^\s>\/]+/i, - inside: { - 'punctuation': /^<\/?/, - 'namespace': /^[^\s>\/:]+:/ - } - }, - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, - inside: { - 'punctuation': [ - /^=/, - { - pattern: /^(\s*)["']|["']$/, - lookbehind: true - } - ] - } - }, - 'punctuation': /\/?>/, - 'attr-name': { - pattern: /[^\s>\/]+/, - inside: { - 'namespace': /^[^\s>\/:]+:/ - } - } - - } - }, - 'entity': /&#?[\da-z]{1,8};/i + 'comment': //, + 'prolog': /<\?[\s\S]+?\?>/, + 'doctype': { + // https://www.w3.org/TR/xml/#NT-doctypedecl + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, + greedy: true, + inside: { + 'internal-subset': { + pattern: /(\[)[\s\S]+(?=\]>$)/, + lookbehind: true, + greedy: true, + inside: null // see below + }, + 'string': { + pattern: /"[^"]*"|'[^']*'/, + greedy: true + }, + 'punctuation': /^$|[[\]]/, + 'doctype-tag': /^DOCTYPE/, + 'name': /[^\s<>'"]+/ + } + }, + 'cdata': //i, + 'tag': { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, + greedy: true, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/, + inside: { + 'punctuation': /^<\/?/, + 'namespace': /^[^\s>\/:]+:/ + } + }, + 'attr-value': { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, + inside: { + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { + 'namespace': /^[^\s>\/:]+:/ + } + } + + } + }, + 'entity': [ + { + pattern: /&[\da-z]{1,8};/i, + alias: 'named-entity' + }, + /&#x?[\da-f]{1,8};/i + ] }; Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = - Prism.languages.markup['entity']; + Prism.languages.markup['entity']; +Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup; // Plugin to make entity title show the real entity, idea by Roman Komarov -Prism.hooks.add('wrap', function(env) { +Prism.hooks.add('wrap', function (env) { - if (env.type === 'entity') { - env.attributes['title'] = env.content.replace(/&/, '&'); - } + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&'); + } }); Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { - /** - * Adds an inlined language to markup. - * - * An example of an inlined language is CSS with ` - - - """ - source.replace / +\ +` + ); + return source.replace(/ \ -` +`, ); return source.replace(/