Skip to content

[docs/reference] more fixes in Markdown files #10860

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

Merged
merged 2 commits into from
Dec 19, 2020

Conversation

michelou
Copy link
Contributor

@michelou michelou commented Dec 18, 2020

Follow up of PR #10767 and PR #10826.

Fixes more issues found in Markdown files in docs/reference/, e.g,

  • removed extra spaces/lines
  • corrected misspellings (e.g "toplevel" -> "top-level")
  • corrected left margin in code block
  • reduced line width in several code blocks (to avoid text overflow in the right margin)
  • added several external links (e.g. alpha renaming)

PS. The above changes can also be viewed in the PDF document scala3_reference.pdf (734 Kb) generated with Pandoc 2.11.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @michelou 👍

@@ -196,6 +196,8 @@ private def dynamicPower(x: Double, n: Int): Double =
else x * dynamicPower(x, n - 1)
```

This assumes a `.value` that maps tree nodes representing constants to their values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be not necessary, as .value indeed exists in stdlib.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes from @nicolasstucki's suggestion (see his comment in PR #10826).

Copy link
Contributor

@liufengyun liufengyun Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change it to something like the following:

In the above, the method .value maps a constant expression of the type Expr[T] to its value of the type T.

Copy link
Contributor Author

@michelou michelou Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (see below).

@michelou
Copy link
Contributor Author

michelou commented Dec 18, 2020

@SethTisue I bet you will like the following changes in scala3_reference.pdf :

  • The structure of the generated PDF document is now identical to the Online Reference documentation
    (I've moved the "More details" sections to the appendix).
  • The title of each chapter ends with an external link to the corresponding chapter in the online Reference documentation.

@liufengyun liufengyun merged commit 0e4fe3c into scala:master Dec 19, 2020
@michelou michelou deleted the scala3-docs branch December 19, 2020 08:04
@SethTisue
Copy link
Member

@michelou I would like to tweet about the existence of this PDF. Should I use the https://github.com/michelou/dotty-examples/blob/master/docs/scala3_reference.pdf URL, or is there a plan to have it live in a more "official" location?

@michelou
Copy link
Contributor Author

@SethTisue I have another PR pending. Again I will assign @liufengyun as reviewer and I will ask him to rule on a more "official" location.
NB. By the way I have no idea what are the plans regarding PDF documentation in general at the Scala Center.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants