Merge pull request #1552 from Cimbali/jq

pull/1555/head
Simon Legner 4 years ago committed by GitHub
commit 3b1a217f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,6 +67,7 @@
'pages/haproxy',
'pages/haskell',
'pages/jekyll',
'pages/jq',
'pages/jquery',
'pages/julia',
'pages/knockout',

@ -0,0 +1,26 @@
._jq {
@extend %simple;
.manual-example table {
border: none;
& td {
@extend %pre;
&.jqprogram { font-weight: bold; }
border: none;
}
& th {
color: var(--textColor);
background: var(--contentBackground);
text-align: right;
border: none;
}
& tr:not(:first-child) th:not(:empty) {
&, & + td {
border-top: 1px solid var(--boxBorder);
}
}
}
}

@ -2,7 +2,19 @@ module Docs
class Jq
class CleanHtmlFilter < Filter
def call
at_css('div#manualcontent')
content = at_css('div#manualcontent')
css('.manual-example').each do |node|
container = node.parent
example_header = doc.document.create_element('h4')
example_header.content = container.at_css('a[data-toggle="collapse"]').content
node.children.before(example_header)
node.remove_class('collapse')
container.replace(node)
end
content
end
end
end

@ -13,6 +13,10 @@ module Docs
css('h1, h2, h3, h4').each { |node| node.content = node.content.sub /^[0-9A-Z]+(\.[0-9]+)* /, '' }
css('div.example').each do |node|
node.replace(node.children)
end
css('pre').each do |node|
node.delete 'class'
node['data-language'] = 'latex'

@ -2,7 +2,7 @@ module Docs
class Jq < UrlScraper
self.name = 'jq'
self.slug = 'jq'
self.type = 'simple'
self.type = 'jq'
self.release = '1.6'
self.links = {
home: 'https://stedolan.github.io/jq/'

Loading…
Cancel
Save