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

runnableExamples: \r renders as \c #9345

Closed
timotheecour opened this issue Oct 13, 2018 · 2 comments · Fixed by #14439
Closed

runnableExamples: \r renders as \c #9345

timotheecour opened this issue Oct 13, 2018 · 2 comments · Fixed by #14439

Comments

@timotheecour
Copy link
Member

timotheecour commented Oct 13, 2018

runnableExamples: \r renders as \c

proc removePrefix*(s: var string, chars: set[char] = Newlines) {.
  rtl, extern: "nsuRemovePrefixCharSet".} =
  ## Removes all characters from `chars` from the start of the string `s`
  ## (in-place).
  ##
  runnableExamples:
     var userInput = "\r\n*~Hello World!"

shows as:

/Users/timothee/.cache/nim/strutils_d/runnableExamples/strutils_examples13.nim

import
  "/Users/timothee/git_clone/nim/Nim/lib/pure/strutils.nim"

block:
  var userInput = "\c\n*~Hello World!"
  userInput.removePrefix

likewise in rendered html page, but that's a consequence of above: it renders as var userInput = "\c\n*~Hello World!"

@Araq
Copy link
Member

Araq commented Oct 13, 2018

That's ok.

@Araq Araq closed this as completed Oct 13, 2018
@timotheecour timotheecour changed the title runnableExamples: \r renders as \c [TODO] runnableExamples: \r renders as \c Oct 13, 2018
@timotheecour timotheecour changed the title [TODO] runnableExamples: \r renders as \c runnableExamples: \r renders as \c Oct 23, 2020
@timotheecour
Copy link
Member Author

fixed by #14439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants