Markdown 構文ガイド
Bitbucket Data Center and Server uses Markdown for formatting text, as specified in CommonMark (with a few extensions).
You can use Markdown in the following places:
- あらゆるプル リクエストの説明、コメント、または
- README ファイル (.md ファイル拡張子の場合)
To preview your markdown, use Control
+Shift
+P
or Command
+Shift
+P
.
Note that Bitbucket Data Center and Server doesn't support HTML tags and all HTML tags are escaped.
マークダウン構文
以下のページでは、Markdown 構文の例について説明します。すべての Markdown 構文の一覧については、CommonMark のヘルプまたは仕様を参照してください。
このページの内容
見出し
# This is an H1
## This is an H2
###### This is an H6
This is also an H1
==================
This is also an H2
------------------
段落
段落は空白行で区切られます。新しい段落を作成するには、<return> を 2 回押します。
Paragraph 1
Paragraph 2
文字のスタイル
*Italic characters*
_Italic characters_
**bold characters**
__bold characters__
~~strikethrough text~~
番号なしのリスト
* Item 1
* Item 2
* Item 3
* Item 3a
* Item 3b
* Item 3c
番号付きリスト
1. Step 1
2. Step 2
3. Step 3
1. Step 3.1
2. Step 3.2
3. Step 3.3
リスト内のリスト
1. Step 1
2. Step 2
3. Step 3
* Item 3a
* Item 3b
* Item 3c
引用
Introducing my quote:
> Neque porro quisquam est qui
> dolorem ipsum quia dolor sit amet,
> consectetur, adipisci velit...
インライン コード文字
Use the backtick to refer to a `function()`.
There is a literal ``backtick (`)`` here.
コード ブロック
Indent every line of the block by at least 4 spaces.
This is a normal paragraph:
This is a code block.
With multiple lines.
Alternatively, you can use 3 backtick quote marks before and after the block, like this:
```
This is a code block
```
To add syntax highlighting to a code block, add the name of the language immediately
after the backticks:
```javascript
var oldUnload = window.onbeforeunload;
window.onbeforeunload = function() {
saveCoverage();
if (oldUnload) {
return oldUnload.apply(this, arguments);
}
};
```
Bitbucket uses CodeMirror to apply syntax highlighting to the rendered markdown in comments, READMEs and pull request descriptions. All the common coding languages are supported, including C, C++, Java, Scala, Python and JavaScript. See Configuring syntax highlighting for file extensions.
コード ブロック内では、アンパサンド (&) と山括弧 (< および>) は自動的に HTML エンティティに変換されます。
外部 Web サイトへのリンク
This is [an example](http://www.example.com/) inline link.
[This link](http://example.com/ "Title") has a title attribute.
Links are also auto-detected in text: http://example.com/
課題キーを Jira アプリケーションにリンク
When you use Jira application issue keys (of the default format) in comments and pull request descriptions Bitbucket automatically links them to the Jira application instance.
The default Jira application issue key format is two or more uppercase letters ([A-Z][A-Z]+
), followed by a hyphen and the issue number, for example TEST-123.
プル リクエストへのリンク
Introduced with Bitbucket 4.9, you can reference pull requests from comments and descriptions in other pull requests. The syntax for linking to pull request looks like this:
projectkey/repo-slug#pr_id
同じプロジェクトおよびリポジトリ内でプル リクエストにリンクするには、プル リクエスト ID を含めます。
#123
同じプロジェクトの別のリポジトリのプル リクエストにリンクするには、プル リクエスト ID の前にリポジトリのスラッグを含めます。
example-repo#123
別のプロジェクトおよびリポジトリのプル リクエストにリンクするには、プル リクエスト ID の前にプロジェクト キーとリポジトリのスラッグを含めます。
PROJ/example-repo#123
画像
インライン画像の構文は次のようになります。



例:
...

...
参照画像のリンクは次のようになります。
![Alt text][id]
Where 'id' is the name of a previously defined image reference, using syntax similar to link references:
[id]: url/to/image.jpg "Optional title attribute"
An example using reference image links:
...
<--Collected image definitions-->
[MockupA]: http://monosnap.com/image/bOcxxxxLGF.png "Screenshot of Feature A mockup"
...
<!--Using an image reference-->
![Mockup for feature A][MockupA]
...
You can specify image height and width as key=value
pairs inside curly braces { } after the applicable image node. For example:
{width=640 height=480}
表
| Day | Meal | Price |
| --------|---------|-------|
| Monday | pasta | $6 |
| Tuesday | chicken | $8 |
バックスラッシュ エスケープ
特定の文字の前にバックスラッシュを追加し、特別なマークダウンの意味ではなく文字どおりに表示できます。これは次の文字に適用されます。
\ backslash
` backtick
* asterisk
_ underscore
{} curly braces
[] square brackets
() parentheses
# hash mark
> greater than
+ plus sign
- minus sign (hyphen)
. dot
! exclamation mark
README ファイル
If your repository contains a README.md
file at the root level, Bitbucket displays its contents on the repository's Source page if the file has the .md extension. The file can contain only Markdown.