]> granicus.if.org Git - jq/commitdiff
Fixes manual generation with psych
authorAndrew O'Brien <obrien.andrew@gmail.com>
Tue, 21 Apr 2015 12:00:28 +0000 (08:00 -0400)
committerNicolas Williams <nico@cryptonector.com>
Wed, 22 Apr 2015 16:01:39 +0000 (11:01 -0500)
When running `make` I ran into a couple of problems building the manual. While
I'm not entirely sure that this is the root cause, it appears to have been
related to the fact that ruby 2.0 dropped syck completely in favor of psych
(which was introduced in 1.9.2) for YAML processing. I'm currently using ruby
2.1.0p0.

I'm assuming that the fact that the YAML engine was explicitly set to syck in
the Rakefile was an attempt to work around some incompatibility between the two
libraries, so I looked into what would be necessary to get it to work with the
newer one. The changes to `manual.yml` ended up being pretty minor: I ran it
through `iconv` to convert some ISO-8859-1 characters to UTF-8 and added some
quotes in places (apparently you can't start a string value with '`').

docs/Rakefile
docs/content/3.manual/manual.yml

index 67cdeb2844860b7aae20d182e7b2d290fb0256fe..167ee87df2c972799208b878d65fa9fcbea654a2 100644 (file)
@@ -87,7 +87,6 @@ task :binaries => ["output/download"] do
 end
 
 def load_manual
-  YAML::ENGINE.yamler = 'syck'
   YAML::load(File.open("content/3.manual/manual.yml"))
 end
 
index a19ca6ad84a587ab1a0c9e8558628b14324ad58f..48d3de1903f76ba15d22c4be0875f9905cae93ef 100644 (file)
@@ -1,3 +1,4 @@
+---
 headline: jq Manual
 body: |
 
@@ -669,7 +670,7 @@ sections:
             input: '[[0,1], ["a","b","c"]]'
             output: ['[false, true]']
 
-      - title: `in`
+      - title: "`in`"
         body: |
           
           The builtin function `in` returns the input key is in the
@@ -1220,7 +1221,7 @@ sections:
             input: '"a,b, cd, efg, hijk"'
             output: ['12']
 
-      - title: `inside`
+      - title: "`inside`"
         body: |
 
           The filter `inside(b)` will produce true if the input is
@@ -1339,8 +1340,8 @@ sections:
 
         example:
           - program: 'ascii_upcase'
-            input: '"useful but not for é"'
-            output: '"USEFUL BUT NOT FOR é"'
+            input: '"useful but not for é"'
+            output: '"USEFUL BUT NOT FOR é"'
 
       - title: "`while(cond; update)`"
         body: |