bitcoin/bitcoin.org — pull request #661 by harding (2014-11-29 00:56:57+00:00)
Title: Dev Docs (Formatting Only): Convert Fake Subheadings To Real Subheadings

We currently use fake subheadings in a few places where we don't want to add entries to the table of contents (TOC). The fake subheadings are simply short paragraphs where all text is bold:

**An Example Fake Subheading**

Real headings would be nicer as they're automatically given an anchor and a clickable link when you hover over them, just like GitHub does on README files.

It turns out we can do that quite easily. Kramdown lets you create real subheadings which won't be included in the table of contents by putting `{:.no_toc}` on the line after the subheading definition. It's a built-in feature, so there's no special plugin or Javascript required. (Yay!) http://kramdown.gettalong.org/converter/html.html#toc

This pull converts all the non-RPC fake subheadings to real-non-TOC subheadings (I don't think the RPC fake subheadings need anchor links, so I didn't do them.)

**Warning:** this pull isn't complete. I need @saivann or someone who knows Javascript to look at this issue: when scrolling into a `no_toc` section, the left-margin TOC collapses---probably because it's trying to associate the right-side main text header with a left-side link that isn't there. I suspect this is a one or two line change somewhere near main.js line 323 to ignore headers with a class of `no_toc`, but I know effectively zero JS and can't easily make the change myself.

This pull also fixes a semi-broken link and adds two Makefile tests to detect that and similar broken links in the future.

I've tested that this pull neither adds nor removes nor changes anything in the table of contents (except for the collapse issue). Here are links to the new real subheadings---notice that they don't appear in the TOC (when the TOC is displayed):

* http://dg2.dtrt.org/en/developer-guide#pay-to-public-key-hash-p2pkh
* http://dg2.dtrt.org/en/developer-guide#pay-to-script-hash-p2sh
* http://dg2.dtrt.org/en/developer-guide#multisig
* http://dg2.dtrt.org/en/developer-guide#pubkey
* http://dg2.dtrt.org/en/developer-guide#null-data
* http://dg2.dtrt.org/en/developer-reference#txin
* http://dg2.dtrt.org/en/developer-reference#outpoint
* http://dg2.dtrt.org/en/developer-reference#txout
* http://dg2.dtrt.org/en/developer-reference#coinbase
* http://dg2.dtrt.org/en/developer-reference#parsing-a-merkleblock-message
* http://dg2.dtrt.org/en/developer-reference#creating-a-merkleblock-message