Skip to content

Commit

Permalink
Merge pull request #35719 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Dec 19, 2024
2 parents f5ab119 + bc192da commit 259cdd8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,44 @@ Some text I want to provide a direct link to, but which doesn't have its own hea
> [!TIP]
> Custom anchors are not considered by the automatic naming and numbering behavior of automatic heading links.
## Line breaks

If you're writing in issues, pull requests, or discussions in a repository, {% data variables.product.github %} will render a line break automatically:

```markdown
This example
Will span two lines
```

However, if you are writing in an .md file, the example above would render on one line without a line break. To create a line break in an .md file, you will need to include one of the following:

* Include two spaces at the end of the first line.
<pre>
This example&nbsp;&nbsp;
Will span two lines
</pre>
* Include a backslash at the end of the first line.

```markdown
This example\
Will span two lines
```

* Include an HTML single line break tag at the end of the first line.

```markdown
This example<br/>
Will span two lines
```

If you leave a blank line between two lines, both .md files and Markdown in issues, pull requests, and discussions will render the two lines separated by the blank line:

```markdown
This example

Will have a blank line separating both lines
```

## Images

You can display an image by adding <kbd>!</kbd> and wrapping the alt text in `[ ]`. Alt text is a short text equivalent of the information in the image. Then, wrap the link for the image in parentheses `()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ This sentence uses $\` and \`$ delimiters to show math inline: $`\sqrt{3x-1}+(1+

To add a math expression as a block, start a new line and delimit the expression with two dollar symbols `$$`.

>[!TIP] If you're writing in an .md file, you will need to use specific formatting to create a line break, such as ending the line with a backslash as shown in the example below. For more information on line breaks in Markdown, see "[AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#line-breaks)."
```text
**The Cauchy-Schwarz Inequality**
**The Cauchy-Schwarz Inequality**\
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
```

![Screenshot of rendered Markdown showing how a complex equation displays on {% data variables.product.prodname_dotcom %}. The bolded text reads "The Cauchy-Schwarz Inequality". Below the text, there is an equation showing open paren the sum from k equals 1 to n of a sub k b sub k close paren squared is less than or equal to open paren the sum from k equals 1 to n of a sub k squared close paren times open paren the sum from k equals 1 to n of b sub k squared close paren.](/assets/images/help/writing/math-expression-as-a-block-rendering.png)
![Screenshot of rendered Markdown showing how a complex equation displays on {% data variables.product.prodname_dotcom %}. The bolded text reads "The Cauchy-Schwarz Inequality". Below the text, there is an equation showing the The Cauchy-Schwarz Inequality formula.](/assets/images/help/writing/math-expression-as-a-block-rendering.png)

{% ifversion math-fenced-blocks %}

Expand Down

0 comments on commit 259cdd8

Please sign in to comment.