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

close #16646; since now works with bootstrap nim post csources_v1 #17895

Merged

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 29, 2021

Paragraph.

A. stringA
B. stringB
C. string1
string2

before PR:

/Users/timothee/git_clone/nim/timn/tests/nim/all/t12224.rst(6, 1) Warning: RST style:
  not enough indentation on line 6
      (should be at column 4 if it's a continuation of enum. list),
  or no blank line after line 5 (if it should be the next paragraph),
  or no escaping \ at the beginning of line 5
      (if lines 5..6 are a normal paragraph, not enum. list) [warnRstStyle]

after PR:

/Users/timothee/git_clone/nim/timn/tests/nim/all/t12224.rst(6, 1) Warning: RST style:
not enough indentation on line 6
  (should be at column 4 if it's a continuation of enum. list),
or no blank line after line 5 (if it should be the next paragraph),
or no escaping \ at the beginning of line 5
  (if lines 5..6 are a normal paragraph, not enum. list) [warnRstStyle]

(note that nim now has ascii unit separator to separate messages so there is no ambiguity here); this is now consistent with other messages which don't indent on the line right after the note eg:

/Users/timothee/git_clone/nim/timn/tests/nim/all/t12225.nim(6, 1) Error: undeclared identifier: 'bar3'
candidates (edit distance, scope distance); see '--spellSuggest':
 (1, 0): 'bar1' [proc declared in /Users/timothee/git_clone/nim/timn/tests/nim/all/t12225.nim(4, 6)]
 (1, 0): 'bar2' [proc declared in /Users/timothee/git_clone/nim/timn/tests/nim/all/t12225.nim(5, 6)]
  bar3()

future work

in future work, dedent itself could be improved though:

  • it doesn't work at CT
  • it (or indent) should have an optional pram to allow specifying indentation level after dedenting, so that this would be possible:
block:
  block:
    let a = """
    foo1
    foo2
    """.indent(2, fromMargin = true)

producing:

  foo1
  foo2

but note that in the case of this PR, this is note needed.

@timotheecour timotheecour added the TODO: followup needed remove tag once fixed or tracked elsewhere label Apr 29, 2021
@timotheecour timotheecour marked this pull request as ready for review April 29, 2021 21:03
@timotheecour timotheecour added the Ready For Review (please take another look): ready for next review round label Apr 29, 2021
@Araq Araq merged commit 3192995 into nim-lang:devel Apr 30, 2021
@timotheecour timotheecour deleted the pr_fix_16646_since_works_with_bootstrap branch April 30, 2021 17:25
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
…ces_v1 (nim-lang#17895)

* revive nim-lang#16627 now that csources_v1 was merged

* use dedent in rst.nim, refs nim-lang#17257 (comment)

* fix test and improve rendering of a rst warning
@metagn metagn removed the TODO: followup needed remove tag once fixed or tracked elsewhere label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review (please take another look): ready for next review round
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{.since.} doesn't work for bootstrap nim, nor 1.0.0, breaking valid code
3 participants