Skip to content

Commit

Permalink
fix: Minor docs format (#4532)
Browse files Browse the repository at this point in the history
* fix links and categories

* update per slack feedback
  • Loading branch information
jessiemongeon1 authored May 3, 2024
1 parent d7b0f19 commit 3bebf96
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions doc/md/base/_category_.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ position: 7
label: 'Motoko base library'
collapsible: true # make the category collapsible
collapsed: true

1 change: 1 addition & 0 deletions doc/md/canister-maintenance/_category_.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ position: 3
label: 'Canister maintenance'
collapsible: true # make the category collapsible
collapsed: true

8 changes: 4 additions & 4 deletions doc/md/reference/language-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Equality and inequality are structural and based on the observable content of th
| `<binop>` | Category | |
| --------- | -------- | ---------------------------------------------- |
| `&` | B | Bitwise and |
| `\|` | B | Bitwise or |
| `|` | B | Bitwise or |
| `^` | B | Exclusive or |
| `<<` | B | Shift left |
| `␣>>` | B | Shift right (must be preceded by whitespace) |
Expand Down Expand Up @@ -288,7 +288,7 @@ Equality and inequality are structural and based on the observable content of th
| `%=` | A | In place modulo |
| `**=` | A | In place exponentiation |
| `&=` | B | In place logical and |
| `\|=` | B | In place logical or |
| `|=` | B | In place logical or |
| `^=` | B | In place exclusive or |
| `<<=` | B | In place shift left |
| `>>=` | B | In place shift right |
Expand All @@ -310,15 +310,15 @@ The following table defines the relative precedence and associativity of operato
| ---------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| LOWEST | none | `if _ _` (no `else`), `loop _` (no `while`) |
| (higher) | none | `else`, `while` |
| (higher) | right | `:=`, `+=`, `-=`, `*=`, `/=`, `%=`, `**=`, `#=`, `&=`, `\|=`, `^=`, `<<=`, `>>=`, `<<>=`, `<>>=`, `+%=`, `-%=`, `*%=`, `**%=` |
| (higher) | right | `:=`, `+=`, `-=`, `*=`, `/=`, `%=`, `**=`, `#=`, `&=`, `|=`, `^=`, `<<=`, `>>=`, `<<>=`, `<>>=`, `+%=`, `-%=`, `*%=`, `**%=` |
| (higher) | left | `:` |
| (higher) | left | `|>` |
| (higher) | left | `or` |
| (higher) | left | `and` |
| (higher) | none | `==`, `!=`, `<`, `>`, `<=`, `>`, `>=` |
| (higher) | left | `+`, `-`, `#`, `+%`, `-%` |
| (higher) | left | `*`, `/`, `%`, `*%` |
| (higher) | left | `\|` |
| (higher) | left | `|` |
| (higher) | left | `&` |
| (higher) | left | `^` |
| (higher) | none | `<<`, `>>`, `<<>`, `<>>` |
Expand Down
2 changes: 1 addition & 1 deletion doc/md/writing-motoko/actor-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 3

## Overview

Actor classes enable you to create networks of actors programmatically. Actor classes have to be defined in a separate source file. To illustrate how to define and import actor classes, the following example implements a distributed map of keys of type [[`Nat`](../base/Nat.md)](../base/Nat.md) to values of type [`Text`](../base/Text.md). It provides simple insert and lookup functions, `put(k, v)` and `get(k)`, for working with these keys and values.
Actor classes enable you to create networks of actors programmatically. Actor classes have to be defined in a separate source file. To illustrate how to define and import actor classes, the following example implements a distributed map of keys of type [`Nat`](../base/Nat.md) to values of type [`Text`](../base/Text.md). It provides simple insert and lookup functions, `put(k, v)` and `get(k)`, for working with these keys and values.

## Defining an actor class

Expand Down
2 changes: 1 addition & 1 deletion doc/md/writing-motoko/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 9
---

# Errors and options
# Error handling

## Overview

Expand Down
2 changes: 1 addition & 1 deletion doc/md/writing-motoko/integers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The type [`Nat`](../base/Nat.md) is a subtype of [`Int`](../base/Int.md), so you

Motoko also provides bounded, or fixed-size integers and naturals, using a suffix to indicate the size of the type, in bits.

Thus [`Int8`](../base/Int8.md), [`Int16`](../base/Int16.md) and [`Int32`](../base/Int32.md) and [[`Int64`](../base/Int64.md)](../base/Int64.md) are 8-, 16-, 32- and 64-bit integer types, while [`Nat8`](../base/Nat8.md), [`Nat16`](../base/Nat16.md), [`Nat32`](../base/Nat32.md), and [`Nat64`](../base/Nat64.md) are 8-, 16-, 32- and 64-bit natural types.
Thus [`Int8`](../base/Int8.md), [`Int16`](../base/Int16.md) and [`Int32`](../base/Int32.md) and [`Int64`](../base/Int64.md) are 8-, 16-, 32- and 64-bit integer types, while [`Nat8`](../base/Nat8.md), [`Nat16`](../base/Nat16.md), [`Nat32`](../base/Nat32.md), and [`Nat64`](../base/Nat64.md) are 8-, 16-, 32- and 64-bit natural types.

An arithmetic operation on a value of a fixed-size type will trap if its result exceeds the bounds of the fixed-size type, either due to overflow or underflow.
For example, `255 : Nat8 + 3` traps, because 258 is too large for a [`Nat8`](../base/Nat8.md).
Expand Down
2 changes: 1 addition & 1 deletion doc/md/writing-motoko/local-objects-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This object `counter` has the following object type, written as a list of field-
}
```

Each field type consists of an identifier, a colon `:`, and a type for the field content. Here, each field is a function, and thus has an arrow type form (`_ _`).
Each field type consists of an identifier, a colon `:`, and a type for the field content. Here, each field is a function, and thus has an arrow type form (`_ -> _`).

In the declaration of `object`, the variable `count` was explicitly declared neither as `public` nor as `private`.

Expand Down

0 comments on commit 3bebf96

Please sign in to comment.