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

RST backtick refactor (all *.rst except manual.rst and rst_examples.rst) #17258

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

quantimnot
Copy link
Contributor

Added .. default-role:: code directive to all rst files except manual.rst.

Replaced double backticks with single backticks and realign shifted table columns in all rst files except manual.rst.

Replaced triple backtick code blocks with .. code-block:: nim code blocks.

@timotheecour
Copy link
Member

@@ -15,7 +15,7 @@ General Guidelines
and `nim doc` supports it. Likewise with rst files: `nim rst2html` will render those as monospace, and
adding `.. default-role:: code` to an rst file will also make those render as monospace when rendered directly
in tools such as github.
* In nim sources, for links, prefer `[link text](link.html)` to ``` `link text<link.html>`_ ```
* In nim sources, for links, prefer `[link text](link.html)` to `` `link text<link.html>`_ ``
Copy link
Member

Choose a reason for hiding this comment

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

bad change here

@@ -142,33 +143,33 @@ Merging usually merges maps and alias sets: nilabilities are merged like this:
else:
MaybeNil

Special handling is for ``.isNil`` and `` == nil``, also for ``not``, ``and`` and ``or``.
Special handling is for `.isNil` and ` == nil`, also for `not`, `and` and `or`.
Copy link
Member

@timotheecour timotheecour Mar 19, 2021

Choose a reason for hiding this comment

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

pre-existing, but renders badly because of the space that prevents interpretation

@@ -102,7 +104,7 @@ String and character literals
-----------------------------

String literals are enclosed in double-quotes; character literals in single
quotes. Special characters are escaped with ``\``: ``\n`` means newline, ``\t``
quotes. Special characters are escaped with ``\\``: ``\n`` means newline, ``\t``
Copy link
Member

Choose a reason for hiding this comment

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

bad change; should be fixed in followup PR

They are written with three quotes: ``""" ... """``; they can span over
multiple lines and the ``\`` is not an escape character either. They are very
They are written with three quotes: `""" ... """`; they can span over
multiple lines and the ``\\`` is not an escape character either. They are very
Copy link
Member

Choose a reason for hiding this comment

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

ditto


The operator's precedence is determined by its first character. The details
can be found in the manual.

To define a new operator enclose the operator in backticks "``":
To define a new operator enclose the operator in backticks "`":
Copy link
Member

Choose a reason for hiding this comment

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

ditto


.. code-block:: nim
proc `$` (x: myDataType): string = ...
# now the $ operator also works with myDataType, overloading resolution
# ensures that $ works for built-in types just like before

The "``" notation can also be used to call an operator just like any other
The "`" notation can also be used to call an operator just like any other
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member

@timotheecour timotheecour left a comment

Choose a reason for hiding this comment

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

LGTM, I checked everything using the same technique as described in #17259 (review):
checking both the diff, as well as the rendered html files and checking that each difference (a very small number) is intentional, or noting un-intentional ones as TODO for a followup PR

@timotheecour timotheecour merged commit 83ae70c into nim-lang:devel Mar 19, 2021
@timotheecour timotheecour added the TODO: followup needed remove tag once fixed or tracked elsewhere label Mar 19, 2021
@timotheecour
Copy link
Member

timotheecour commented Mar 19, 2021

merged, same rationale as #17259 (comment)

@quantimnot thanks for this and the other PR! could you please followup with a PR to address the above mentioned points?

also, a separate PR welcome for finishing off the work started here: #17217 so we can finally turn the page on this :)

@quantimnot
Copy link
Contributor Author

Yeah, I'll try to follow up on this pr today or tomorrow.
I need to pass on #17217 until I have some other work finished.

OT: The other work is GDB/LLDB/... extensions for Nim. I remember reading a comment from you regarding some
work you did for a LLDB plugin. Do you have any work (even sloppy experimental code) that you can share? I'd primarily be interested in any formatters you have developed.

@quantimnot quantimnot deleted the rst_backtick_refactor branch March 19, 2021 13:03
@quantimnot
Copy link
Contributor Author

I'm going to wait until #17315 is merged.

ringabout pushed a commit to ringabout/Nim that referenced this pull request Mar 22, 2021
…st) (nim-lang#17258)

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
@timotheecour
Copy link
Member

timotheecour commented Mar 24, 2021

@quantimnot #17315 has been merged, you can go ahead with followups for this PR as well as #17259

OT: The other work is GDB/LLDB/.

followup timotheecour#599 (comment)

ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
…st) (nim-lang#17258)

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO: followup needed remove tag once fixed or tracked elsewhere
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants