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

fix RST parsing after option lists #17442

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Conversation

a-mr
Copy link
Contributor

@a-mr a-mr commented Mar 21, 2021

Fixes a minor bug with parsing failure after an option list finished (ref #17340 ).

An example from nimc.rst/basicopt.txt:

Command:
  //compile, c              compile project with default code generator (C)
  //r                       compile to $nimcache/projname, run with [arguments]
                            using backend specified by `--backend` (default: c)
  //doc                     generate the documentation for inputfile for
                            backend specified by `--backend` (default: c)

Arguments:
  arguments are passed to the program being run (if --run option is selected)

Before (nim stable, nim devel):

image

After:

image

Another similar bug:

* a
  -m   desc
  -n   very long
       desc
-d  option

Before:
image

After:
image

(Found while working on #17415 .)

  • Also documented a rule for working with indentation and p.idx advancing in rst.nim
  • Also documented Nim-specific double-slash // option

cc @narimiran

@a-mr a-mr mentioned this pull request Mar 24, 2021
28 tasks
@narimiran narimiran merged commit 46364e6 into nim-lang:devel Mar 25, 2021
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
a-mr added a commit to a-mr/Nim that referenced this pull request Apr 4, 2021
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants