<NME> working.md
<BEF> This source file contains a working doctest:

```jldoctest
julia> 2 + 2
4
```
DocTestSetup = nothing
```

Comments at the start:

```jldoctest
# Initial comments before the first julia> prompt..
# .. should be ignored.
julia> 2 + 2
4
```

Empty output:

```jldoctest
nothing
# output
```

<MSG> Doctest output starting with # (#1369)

Also, we don't actually have to remove the comments from the input buffer, because the parser should just handle them.
<DFF> @@ -4,3 +4,52 @@ This source file contains a working doctest:
 julia> 2 + 2
 4
 ```
+
+Test comments or comment-like lines:
+
+```jldoctest
+julia> f(x) = println("# output from f\n$x");
+
+julia> f(42)
+# output from f
+42
+
+julia> f(42)
+       # comment line
+# output from f
+42
+```
+
+```jldoctest
+julia> let x = 1
+           println("$x")
+           # comment
+           println("$x")
+       end
+1
+1
+
+julia> println("xyz")
+       # comment
+xyz
+```
+
+Original issue:
+
+```jldoctest
+julia> f()=0
+f (generic function with 1 method)
+
+julia> methods(f)
+# 1 method for generic function "f":
+[1] f() in Main at none:1
+```
+
+Comments at the start:
+
+```jldoctest
+# Initial comments before the first julia> prompt..
+# .. should be ignored.
+julia> 2 + 2
+4
+```
\ No newline at end of file

Doctest output starting with # (#1369)