nim doc generates code with invalid indentation

2021-03-24 Thread shirleyquirk
yep, bug. you should report it.

nim doc generates code with invalid indentation

2021-03-24 Thread HJarausch
I am sure it is a bug (or an undocumented feature) This works fine (as in your code) func FCmp(x,y:float):int = if x==y: 0 elif x

nim doc generates code with invalid indentation

2021-03-24 Thread miran
> I have fixed a type error myself I guess you'll have to fix your indentations and unequal whitespaces too. I already posted the version that works. No idea why you didn't take it already and you continue to insist on your style inconsistencies which, as we can see, cause problems for the comp

nim doc generates code with invalid indentation

2021-03-23 Thread HJarausch
I have fixed a type error myself, please see and `nim doc` still get this "invalid indentation" error. nim -v Nim Compiler Version 1.4.4 [Linux: amd64] Compiled at 2021-03-20 Copyright (c) 2006-2020 by Andreas Rumpf active boot switches: -d:release

nim doc generates code with invalid indentation

2021-03-23 Thread miran
I copy-pasted the stuff you posted, fixed wrong types in several places, and the documentation seems ok: proc median*(A: var openArray[int], left, right: Natural, myCmp: proc(x, y: int): int {.nimcall} = cmp[int]): float = result = 1.0 runnableExamples

nim doc generates code with invalid indentation

2021-03-23 Thread HJarausch
If one copies the code after the `block:` statement below into a separate file and moves it to the left, it compiles just fine, but with `runnableExamples` it fails proc median*(A: var openArray[int], left, right : Natural, myCmp : proc(x,y:int):int {.nimcall