Escape "--" in markdown rendering for GN reference docs.
commite6168f049b38f70833fa2bf271e2955c3e2f1511
authordpranke <dpranke@chromium.org>
Thu, 10 Sep 2015 23:24:02 +0000 (10 16:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 10 Sep 2015 23:24:54 +0000 (10 23:24 +0000)
treee70b3cf3567c7a7f70705250b16b9480ef89f9aa
parent952274d55e14e56573ecac52ad9c9acad0a0e63e
Escape "--" in markdown rendering for GN reference docs.

Gitiles has a "feature" in its markdown rendering engine where if it
encounters the string "--" in a non-code context it will replace it with
an em dash; this is usually undesirable in the GN documentation, where
we want to refer to command line flags like --args explicitly.

Working around this properly would likely require either a much more
complicated parser handling markdown output of strings to track context,
or updating the source text to somehow indicate what should be escaped
and what shouldn't, or both.

We can, however, probably achieve a reasonable compromise by making sure
that we don't escape the dashes when they are part of a header string,
since the rest of the GN reference markdown output shows up as code
blocks anyway.

R=brettw@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1301423006

Cr-Commit-Position: refs/heads/master@{#348282}
tools/gn/docs/reference.md
tools/gn/standard_out.cc