With Python-Markdown upgraded to 3.3.4, update the usage and migrate to
Python3. Python3.6+ is supported, and Python2 is no longer supported.
BUG=chromium:1224332
TEST=python3 md_browser.py -d /mnt/host/source/docs/
Change-Id: I61c762e9d7b46b63e8a050fda6858f5032be76b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3301132
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Auto-Submit: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#946862}
This improves the autolinkifier regex used by md_browser.py. The old
regex would linkify URLs until the end of the line, rather than the
correct behavior of linkifying only until the end of the URL.
This also drops support for non-lowercase spellings of "HTTP", since it
seems the gitiles implementation (linked in a code comment) doesn't seem
to support that anyway.
Lastly, this updates the code comment to the new path for the gitiles
parser code.
Bug: 968865
Test: tools/md_browser/md_browser.py android_webview/docs/README.md
Test: tools/md_browser/md_browser.py android_webview/docs/quick-start.md
Test: tools/md_browser/md_browser.py android_webview/docs/webview-shell.md
Test: tools/md_browser/md_browser.py android_webview/docs/test-instructions.md
Test: On all the above, observe all autolinks work as intended
Change-Id: I1b5c6b2496ef64b1da2aa00d11b340c40761c3f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638123
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665380}