Commit graph

26 commits

Author SHA1 Message Date
Andrey Makarov
417b90a7e5
Improve Markdown code blocks & start moving docs to Markdown style (#19954)
- add additional parameters parsing (other implementations will just
  ignore them). E.g. if in RST we have:

  .. code:: nim
     :test: "nim c $1"

     ...

  then in Markdown that will be:

  ```nim test="nim c $1"
  ...
  ```

- implement Markdown interpretation of additional indentation which is
  less than 4 spaces (>=4 spaces is a code block but it's not
implemented yet). RST interpretes it as quoted block, for Markdown it's
just normal paragraphs.
- add separate `md2html` and `md2tex` commands. This is to separate
  Markdown behavior in cases when it diverges w.r.t. RST significantly —
most conspicously like in the case of additional indentation above, and
also currently the contradicting inline rule of Markdown is also turned
on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and
RST arbitrarily is a way to nowhere, we need to provide a way to fix the
particular behavior. Note that still all commands have **both** Markdown
and RST features **enabled**. In this PR `*.nim` files can be processed
only in Markdown mode, while `md2html` is for `*.md` files and
`rst2html` for `*.rst` files.
- rename `*.rst` files to `.*md` as our current default behavior is
  already Markdown-ish
- convert code blocks in `docgen.rst` to Markdown style as an example.
  Other code blocks will be converted in the follow-up PRs
- fix indentation inside Markdown code blocks — additional indentation
  is preserved there
- allow more than 3 backticks open/close blocks (tildas \~ are still not
  allowed to avoid conflict with RST adornment headings) see also
https://github.com/nim-lang/RFCs/issues/355
- better error messages
- (other) fix a bug that admonitions cannot be used in sandbox mode; fix
  annoying warning on line 2711
2022-07-15 19:27:54 +02:00
Andrey Makarov
4341b06f65
RST: improve simple tables (#19859)
* RST: improve simple tables

* nim 1.0 gotchas

* Still allow legacy boundaries like `----`
2022-06-04 07:03:03 +02:00
Andreas Rumpf
a9223d4cdd
nep1: make header reflect reality (#19294) 2021-12-29 12:18:32 +01:00
Andrey Makarov
7e21218a07
follow-up #18013 - inline syntax highlighting (#18166) 2021-06-04 16:16:51 +02:00
Timothee Cour
826ad2f36f
nep1: guidelines for getters and setters (#17645)
* nep1: guidelines for getters and setters
* address a comment
2021-04-09 07:09:04 +02:00
flywind
045400ad92
ref https://github.com/nim-lang/Nim/pull/17333 (#17495) 2021-03-25 07:07:29 +01:00
quantimnot
83ae70cb54
RST backtick refactor (all *.rst except manual.rst and rst_examples.rst) (#17258)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-03-18 20:37:55 -07:00
Danil Yarantsev
4b53f697fa
Remove the note about old naming conventions (#17222) 2021-03-02 10:26:07 +01:00
Danil Yarantsev
4f97898753
Follow NEP1 in NEP1 (#17221) 2021-03-02 02:23:47 +03:00
flywind
1efaef52a2
[nep1] Use std prefix for standard library modules (#17105) 2021-02-19 15:47:03 -08:00
Timothee Cour
bbaa05dc82
followup #17065 (#17090) 2021-02-18 11:24:21 -08:00
Timothee Cour
8162c47b0f
nep1: triple quote literals should start with newline (#17065) 2021-02-18 20:14:10 +01:00
Timothee Cour
897cb4b077
nep1: prefer a..b to a .. b except if b has an operator (eg: a .. -1) (#16992)
* nep1: prefer `a..b` to `a .. b` except if b has an operator

* address comments

* address comment
2021-02-10 12:13:28 +01:00
Timothee Cour
534a95aee0
nep1: prefer self to this (#16927) 2021-02-04 14:09:53 +01:00
Andrey Makarov
6877e0c8a3
RST tables: fix latex col number; allow less than three of = (#16040) 2020-12-04 08:50:17 +01:00
narimiran
5e9dd81baa more "eg" fixes 2020-10-20 10:51:50 +02:00
Sizhe Zhao
70b07edf42
Fix missing comma (#14829) 2020-06-27 12:11:29 +02:00
Timothee Cour
79c90b30ee
nep1: use subjectVerb, not verbSuject (#14732) 2020-06-19 23:38:43 +02:00
Araq
f8e219b877 add the apis.txt table to nep1.rst 2018-07-09 12:35:25 +02:00
Daniil Yarancev
c0ea647c37
Remove #
I don't even know how it got there.
2018-05-27 18:48:24 +03:00
Andreas Rumpf
5e1e1a9145 fixes #7551 2018-04-11 23:26:20 +02:00
Dominik Picheta
b938a5b884 Cleaned up nep1 and simplified the style choices offered by it. 2017-03-16 22:34:49 +01:00
Dominik Picheta
19c436ab20 Update nep1 to show type keyword on its own line 2017-03-15 21:48:46 +01:00
Anthon van der Neut
11d0265018 inconsistent insertion of space after colon 2017-01-21 19:16:02 +01:00
Joshua Olson
4887bb2bef Fix punctuation
Not sure if any lines became too long...
2016-06-23 17:26:22 -06:00
Araq
eed0128916 renamed most remaining .txt documentation files to .rst 2016-06-07 04:04:49 +02:00
Renamed from doc/nep1.txt (Browse further)