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

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

Merged
merged 3 commits into from
Jan 1, 2021

Conversation

michelou
Copy link
Contributor

@michelou michelou commented Dec 30, 2020

Follow up of PR #10767, #10826, #10860 and #10875.

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

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

- [Trait Parameters](other-new-features/trait-parameters.md) replace [early initializers](dropped-features/early-initializers.md) with a more generally useful construct.
- [Given Instances](contextual/givens.md)
- [Trait parameters](other-new-features/trait-parameters.md) replace [early initializers](dropped-features/early-initializers.md) with a more generally useful construct.
- [Given instances](contextual/givens.md)
replace implicit objects and defs, focussing on intent over mechanism.
- [Using Clauses](contextual/using-clauses.md) replace implicit parameters, avoiding their ambiguities.
Copy link
Contributor

@ShapelessCat ShapelessCat Dec 30, 2020

Choose a reason for hiding this comment

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

Using Clauses --> Using clauses

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using Clauses --> Using clauses

Done (6bc9dd0).

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

added attribute {.scala} to verbatim text (just as with fenced code blocks)

Is it an extension of markdown that is supported by the doc tool? If the motivation is for generating PDF, it seems simpler to assume {.scala} as the default, and only add the attribute if it's different.

@michelou
Copy link
Contributor Author

michelou commented Dec 30, 2020

LGTM

added attribute {.scala} to verbatim text (just as with fenced code blocks)

Is it an extension of markdown that is supported by the doc tool? If the motivation is for generating PDF, it seems simpler to assume {.scala} as the default, and only add the attribute if it's different.

  1. You're right, it may be not supported by the doc tool. I suggest to add one of the Scala3doc authors as a reviewer.
    NB. Based on my experiments an unknown attribute is just ignored.
  2. I assume you agree with my wish to get the same syntax coloring for Scala code both in verbatim text and in fenced code blocks.
    I see two options here (depending on point 1):
    • I find a way to set .scala as default attribute in verbatim text (although counter intuivite IMO)
    • I revert all attribute additions (and lose the correct coloring in the generated PDF document).

@liufengyun
Copy link
Contributor

2. I assume you agree with my wish to get the same syntax coloring for Scala code both in verbatim text and in fenced code blocks.

I think it's an improvement, thanks for your typography expertise to improve the quality of the doc. For fenced blocks, I'd like to suggest interpret them as Scala code by default if no language is specified. This way, fenced code and inline code also align in syntax.

@michelou
Copy link
Contributor Author

michelou commented Dec 30, 2020

  1. I assume you agree with my wish to get the same syntax coloring for Scala code both in verbatim text and in fenced code blocks.

I think it's an improvement, thanks for your typography expertise to improve the quality of the doc. For fenced blocks, I'd like to suggest interpret them as Scala code by default if no language is specified. This way, fenced code and inline code also align in syntax.

The reference documentatiom also contains EBNF grammar in fenced code blocks and a language attribute .ebnf does not exist as far as I know. Assuming Scala code by default would require such an attribute (or we would have to use the other syntax for EBNF).

@michelou
Copy link
Contributor Author

michelou commented Jan 1, 2021

@liufengyun I decided to postpone the addition of the {.scala} to not delay the other modifications (d96b2a2).

Let us handle it in another PR.

@liufengyun
Copy link
Contributor

@liufengyun I decided to postpone the addition of the {.scala} to not delay the other modifications (d96b2a2).

Let us handle it in another PR.

LGTM

@liufengyun liufengyun merged commit 141bf9e into scala:master Jan 1, 2021
@michelou michelou deleted the scala3-docs branch January 1, 2021 15:28
@michelou
Copy link
Contributor Author

michelou commented Jan 6, 2021

@abgruszecki Can you please validate your review for this PR and switch to Issue #11014. Thanks.

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