Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 1301423006: Escape "--" in markdown rendering for GN reference docs. (Closed)

Created:
5 years, 3 months ago by Dirk Pranke
Modified:
5 years, 3 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina, nodir, Bons
Base URL:
https://chromium.googlesource.com/chromium/src.git@gn_reference
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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= Committed: https://crrev.com/e6168f049b38f70833fa2bf271e2955c3e2f1511 Cr-Commit-Position: refs/heads/master@{#348282}

Patch Set 1 #

Total comments: 7

Patch Set 2 : update w/ review feedback and simplify a bit #

Total comments: 2

Patch Set 3 : fix second dec== #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -27 lines) Patch
M tools/gn/docs/reference.md View 1 2 15 chunks +25 lines, -25 lines 0 comments Download
M tools/gn/standard_out.cc View 1 2 3 chunks +20 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
Dirk Pranke
This is kind of kludgey so I'm not sure if it's worth landing, but I ...
5 years, 3 months ago (2015-09-03 01:04:46 UTC) #1
brettw
https://codereview.chromium.org/1301423006/diff/1/tools/gn/standard_out.cc File tools/gn/standard_out.cc (right): https://codereview.chromium.org/1301423006/diff/1/tools/gn/standard_out.cc#newcode134 tools/gn/standard_out.cc:134: if (is_markdown && dec==DECORATION_YELLOW) { Need spaces around == ...
5 years, 3 months ago (2015-09-04 18:04:30 UTC) #2
Dirk Pranke
WDYT? I've fixed the other feedback, and provided an alternative to your suggestion. Let me ...
5 years, 3 months ago (2015-09-05 01:53:42 UTC) #3
brettw
lgtm https://codereview.chromium.org/1301423006/diff/20001/tools/gn/standard_out.cc File tools/gn/standard_out.cc (right): https://codereview.chromium.org/1301423006/diff/20001/tools/gn/standard_out.cc#newcode130 tools/gn/standard_out.cc:130: if (is_markdown && dec==DECORATION_YELLOW) { Spaces around ==
5 years, 3 months ago (2015-09-09 19:32:22 UTC) #4
Dirk Pranke
https://codereview.chromium.org/1301423006/diff/20001/tools/gn/standard_out.cc File tools/gn/standard_out.cc (right): https://codereview.chromium.org/1301423006/diff/20001/tools/gn/standard_out.cc#newcode130 tools/gn/standard_out.cc:130: if (is_markdown && dec==DECORATION_YELLOW) { On 2015/09/09 19:32:22, brettw ...
5 years, 3 months ago (2015-09-09 19:33:06 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1301423006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1301423006/40001
5 years, 3 months ago (2015-09-10 23:11:01 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 3 months ago (2015-09-10 23:24:11 UTC) #9
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/e6168f049b38f70833fa2bf271e2955c3e2f1511 Cr-Commit-Position: refs/heads/master@{#348282}
5 years, 3 months ago (2015-09-10 23:25:07 UTC) #10
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:16:16 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e6168f049b38f70833fa2bf271e2955c3e2f1511
Cr-Commit-Position: refs/heads/master@{#348282}

Powered by Google App Engine
This is Rietveld 408576698