Unified · Split
| @@ -67,6 +67,7 @@ · 66 unmodified lines | ||
| 67 | 67 | 'pages/haproxy', |
| 68 | 68 | 'pages/haskell', |
| 69 | 69 | 'pages/jekyll', |
| 70 | + 'pages/jq', | |
| 70 | 71 | 'pages/jquery', |
| 71 | 72 | 'pages/julia', |
| 72 | 73 | 'pages/knockout', |
| @@ -0,0 +1,26 @@ | ||
| 1 | +._jq { | |
| 2 | + @extend %simple; | |
| 3 | + | |
| 4 | + .manual-example table { | |
| 5 | + border: none; | |
| 6 | + | |
| 7 | + & td { | |
| 8 | + @extend %pre; | |
| 9 | + &.jqprogram { font-weight: bold; } | |
| 10 | + border: none; | |
| 11 | + } | |
| 12 | + | |
| 13 | + & th { | |
| 14 | + color: var(--textColor); | |
| 15 | + background: var(--contentBackground); | |
| 16 | + text-align: right; | |
| 17 | + border: none; | |
| 18 | + } | |
| 19 | + | |
| 20 | + & tr:not(:first-child) th:not(:empty) { | |
| 21 | + &, & + td { | |
| 22 | + border-top: 1px solid var(--boxBorder); | |
| 23 | + } | |
| 24 | + } | |
| 25 | + } | |
| 26 | +} | |
| @@ -2,7 +2,19 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Jq |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − at_css('div#manualcontent') | |
| 5 | + content = at_css('div#manualcontent') | |
| 6 | + | |
| 7 | + css('.manual-example').each do |node| | |
| 8 | + container = node.parent | |
| 9 | + example_header = doc.document.create_element('h4') | |
| 10 | + example_header.content = container.at_css('a[data-toggle="collapse"]').content | |
| 11 | + node.children.before(example_header) | |
| 12 | + | |
| 13 | + node.remove_class('collapse') | |
| 14 | + container.replace(node) | |
| 15 | + end | |
| 16 | + | |
| 17 | + content | |
| 6 | 18 | end |
| 7 | 19 | end |
| 8 | 20 | end |
| @@ -13,6 +13,10 @@ module Docs · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | css('h1, h2, h3, h4').each { |node| node.content = node.content.sub /^[0-9A-Z]+(\.[0-9]+)* /, '' } |
| 15 | 15 | |
| 16 | + css('div.example').each do |node| | |
| 17 | + node.replace(node.children) | |
| 18 | + end | |
| 19 | + | |
| 16 | 20 | css('pre').each do |node| |
| 17 | 21 | node.delete 'class' |
| 18 | 22 | node['data-language'] = 'latex' |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Jq < UrlScraper |
| 3 | 3 | self.name = 'jq' |
| 4 | 4 | self.slug = 'jq' |
| 5 | − self.type = 'simple' | |
| 5 | + self.type = 'jq' | |
| 6 | 6 | self.release = '1.6' |
| 7 | 7 | self.links = { |
| 8 | 8 | home: 'https://stedolan.github.io/jq/' |