File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ function firstsentence(str::AbstractString)
5252 for line in split (str, ' \n ' )
5353 startswith (line, " " ) && continue # code line
5454 all (isspace, line) && continue
55- idx = findfirst (' . ' , line)
55+ idx = findfirst (r" \. ( \s |$) " , line)
5656 if idx === nothing
5757 print (io, line, ' ' )
5858 continue
5959 end
60- print (io, line[1 : idx])
60+ print (io, line[1 : first ( idx) ])
6161 return String (take! (io))
6262 end
6363 return String (take! (io))
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ using Test
3030 end )
3131 @test occursin (" - `Main.anonymous.foo1`: `foo1` is pretty useful." , str)
3232 @test occursin (" - `Main.anonymous.foo2`: `foo2` doesn't show the signature." , str)
33- @test_broken occursin (" - `Main.anonymous.foo3`: `foo3` contains a [`Main.anonymous.foo1`](@ref) that contains a period." , str)
33+ @test occursin (" - `Main.anonymous.foo3`: `foo3` contains a [`Main.anonymous.foo1`](@ref) that contains a period." , str)
3434end
You can’t perform that action at this time.
0 commit comments