This is an archive of the discontinued LLVM Phabricator instance.

[docs] Add support for Markdown documentation when creating man pages
ClosedPublic

Authored by ikudrin on Apr 22 2019, 6:16 AM.

Diff Detail

Event Timeline

ikudrin created this revision.Apr 22 2019, 6:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2019, 6:16 AM
Herald added a subscriber: dexonsmith. · View Herald Transcript
jhenderson added inline comments.Apr 29 2019, 7:04 AM
docs/conf.py
235–238

There seems to be an excessive number of brackets to me here. Can this be simplified slightly to something like (with one or two line breaks in other places as required):

print(
  "error: invalid title in %r (expected '# <name> - <description>')" % file_subpath,
  file=sys.stderr)
ikudrin updated this revision to Diff 197528.May 1 2019, 4:25 AM
  • Simplified print statements.
  • Added escaping in the regex string.
jhenderson accepted this revision.May 1 2019, 4:45 AM

LGTM, I think (not verified the regex though). Have you discussed using markdown for documentation with anybody else though?

This revision is now accepted and ready to land.May 1 2019, 4:45 AM
MaskRay added a subscriber: MaskRay.May 1 2019, 4:49 AM
MaskRay added inline comments.
docs/conf.py
233

m = re.match(r'^# (\S+) - (.+)$', title)

250–251

Use single quotes for consistency.

MaskRay added inline comments.May 1 2019, 4:52 AM
docs/conf.py
267

not name in ('index.rst',) -> name != 'index.rst'

LGTM, I think (not verified the regex though).

Thanks!

Have you discussed using markdown for documentation with anybody else though?

No. The documentation for llvm-addr2line is the only page for a command line tool in the Markdown format. That was requested by @rupprecht in D60067#1466153.

ikudrin updated this revision to Diff 197529.May 1 2019, 5:13 AM
  • Updated according to @MaskRay's comments.
rupprecht accepted this revision.May 2 2019, 11:21 AM
This revision was automatically updated to reflect the committed changes.