Skip to content

Commit

Permalink
fix(literals): move reference link into admonition (#856)
Browse files Browse the repository at this point in the history
* fix(literals): move reference link into admonition

Special blocks (admonitions) are rendered by themselves without
including the rest of the page. Therefore, a reference link from the bottom of the
file is unavailable and cannot be resolved properly. This is
fixed by moving it to the bottom of the block instead of the bottom of
the file.

* fix(literals): remove non-existent `d` suffix
  • Loading branch information
ahans authored Sep 12, 2024
1 parent c372ebe commit eeed6ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions concepts/literals/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This is a good default case and use-cases with the narrower `float` type are les
```cpp
auto light_year_in_m{9.46073e+15f}; // well in the range of float
auto earth_to_edge_comoving_distance_in_nm{4.32355e+32}; // needs double type for magnitude
auto eulers_number{2.718281828459045d}; // needs double type for precision
auto eulers_number{2.718281828459045}; // needs double type for precision
```

~~~~exercism/advanced
Expand Down Expand Up @@ -68,8 +68,9 @@ auto il_nam{"보는 것이 하는 것보다 더 재미있을 수가 없지"sv};
A _string_view_ can be seen as a reference to a const string.
[ascii-code]: https://www.ascii-code.com/
~~~~

[numbers-concept]: https://exercism.org/tracks/cpp/concepts/numbers
[in-depth-integers]: https://www.learncpp.com/cpp-tutorial/fixed-width-integers-and-size-t/
[ascii-code]: https://www.ascii-code.com/
5 changes: 3 additions & 2 deletions concepts/literals/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This is a good default case and use-cases with the narrower `float` type are les
```cpp
auto light_year_in_m{9.46073e+15f}; // well in the range of float
auto earth_to_edge_comoving_distance_in_nm{4.32355e+32}; // needs double type for magnitude
auto eulers_number{2.718281828459045d}; // needs double type for precision
auto eulers_number{2.718281828459045}; // needs double type for precision
```

~~~~exercism/advanced
Expand Down Expand Up @@ -68,8 +68,9 @@ auto il_nam{"보는 것이 하는 것보다 더 재미있을 수가 없지"sv};
A _string_view_ can be seen as a reference to a const string.
[ascii-code]: https://www.ascii-code.com/
~~~~

[numbers-concept]: https://exercism.org/tracks/cpp/concepts/numbers
[in-depth-integers]: https://www.learncpp.com/cpp-tutorial/fixed-width-integers-and-size-t/
[ascii-code]: https://www.ascii-code.com/

0 comments on commit eeed6ed

Please sign in to comment.