Bug 1024638: Use pandoc "--smart" documentation in js/src/doc documentation. DONTBUILD r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Thu, 12 Jun 2014 12:09:23 -0700
changeset 188490 9b9464119786
parent 188489 573774459f28
child 188491 419c91a784bc
push id26956
push userkwierso@gmail.com
push date2014-06-13 00:23 +0000
treeherdermozilla-central@adcf3f05f813 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1024638
milestone33.0a1
Bug 1024638: Use pandoc "--smart" documentation in js/src/doc documentation. DONTBUILD r=jorendorff
js/src/doc/Debugger/Debugger-API.md
js/src/doc/format.sh
--- a/js/src/doc/Debugger/Debugger-API.md
+++ b/js/src/doc/Debugger/Debugger-API.md
@@ -36,33 +36,33 @@ In Gecko, the `Debugger` API is availabl
 it ought not to introduce security holes, so in principle it could be made
 available to content as well; but it is hard to justify the security risks
 of the additional attack surface.
 
 
 ## Debugger Instances and Shadow Objects
 
 `Debugger` reflects every aspect of the debuggee's state as a JavaScript
-value&mdash;not just actual JavaScript values like objects and primitives,
+value---not just actual JavaScript values like objects and primitives,
 but also stack frames, environments, scripts, and compilation units, which
 are not normally accessible as objects in their own right.
 
 Here is a JavaScript program in the process of running a timer callback function:
 
 ![A running JavaScript program and its Debugger shadows][img-shadows]
 
 This diagram shows the various types of shadow objects that make up the
 Debugger API (which all follow some [general conventions][conventions]):
 
 - A [`Debugger.Object`][object] represents a debuggee object, offering a
   reflection-oriented API that protects the debugger from accidentally
   invoking getters, setters, proxy traps, and so on.
 
 - A [`Debugger.Script`][script] represents a block of JavaScript
-  code&mdash;either a function body or a top-level script. Given a
+  code---either a function body or a top-level script. Given a
   `Debugger.Script`, one can set breakpoints, translate between source
   positions and bytecode offsets (a deviation from the "source level"
   design principle), and find other static characteristics of the code.
 
 - A [`Debugger.Frame`][frame] represents a running stack frame. You can use
   these to walk the stack and find each frame's script and environment. You
   can also set `onStep` and `onPop` handlers on frames.
 
@@ -149,26 +149,26 @@ 6)  Now, click on the text that says "Cl
     the `div` element's `onclick` handler. When control reaches the
     `debugger;` statement, `Debugger` calls your callback function, passing
     a `Debugger.Frame` instance. Your callback function evaluates the
     expression `x` in the given stack frame, and displays the alert:
 
     ![The Debugger callback displaying an alert][img-example-alert]
 
 7)  Press "Run" in the Scratchpad again. Now, clicking on the "Click me!"
-    text causes *two* alerts to show&mdash;one for each `Debugger`
+    text causes *two* alerts to show---one for each `Debugger`
     instance.
 
     Multiple `Debugger` instances can observe the same debuggee. Re-running
     the code in the Scratchpad created a fresh `Debugger` instance, added
     the same web page as its debuggee, and then registered a fresh
     `debugger;` statement handler with the new instance. When you clicked
     on the `div` element, both of them ran. This shows how any number of
     `Debugger`-based tools can observe a single web page
-    simultaneously&mdash;although, since the order in which their handlers
+    simultaneously---although, since the order in which their handlers
     run is not specified, such tools should probably only observe, and not
     influence, the debuggee's behavior.
 
 8)  Close the web page and the Scratchpad.
 
     Since both the Scratchpad's global object and the debuggee window are
     now gone, the `Debugger` instances will be garbage collected, since
     they can no longer have any visible effect on Firefox's behavior. The
@@ -180,11 +180,11 @@ 8)  Close the web page and the Scratchpa
 
 
 ## Gecko-specific features
 
 While the `Debugger` core API deals only with concepts common to any
 JavaScript implementation, it also includes some Gecko-specific features:
 
 - [Global tracking][global] supports debugging all the code running in a
-  Gecko instance at once&mdash;the 'chrome debugging' model.
+  Gecko instance at once---the 'chrome debugging' model.
 - [Object wrapper][wrapper] functions help manipulate object references
   that cross privilege boundaries.
--- a/js/src/doc/format.sh
+++ b/js/src/doc/format.sh
@@ -78,17 +78,21 @@ markdown() {
     if ! [ -f "$file" ]; then
         echo "$progname: Can't find markdown file $file, mentioned by $config" >&2
         exit 1
     fi
 
     local output_file=$outputdir/${INPUT_FILE/md/html}
 
     mkdir -p $(dirname "$output_file")
-    pandoc $standalone_arg -f markdown "$file" <("$lib/make-bibliography.sh" $mdn_arg "$config" "$URL") -t html -o "$output_file"
+    pandoc $standalone_arg                                              \
+           -f markdown --smart -t html                                  \
+           "$file"                                                      \
+           <("$lib/make-bibliography.sh" $mdn_arg "$config" "$URL")     \
+           -o "$output_file"
 
     "$lib/make-watermark.sh" "$output_file" "$hg_relative_sourcedir/$INPUT_FILE" >> "$output_file"
 }
 
 resource() {
     local label=$1 file=$2 url=$3
     ln -f $sourcedir/$file $outputdir/$file
 }