Launchpad comment parsing¶
Launchpad automatically parses and formats comment text, creating links to bugs, branches, and other resources when you use specific syntax patterns.
Whitespaces¶
Launchpad reduces any whitespace between non-whitespace characters to a single space, keeps whitespace to the left, and removes whitespace to the right.
Note
Technically Launchpad passes whitespace through and the browser just ignores the whitespace.
Examples¶
Input |
Output |
|---|---|
|
|
| Column 1 | Column 2 | Column 3 |
|------------+----------+-------------|
| Lorem | ipsum | dolor |
| sit | amet | consectetur |
| adipiscing | elit | sed |
|
| Column 1 | Column 2 | Column 3 |
|------------+----------+-------------|
| Lorem | ipsum | dolor |
| sit | amet | consectetur |
| adipiscing | elit | sed |
|
Paragraphs¶
Multiple newline characters will be reduced to one.
Examples¶
Input |
Output |
|---|---|
Here are two paragraphs with lots of whitespace between them.
But they're still just two paragraphs
|
Here are two paragraphs with lots of whitespace between them.
But they're still just two paragraphs
|
Mention a single Launchpad bug¶
Use any of these patterns to link to a bug. These patterns are case-insensitive.
Patterns:
bug <LP-Bug-Number>
bug #<LP-Bug-Number>
bug number <LP-Bug-Number>
bug num <LP-Bug-Number>
bug num. <LP-Bug-Number>
bug no <LP-Bug-Number>
bug no. <LP-Bug-Number>
bug report <LP-Bug-Number>
bug-report <LP-Bug-Number>
bug-<LP-Bug-Number>
bug=<LP-Bug-Number>
Examples¶
Input |
Output |
|---|---|
|
|
|
|
|
|
|
|
|
bug number. 123 |
|
|
|
|
|
|
|
|
|
|
|
bug#123 |
|
|
|
|
|
|
|
debug #52 |
Mention multiple Launchpad bugs¶
Use this pattern to link to multiple bugs. These patterns are case-insensitive. The amount of whitespace can be variable, but whitespace in other positions may prevent parsing.
Pattern:
LP: #<LP-Bug-Number>[, #<LP-Bug-Number>]...
Examples¶
Mention a branch¶
Link to a Launchpad branch using the lp URI syntax. The lp:
prefix will expand to https://bugs.launchpad.net/+code/. These
patterns are case-insensitive.
Patterns:
lp:<Relative-URL>
lp:/<Relative-URL>
lp:///<Relative-URL>
Examples¶
Input |
Output |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mention an FAQ thread¶
Link to a Launchpad FAQ thread by mentioning its number. These patterns are case-insensitive.
Patterns:
faq <faq-number>
faq #<faq-number>
faq-<faq-number>
faq=<faq-number>
faq item <faq-number>
faq number <faq-number>
Examples¶
Input |
Output |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
URIs¶
Launchpad automatically recognizes and links http, https,
ftp, sftp, mailto, news, irc, and jabber URIs.
Not recognized: tel, urn, telnet, ldap URIs, relative
URLs (e.g., example.com), and plain email addresses (e.g.,
test@example.com).
Examples¶
Input |
Output |
|---|---|
|
|
|
|
|
sftp://localhost:8086/bar/baz/foo.bar.html. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://localhost/bar/baz/foo.bar.html?a=b&b=a:b;c@d_e%f~g#h,j!k-l+m$n*o’p |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jabber:noreply@launchpad.net |
|
|
|
Quote removal¶
If a comment is entirely enclosed in double quotes ("Content"),
Launchpad will drop the quotes.
Examples¶
Input |
Output |
|---|---|
|
Content |