Skip to content

Commit

Permalink
fix markdown linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenad committed Jun 19, 2024
1 parent 2058a58 commit 03089d1
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 18 deletions.
5 changes: 4 additions & 1 deletion bin/lint_markdown.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env bash
set -eo pipefail

npx markdownlint-cli \
markdownlint_cli_args="$1"

npx markdownlint-cli2 \
$markdownlint_cli_args \
docs/*.md \
concepts/**/*.md \
exercises/**/*.md
5 changes: 4 additions & 1 deletion concepts/strings/introduction.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Introduction

In Cairo, there's no native type for strings. Instead, you can use a single `felt252` to store a short string of up to 31 characters, or a `ByteArray` for strings of arbitrary length. Short strings use single quotes and `ByteArray` uses double quotes. All characters must follow the ASCII standard.
In Cairo, there's no native type for strings. Instead, you can use a single
`felt252` to store a short string of up to 31 characters, or a `ByteArray`
for strings of arbitrary length. Short strings use single quotes and
`ByteArray` uses double quotes. All characters must follow the ASCII standard.
6 changes: 5 additions & 1 deletion docs/ABOUT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# About

[Cairo](https://www.cairo-lang.org/) is a Rust-inspired language that aims to make it easy to build scalable [dApps](https://en.wikipedia.org/wiki/Decentralized_application) with the power of [validity proofs](https://en.wikipedia.org/wiki/Zero-knowledge_proof).
[Cairo][cairo] is a Rust-inspired language that aims to make it easy to build
scalable [dApps][dapps] with the power of [validity proofs][zkp].

[cairo]: https://www.cairo-lang.org/
[dapps]: https://en.wikipedia.org/wiki/Decentralized_application
[zkp]: https://en.wikipedia.org/wiki/Zero-knowledge_proof
<!-- TODO: write document
This document contains a short introduction to the language.
Expand Down
6 changes: 4 additions & 2 deletions exercises/practice/armstrong-numbers/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Instructions

An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits.
An [Armstrong number][armstrong-number] is a number that is the sum of its own
digits each raised to the power of the number of digits.

For example:

- 9 is an Armstrong number, because `9 = 9^1 = 9`
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
- 154 is _not_ an Armstrong number, because:
`154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`

Write some code to determine whether a number is an Armstrong number.

Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/hello-world/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
The classical introductory exercise.
Just say "Hello, World!".

["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.
["Hello, World!"][hello-world] is the traditional first program for beginning
programming in a new language or environment.

The objectives are simple:

Expand Down
10 changes: 6 additions & 4 deletions exercises/practice/leap/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
A leap year (in the Gregorian calendar) occurs:

- In every year that is evenly divisible by 4.
- Unless the year is evenly divisible by 100, in which case it's only a leap year if the year is also evenly divisible by 400.
- Unless the year is evenly divisible by 100, in which case it's only a leap
year if the year is also evenly divisible by 400.

Some examples:

- 1997 was not a leap year as it's not divisible by 4.
- 1900 was not a leap year as it's not divisible by 400.
- 2000 was a leap year!

~~~~exercism/note
For a delightful, four-minute explanation of the whole phenomenon of leap years, check out [this YouTube video](https://www.youtube.com/watch?v=xX96xng7sAE).
~~~~
> For a delightful, four-minute explanation of the whole phenomenon of leap
years, check out [this YouTube video][video].

[video]: https://www.youtube.com/watch?v=xX96xng7sAE
3 changes: 2 additions & 1 deletion exercises/practice/semi-structured-logs/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

## 1. Emit semi-structured messages

- `match` comes in handy when working with enums. In this case, see how you might use it when figuring how what kind of log message to generate.
- `match` comes in handy when working with enums. In this case, see how you
might use it when figuring how what kind of log message to generate.

[tcb-enums]: https://book.cairo-lang.org/ch06-01-enums.html
[tcb-match]: https://book.cairo-lang.org/ch06-02-the-match-control-flow-construct.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Introduction

Enums, short for enumerations, are a type that limits all possible values of some data. The possible values of an `enum` are called variants. Enums also work well with `match` and other control flow operators to help you express intent in your Cairo programs.
Enums, short for enumerations, are a type that limits all possible values of
some data. The possible values of an `enum` are called variants. Enums also
work well with `match` and other control flow operators to help you express
intent in your Cairo programs.
15 changes: 9 additions & 6 deletions exercises/shared/.docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

<!-- TODO: write document
This document should contain track-specific instructions on how to get help when
the student is stuck.
This document should contain track-specific instructions on how to get help
when the student is stuck.
The instructions should be short and to the point.
You could link to resources like Gitter channels, forums or mailing lists:
whatever can help a student become unstuck.
This document should **not** link to Exercism-wide (track-agnostic) help resources,
as those resources will automatically be included in the HELP.md file.
This document should **not** link to Exercism-wide (track-agnostic) help
resources, as those resources will automatically be included in the HELP.md
file.
The links in this document can overlap with those in docs/LEARNING.md or docs/RESOURCES.md
The links in this document can overlap with those in docs/LEARNING.md or
docs/RESOURCES.md
When a student downloads an exercise via the CLI, this file's contents are
included into the HELP.md file.
See https://exercism.org/docs/building/tracks/shared-files for more information. -->
See https://exercism.org/docs/building/tracks/shared-files for more
information. -->

0 comments on commit 03089d1

Please sign in to comment.