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-Original-Commit-Position: refs/heads/master@{#348282}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e6168f049b38f70833fa2bf271e2955c3e2f1511
2 files changed
tree: fd838e2a0cfc4464eaf7dfb5c53a14c29e28f188
  1. tools/