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

Issue 2482703002: Change [TOC] processing in MD browser to match gitiles (Closed)

Created:
4 years, 1 month ago by Dirk Pranke
Modified:
4 years, 1 month ago
Reviewers:
jsbell
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change [TOC] processing in MD browser to match gitiles This change adds a processing pass to md_browser's markdown handling so that if a document only has a single H1, the [TOC] plugin will ignore it. This change also adds a "Contents" H2 to better match Gitiles' output. R=jsbell@chromium.org BUG=590280 Committed: https://crrev.com/ded33c74ac7aea5962940660717346b65db4d9d0 Cr-Commit-Position: refs/heads/master@{#432000}

Patch Set 1 #

Total comments: 6

Patch Set 2 : clean up logic, add more comments #

Patch Set 3 : reparent #

Total comments: 2

Patch Set 4 : fix nesting of ULs in the non-single-h1 case #

Total comments: 4

Patch Set 5 : update with more review feedback, clean up, rewrite comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -5 lines) Patch
M tools/md_browser/md_browser.py View 1 2 3 4 3 chunks +74 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
Dirk Pranke
4 years, 1 month ago (2016-11-06 00:59:25 UTC) #1
jsbell
https://codereview.chromium.org/2482703002/diff/1/tools/md_browser/md_browser.py File tools/md_browser/md_browser.py (right): https://codereview.chromium.org/2482703002/diff/1/tools/md_browser/md_browser.py#newcode221 tools/md_browser/md_browser.py:221: # Also, we want to insert an <h2>Contents and ...
4 years, 1 month ago (2016-11-07 17:32:07 UTC) #2
Dirk Pranke
https://codereview.chromium.org/2482703002/diff/1/tools/md_browser/md_browser.py File tools/md_browser/md_browser.py (right): https://codereview.chromium.org/2482703002/diff/1/tools/md_browser/md_browser.py#newcode221 tools/md_browser/md_browser.py:221: # Also, we want to insert an <h2>Contents and ...
4 years, 1 month ago (2016-11-07 18:17:28 UTC) #3
Dirk Pranke
okay, updated. Please take another look?
4 years, 1 month ago (2016-11-08 02:48:23 UTC) #4
jsbell
https://codereview.chromium.org/2482703002/diff/40001/tools/md_browser/md_browser.py File tools/md_browser/md_browser.py (right): https://codereview.chromium.org/2482703002/diff/40001/tools/md_browser/md_browser.py#newcode260 tools/md_browser/md_browser.py:260: children = list(toc_node) I'm unfamiliar with ElementTree and the ...
4 years, 1 month ago (2016-11-08 17:29:12 UTC) #5
Dirk Pranke
Updated again. Take 3? https://codereview.chromium.org/2482703002/diff/40001/tools/md_browser/md_browser.py File tools/md_browser/md_browser.py (right): https://codereview.chromium.org/2482703002/diff/40001/tools/md_browser/md_browser.py#newcode260 tools/md_browser/md_browser.py:260: children = list(toc_node) On 2016/11/08 ...
4 years, 1 month ago (2016-11-08 21:55:07 UTC) #6
jsbell
lgtm with two possible simplifications https://codereview.chromium.org/2482703002/diff/60001/tools/md_browser/md_browser.py File tools/md_browser/md_browser.py (right): https://codereview.chromium.org/2482703002/diff/60001/tools/md_browser/md_browser.py#newcode260 tools/md_browser/md_browser.py:260: children = list(toc_ul) this ...
4 years, 1 month ago (2016-11-08 22:38:04 UTC) #7
Dirk Pranke
Okay, your latest set of comments led me to rework things a bit. Let me ...
4 years, 1 month ago (2016-11-14 22:50:15 UTC) #8
jsbell
lgtm
4 years, 1 month ago (2016-11-14 23:22:14 UTC) #9
jsbell
lgtm
4 years, 1 month ago (2016-11-14 23:22:16 UTC) #10
Dirk Pranke
On 2016/11/14 23:22:16, jsbell wrote: > lgtm Thanks! And thanks for the detailed comments, the ...
4 years, 1 month ago (2016-11-14 23:23:02 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2482703002/80001
4 years, 1 month ago (2016-11-14 23:24:16 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-15 00:06:57 UTC) #14
commit-bot: I haz the power
4 years, 1 month ago (2016-11-15 00:11:58 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ded33c74ac7aea5962940660717346b65db4d9d0
Cr-Commit-Position: refs/heads/master@{#432000}

Powered by Google App Engine
This is Rietveld 408576698