Skip to content
Snippets Groups Projects
Unverified Commit 3c74683d authored by Gautham Goli's avatar Gautham Goli
Browse files

man: Format h3 tags in ronn output

parent 446b1cb9
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,8 @@ module Homebrew
ronn_output = ronn.read
odie "Got no output from ronn!" unless ronn_output
ronn_output.gsub!(%r{</var>`(?=[.!?,;:]?\s)}, "").gsub!(%r{</?var>}, "`") if format_flag == "--markdown"
ronn_output = ronn_output.gsub(%r{<code>}, "\\fB").gsub(%r{</code>}, "\\fR")
.gsub(%r{<var>}, "\\fI").gsub(%r{</var>}, "\\fR") unless format_flag == '--markdown'
target.atomic_write ronn_output
end
end
......@@ -226,8 +228,6 @@ module Homebrew
def format_usage_banner(usage_banner)
synopsis, *remaining_lines = usage_banner.split('\n')
synopsis = synopsis.sub(/^/, "###")
.gsub(/`/, "")
.gsub(/<(.*?)>/, "\\1")
[synopsis, *remaining_lines].join("\n")
end
end
......@@ -75,7 +75,7 @@ module Homebrew
def pull_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
pull [options] [formula]:
pull [`options`] [<formula>]:
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.
......
......@@ -663,11 +663,11 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
## DEVELOPER COMMANDS
###audit [options] [formulae]:
###`audit` [`options`] [`formulae`]:
Check formulae for Homebrew coding style violations. This should be
Check `formulae` for Homebrew coding style violations. This should be
run before submitting a new formula.
If no formulae are provided, all of them are checked.
If no `formulae` are provided, all of them are checked.
* `--strict`:
Run additional style checks, including Rubocop style checks.
......@@ -692,13 +692,13 @@ Passing `--only-cops`=`cops` will check for violations of only the listed RuboCo
* `--except-cops`:
Passing `--except-cops`=`cops` will skip checking the listed RuboCop cops violations. `cops` should be a comma-separated list of cop names.
###bottle [options] [formulae]:
###`bottle` [`options`] [`formulae`]:
Generate a bottle (binary package) from a formula installed with
--build-bottle.
`--build-bottle`.
If the formula specifies a rebuild version, it will be incremented in the
generated DSL. Passing --keep-old will attempt to keep it at its
original value, while --no-rebuild will remove it.
generated DSL. Passing `--keep-old` will attempt to keep it at its
original value, while `--no-rebuild` will remove it.
* `--skip-relocation`:
Do not check if the bottle can be marked as relocatable.
......@@ -721,15 +721,15 @@ Write bottle information to a JSON file, which can be used as the argument for `
* `--root-url`:
Use the specified `URL` as the root of the bottle's URL instead of Homebrew's default.
###bump-formula-pr [options] formula:
###`bump-formula-pr` [`options`] `formula`:
Creates a pull request to update the formula with a new URL or a new tag.
If a URL is specified, the sha-256 checksum of the new download must
also be specified. A best effort to determine the sha-256 and formula
If a `URL` is specified, the `sha-256` checksum of the new download must
also be specified. A best effort to determine the `sha-256` and `formula`
name will be made if either or both values are not supplied by the user.
If a tag is specified, the git commit revision corresponding to that
If a `tag` is specified, the git commit `revision` corresponding to that
tag must also be specified.
Note that this command cannot be used to transition a formula from a
......@@ -764,13 +764,13 @@ Use the provided `version` to override the value parsed from the URL or tag. Not
* `--message`:
Append provided `message` to the default PR message.
###create URL [options]:
###`create` `URL` [`options`]:
Generate a formula for the downloadable file at URL and open it in the editor.
Generate a formula for the downloadable file at `URL` and open it in the editor.
Homebrew will attempt to automatically derive the formula name
and version, but if it fails, you'll have to make your own template. The wget
and version, but if it fails, you'll have to make your own template. The `wget`
formula serves as a simple example. For the complete API have a look at
http://www.rubydoc.info/github/Homebrew/brew/master/Formula.
<http://www.rubydoc.info/github/Homebrew/brew/master/Formula>.
* `--autotools`:
Create a basic template for an Autotools-style build.
......@@ -789,17 +789,17 @@ Set the provided version of the package you are creating.
* `--tap`:
Takes a tap [`user``/``repo`] as argument and generates the formula in the specified tap.
###edit formula:
Open formula in the editor. Open all of Homebrew for editing if
no formula is provided.
###`edit` `formula`:
Open `formula` in the editor. Open all of Homebrew for editing if
no `formula` is provided.
###formula formula:
###`formula` `formula`:
Display the path where formula is located.
Display the path where `formula` is located.
###irb [options]:
###`irb` [`options`]:
Enter the interactive Homebrew Ruby shell.
......@@ -808,7 +808,7 @@ Show several examples.
* `--pry`:
Pry will be used instead of irb if `--pry` is passed or HOMEBREW_PRY is set.
###linkage [options] formula:
###`linkage` [`options`] `formula`:
Checks the library links of an installed formula.
......@@ -822,7 +822,7 @@ Print the dylib followed by the binaries which link to it for each library the k
* `--cached`:
Print the cached linkage values stored in HOMEBREW_CACHE, set from a previous `brew linkage` run.
###man [options]:
###`man` [`options`]:
Generate Homebrew's manpages.
......@@ -831,7 +831,7 @@ Return a failing status code if changes are detected in the manpage outputs. Thi
* `--link`:
It is now done automatically by `brew update`.
###mirror formulae:
###`mirror` `formulae`:
Reuploads the stable URL for a formula to Bintray to use it as a mirror.
......@@ -840,12 +840,12 @@ Reuploads the stable URL for a formula to Bintray to use it as a mirror.
Run Homebrew with the Ruby profiler.
For example:
###pull [options] [formula]:
###pull [`options`] [`formula`]:
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.
Each patch-source may be one of:
Each `patch-source` may be one of:
~ The ID number of a PR (pull request) in the homebrew/core GitHub
repository
......@@ -881,11 +881,11 @@ Publish at the given Bintray organisation.
* `--test-bot-user`:
Pull the bottle block commit from the specified user on GitHub.
###release-notes [previous_tag] [end_ref]:
###`release-notes` [`previous_tag`] [`end_ref`]:
Output the merged pull requests on Homebrew/brew between two Git refs.
If no previous_tag is provided it defaults to the latest tag.
If no end_ref is provided it defaults to origin/master.
If no `previous_tag` is provided it defaults to the latest tag.
If no `end_ref` is provided it defaults to `origin/master`.
* `--markdown`:
Output as a Markdown list.
......@@ -894,7 +894,7 @@ Output as a Markdown list.
Run a Ruby instance with Homebrew's libraries loaded.
For example:
###tap-new user/repo:
###`tap-new` `user`/`repo`:
Generate the template files for a new tap.
......@@ -916,10 +916,10 @@ Generate the template files for a new tap.
Example: `brew install jruby && brew test jruby`
###tests [options] formula:
###`tests` [`options`] `formula`:
Run Homebrew's unit and integration tests. If provided,
--only=test_script runs only test_script_spec.rb, and --seed
`--only=``test_script` runs only `test_script`_spec.rb, and `--seed`
randomizes tests with the provided value instead of a random seed.
* `--coverage`:
......@@ -935,11 +935,11 @@ Run only `test_script`_spec.rb
* `--seed`:
Randomizes tests with the provided value instead of a random seed.
###update-test [options]:
###`update-test` [options]:
Runs a test of brew update with a new repository clone.
Runs a test of `brew update` with a new repository clone.
If no arguments are passed, use origin/master as the start commit.
If no arguments are passed, use `origin/master` as the start commit.
* `--to-tag`:
Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags.
......
......@@ -621,8 +621,8 @@ If \fB\-\-force\fR (or \fB\-f\fR) is specified then always do a slower, full upd
.
.SH "DEVELOPER COMMANDS"
.
.SS "audit [options] [formulae]:"
Check formulae for Homebrew coding style violations\. This should be run before submitting a new formula\. If no formulae are provided, all of them are checked\.
.SS "\fBaudit\fR [\fBoptions\fR] [\fIformulae\fR]:"
Check \fIformulae\fR for Homebrew coding style violations\. This should be run before submitting a new formula\. If no \fIformulae\fR are provided, all of them are checked\.
.
.TP
\fB\-\-strict\fR
......@@ -668,8 +668,8 @@ Passing \fB\-\-only\-cops\fR=\fIcops\fR will check for violations of only the li
\fB\-\-except\-cops\fR
Passing \fB\-\-except\-cops\fR=\fIcops\fR will skip checking the listed RuboCop cops violations\. \fBcops\fR should be a comma\-separated list of cop names\.
.
.SS "bottle [options] [formulae]:"
Generate a bottle (binary package) from a formula installed with \-\-build\-bottle\. If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \-\-keep\-old will attempt to keep it at its original value, while \-\-no\-rebuild will remove it\.
.SS "\fBbottle\fR [\fIoptions\fR] [\fIformulae\fR]:"
Generate a bottle (binary package) from a formula installed with \fB\-\-build\-bottle\fR\. If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \fB\-\-keep\-old\fR will attempt to keep it at its original value, while \fB\-\-no\-rebuild\fR will remove it\.
.
.TP
\fB\-\-skip\-relocation\fR
......@@ -711,14 +711,14 @@ Write bottle information to a JSON file, which can be used as the argument for \
\fB\-\-root\-url\fR
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
.
.SS "bump\-formula\-pr [options] formula:"
.SS "\fBbump\-formula\-pr\fR [\fIoptions\fR] \fIformula\fR:"
Creates a pull request to update the formula with a new URL or a new tag\.
.
.P
If a URL is specified, the sha\-256 checksum of the new download must also be specified\. A best effort to determine the sha\-256 and formula name will be made if either or both values are not supplied by the user\.
If a \fIURL\fR is specified, the \fIsha\-256\fR checksum of the new download must also be specified\. A best effort to determine the \fIsha\-256\fR and \fIformula\fR name will be made if either or both values are not supplied by the user\.
.
.P
If a tag is specified, the git commit revision corresponding to that tag must also be specified\.
If a \fItag\fR is specified, the git commit \fIrevision\fR corresponding to that tag must also be specified\.
.
.P
Note that this command cannot be used to transition a formula from a URL\-and\-sha256 style specification into a tag\-and\-revision style specification, nor vice versa\. It must use whichever style specification the preexisting formula already uses\.
......@@ -778,8 +778,8 @@ Use the provided \fIversion\fR to override the value parsed from the URL or tag\
\fB\-\-message\fR
Append provided \fImessage\fR to the default PR message\.
.
.SS "create URL [options]:"
Generate a formula for the downloadable file at URL and open it in the editor\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The wget formula serves as a simple example\. For the complete API have a look at http://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\.
.SS "\fBcreate\fR \fIURL\fR [\fIoptions\fR]:"
Generate a formula for the downloadable file at \fIURL\fR and open it in the editor\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The \fBwget\fR formula serves as a simple example\. For the complete API have a look at \fIhttp://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\fR\.
.
.TP
\fB\-\-autotools\fR
......@@ -813,13 +813,13 @@ Set the provided version of the package you are creating\.
\fB\-\-tap\fR
Takes a tap [\fIuser\fR\fB/\fR\fIrepo\fR] as argument and generates the formula in the specified tap\.
.
.SS "edit formula:"
Open formula in the editor\. Open all of Homebrew for editing if no formula is provided\.
.SS "\fBedit\fR \fIformula\fR:"
Open \fIformula\fR in the editor\. Open all of Homebrew for editing if no \fIformula\fR is provided\.
.
.SS "formula formula:"
Display the path where formula is located\.
.SS "\fBformula\fR \fIformula\fR:"
Display the path where \fIformula\fR is located\.
.
.SS "irb [options]:"
.SS "\fBirb\fR [\fIoptions\fR]:"
Enter the interactive Homebrew Ruby shell\.
.
.TP
......@@ -830,7 +830,7 @@ Show several examples\.
\fB\-\-pry\fR
Pry will be used instead of irb if \fB\-\-pry\fR is passed or HOMEBREW_PRY is set\.
.
.SS "linkage [options] formula:"
.SS "\fBlinkage\fR [\fIoptions\fR] \fIformula\fR:"
Checks the library links of an installed formula\.
.
.P
......@@ -848,7 +848,7 @@ Print the dylib followed by the binaries which link to it for each library the k
\fB\-\-cached\fR
Print the cached linkage values stored in HOMEBREW_CACHE, set from a previous \fBbrew linkage\fR run\.
.
.SS "man [options]:"
.SS "\fBman\fR [\fIoptions\fR]:"
Generate Homebrew\'s manpages\.
.
.TP
......@@ -859,18 +859,18 @@ Return a failing status code if changes are detected in the manpage outputs\. Th
\fB\-\-link\fR
It is now done automatically by \fBbrew update\fR\.
.
.SS "mirror formulae:"
.SS "\fBmirror\fR \fIformulae\fR:"
Reuploads the stable URL for a formula to Bintray to use it as a mirror\.
.
.TP
\fBprof\fR [ruby options]
Run Homebrew with the Ruby profiler\. For example:
.
.SS "pull [options] [formula]:"
.SS "pull [\fBoptions\fR] [\fIformula\fR]:"
Gets a patch from a GitHub commit or pull request and applies it to Homebrew\. Optionally, installs the formulae changed by the patch\.
.
.P
Each patch\-source may be one of:
Each \fIpatch\-source\fR may be one of:
.
.P
~ The ID number of a PR (pull request) in the homebrew/core GitHub repository
......@@ -928,8 +928,8 @@ Publish at the given Bintray organisation\.
\fB\-\-test\-bot\-user\fR
Pull the bottle block commit from the specified user on GitHub\.
.
.SS "release\-notes [previous_tag] [end_ref]:"
Output the merged pull requests on Homebrew/brew between two Git refs\. If no previous_tag is provided it defaults to the latest tag\. If no end_ref is provided it defaults to origin/master\.
.SS "\fBrelease\-notes\fR [\fIprevious_tag\fR] [\fIend_ref\fR]:"
Output the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
.
.TP
\fB\-\-markdown\fR
......@@ -939,7 +939,7 @@ Output as a Markdown list\.
\fBruby\fR [\fIruby options\fR]
Run a Ruby instance with Homebrew\'s libraries loaded\. For example:
.
.SS "tap\-new user/repo:"
.SS "\fBtap\-new\fR \fIuser\fR/\fIrepo\fR:"
Generate the template files for a new tap\.
.
.TP
......@@ -958,8 +958,8 @@ If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are n
.IP
Example: \fBbrew install jruby && brew test jruby\fR
.
.SS "tests [options] formula:"
Run Homebrew\'s unit and integration tests\. If provided, \-\-only=test_script runs only test_script_spec\.rb, and \-\-seed randomizes tests with the provided value instead of a random seed\.
.SS "\fBtests\fR [\fIoptions\fR] \fIformula\fR:"
Run Homebrew\'s unit and integration tests\. If provided, \fB\-\-only=\fR\fItest_script\fR runs only \fItest_script\fR_spec\.rb, and \fB\-\-seed\fR randomizes tests with the provided value instead of a random seed\.
.
.TP
\fB\-\-coverage\fR
......@@ -985,11 +985,11 @@ Run only \fItest_script\fR_spec\.rb
\fB\-\-seed\fR
Randomizes tests with the provided value instead of a random seed\.
.
.SS "update\-test [options]:"
Runs a test of brew update with a new repository clone\.
.SS "\fBupdate\-test\fR [options]:"
Runs a test of \fBbrew update\fR with a new repository clone\.
.
.P
If no arguments are passed, use origin/master as the start commit\.
If no arguments are passed, use \fBorigin/master\fR as the start commit\.
.
.TP
\fB\-\-to\-tag\fR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment