Dev Docs (Formatting Only): Convert Fake Subheadings To Real Subheadings

Converts fake subheadings created using **bold** to real HTML
subheadings without adding them to the table of contents.

Also fixes a link broken by commit 4e067ac89e and adds a Makefile
test to catch future similar breakage.
This commit is contained in:
David A. Harding 2014-11-28 15:53:23 -05:00
parent 464272eeb0
commit 217ddb0701
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7
6 changed files with 59 additions and 19 deletions

View file

@ -38,7 +38,8 @@ pre-build-tests-fast: check-for-non-ascii-urls
## Post-build tests which, aggregated together, take less than 5 seconds to run on a typical PC
post-build-tests-fast: check-for-build-errors ensure-each-svg-has-a-png check-for-liquid-errors \
check-for-missing-anchors check-for-broken-markdown-reference-links \
check-for-broken-kramdown-tables
check-for-broken-kramdown-tables check-for-duplicate-header-ids \
check-for-headers-with-hrefs
## All pre-build tests, including those which might take multiple minutes
pre-build-tests: pre-build-tests-fast
@ -114,3 +115,24 @@ check-for-broken-kramdown-tables:
## paragraph starting with a | (pipe). I can't imagine any reason we'd
## have a regular paragraph starting with a pipe, so error on any occurences.
$S grep '<p>|' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)
check-for-duplicate-header-ids:
## When Kramdown automatically creates header id tags, it avoids using
## the same id="" as a previous header by silently appending '-1' to the
## second-occuring header. We want an error when this happens because
## all links which previously pointed to the second-occuring header now
## point to the first-occuring header. (Example: before this test was
## written, links pointing to the ping RPC were silently redirected when
## the P2P ping message was added to the page.) The pattern below will
## report a false positive if we legitimately have an id ending in '-1',
## but that should be easy to work around if it ever happens.
$S grep '<h[1-6][^>]\+id="[^"]\+-1"' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)
check-for-headers-with-hrefs:
## Subheadings with Kramdown-generated id tags break anchor link
## affordance if their text includes any links (hrefs), so error if any
## links are detectd between <h[2-6]> and </h[2-6> header tags. If we
## ever do need a header with a link, we can revise the pattern below to
## only match Kramdown-generated id tags
$S grep '<\(h[2-6]\).*\?>[^>]\+href=.*</\1>' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)

View file

@ -320,7 +320,12 @@ backwards-incompatible features.
As of Bitcoin Core 0.9, the standard pubkey script types are:
**Pay To Public Key Hash (P2PKH)**
{% endautocrossref %}
#### Pay To Public Key Hash (P2PKH)
{:.no_toc}
{% autocrossref %}
P2PKH is the most common form of pubkey script used to send a transaction to one
or multiple Bitcoin addresses.
@ -332,9 +337,10 @@ Pubkey script: OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
Signature script: <sig> <pubkey>
~~~
{% autocrossref %}
#### Pay To Script Hash (P2SH)
{:.no_toc}
**Pay To Script Hash (P2SH)**
{% autocrossref %}
P2SH is used to send a transaction to a script hash. Each of the standard
pubkey scripts can be used as a P2SH redeem script, but in practice only the
@ -347,9 +353,10 @@ Pubkey script: OP_HASH160 <Hash160(redeemScript)> OP_EQUAL
Signature script: <sig> [sig] [sig...] <redeemScript>
~~~
{% autocrossref %}
#### Multisig
{:.no_toc}
**Multisig**
{% autocrossref %}
Although P2SH multisig is now generally used for multisig transactions, this base script
can be used to require multiple signatures before a UTXO can be spent.
@ -389,9 +396,10 @@ Redeem script: <OP_2> <A pubkey> <B pubkey> <C pubkey> <OP_3> OP_CHECKMULTISIG
Signature script: OP_0 <A sig> <C sig> <redeemScript>
~~~
{% autocrossref %}
#### Pubkey
{:.no_toc}
**Pubkey**
{% autocrossref %}
[Pubkey][]{:#term-pubkey}{:.term} scripts are a simplified form of the P2PKH pubkey script,
but they arent as
@ -405,9 +413,10 @@ Pubkey script: <pubkey> OP_CHECKSIG
Signature script: <sig>
~~~
{% autocrossref %}
#### Null Data
{:.no_toc}
**Null Data**
{% autocrossref %}
[Null data][]{:#term-null-data}{:.term} pubkey scripts let you add a small amount of arbitrary data to the block
chain in exchange for paying a transaction fee, but doing so is discouraged.

View file

@ -3,7 +3,7 @@ This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
#### ping
#### ping {#ping-rpc}
~~~
ping

View file

@ -412,7 +412,8 @@ traffic dump this output was taken from, the full transaction belonging
to that TXID was sent immediately after the `merkleblock` message as
a `tx` message.
**Parsing A MerkleBlock**
##### Parsing A MerkleBlock Message
{:.no_toc}
As seen in the annotated hexdump above, the `merkleblock` message
provides three special data types: a transaction count, a list of
@ -483,7 +484,8 @@ For a detailed example of parsing a `merkleblock` message, please see
the corresponding [merkle block examples section][section merkleblock
example].
**Creating A MerkleBlock**
##### Creating A MerkleBlock Message
{:.no_toc}
It's easier to understand how to create a `merkleblock` message after
you understand how to parse an already-created message, so we recommend

View file

@ -228,7 +228,8 @@ the [CompactSize section][CompactSize unsigned integer].
{% endautocrossref %}
**TxIn: A Transaction Input (Non-Coinbase)**
##### TxIn: A Transaction Input (Non-Coinbase) {#txin}
{:.no_toc}
{% autocrossref %}
@ -244,7 +245,8 @@ Each non-coinbase input spends an outpoint from a previous transaction.
{% endautocrossref %}
**[Outpoint][]{:#term-outpoint}{:.term}: The Specific Part Of A Specific Output**
##### Outpoint: The Specific Part Of A Specific Output {#outpoint}
{:.no_toc}
{% autocrossref %}
@ -259,7 +261,8 @@ specific output.
{% endautocrossref %}
**TxOut: A Transaction Output**
##### TxOut: A Transaction Output {#txout}
{:.no_toc}
{% autocrossref %}
@ -313,8 +316,12 @@ to a new pay-to-pubkey-hash (P2PKH) output.
00000000 ................................... locktime: 0 (a block height)
{% endhighlight %}
{% endautocrossref %}
**Coinbase Input: The Input Of The First Transaction In A Block**
##### Coinbase Input: The Input Of The First Transaction In A Block {#coinbase}
{:.no_toc}
{% autocrossref %}
The first transaction in a block, called the coinbase transaction, must
have exactly one input, called a coinbase. The coinbase input currently

View file

@ -112,7 +112,7 @@ http://opensource.org/licenses/MIT.
[op_hash160]: /en/developer-reference#term-op-hash160 "Operation which converts the entry below it on the stack into a RIPEMD(SHA256()) hashed version of itself"
[op_return]: /en/developer-reference#term-op-return "Operation which terminates the script in failure"
[op_verify]: /en/developer-reference#term-op-verify "Operation which terminates the script if the entry below it on the stack is non-true (zero)"
[outpoint]: /en/developer-reference#term-outpoint "The structure used to refer to a particular transaction output, consisting of a 32-byte TXID and a 4-byte output index number (vout)."
[outpoint]: /en/developer-reference#outpoint "The structure used to refer to a particular transaction output, consisting of a 32-byte TXID and a 4-byte output index number (vout)."
[output]: /en/developer-guide#term-output "The output of a transaction which transfers value to a pubkey script"
[output index]: /en/developer-guide#term-output-index "The sequentially-numbered index of outputs in a single transaction starting from 0"
[P2PKH]: /en/developer-guide#term-p2pkh "A pubkey script which Pays To PubKey Hashes (P2PKH), allowing spending of satoshis to anyone with a Bitcoin address"
@ -258,7 +258,7 @@ http://opensource.org/licenses/MIT.
[rpc listunspent]: /en/developer-reference#listunspent
[rpc lockunspent]: /en/developer-reference#lockunspent
[rpc move]: /en/developer-reference#move
[rpc ping]: /en/developer-reference#ping
[rpc ping]: /en/developer-reference#ping-rpc
[rpc sendfrom]: /en/developer-reference#sendfrom
[rpc sendmany]: /en/developer-reference#sendmany
[rpc sendrawtransaction]: /en/developer-reference#sendrawtransaction