Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 fixes in Markdown files #11235

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/docs/reference/other-new-features/indentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: doc-page
title: Optional Braces
title: "Optional Braces"
---

Scala 3 enforces some rules on indentation and allows some occurrences of braces `{...}` to be optional:
@@ -9,7 +9,8 @@ Scala 3 enforces some rules on indentation and allows some occurrences of braces
- Second, some occurrences of braces `{...}` are made optional. Generally, the rule
is that adding a pair of optional braces will not change the meaning of a well-indented program.

These changescan can be turned off with the compiler flag `-noindent`.
These changes can be turned off with the compiler flag `-noindent`.

### Indentation Rules

The compiler enforces two rules for well-indented programs, flagging violations as warnings.
4 changes: 2 additions & 2 deletions docs/docs/reference/syntax.md
Original file line number Diff line number Diff line change
@@ -87,19 +87,19 @@ semi ::= ‘;’ | nl {nl}

## Optional Braces

The lexical analyzer also inserts `indent` and `outdent` tokens that represent regions of indented code [at certain points](../reference/other-new-features-indentation.html)
The lexical analyzer also inserts `indent` and `outdent` tokens that represent regions of indented code [at certain points](../other-new-features/indentation.md).

In the context-free productions below we use the notation `<<< ts >>>`
to indicate a token sequence `ts` that is either enclosed in a pair of braces `{ ts }` or that constitutes an indented region `indent ts outdent`. Analogously, the
notation `:<<< ts >>>` indicates a token sequence `ts` that is either enclosed in a pair of braces `{ ts }` or that constitutes an indented region `indent ts outdent` that follows
a `:` at the end of a line.


```
<<< ts >>> ::= ‘{’ ts ‘}’
| indent ts outdent
:<<< ts >>> ::= [nl] ‘{’ ts ‘}’
| `:` indent ts outdent
```

## Keywords