@@ -432,11 +432,9 @@ function htmlstyle(io::IO, face::Face, lastface::Face=getface())
432
432
print (io, " \" >" )
433
433
end
434
434
435
- function Base. show (io:: IO , :: MIME"text/html" , s:: Union{<:AnnotatedString, SubString{<:AnnotatedString}} ; wrap :: Symbol = :pre )
435
+ function Base. show (io:: IO , :: MIME"text/html" , s:: Union{<:AnnotatedString, SubString{<:AnnotatedString}} )
436
436
htmlescape (str) = replace (str, ' &' => " &" , ' <' => " <" , ' >' => " >" )
437
437
buf = IOBuffer () # Avoid potential overhead in repeatadly printing a more complex IO
438
- wrap == :none ||
439
- print (buf, ' <' , String (wrap), ' >' )
440
438
lastface:: Face = getface ()
441
439
stylestackdepth = 0
442
440
for (str, styles) in eachregion (s)
@@ -459,22 +457,11 @@ function Base.show(io::IO, ::MIME"text/html", s::Union{<:AnnotatedString, SubStr
459
457
htmlstyle (buf, face, lastface)
460
458
stylestackdepth += 1
461
459
end
462
- if wrap == :p
463
- newpara = false
464
- for para in eachsplit (str, " \n\n " )
465
- newpara && print (buf, " </p>\n <p>" )
466
- print (buf, htmlescape (para))
467
- newpara = true
468
- end
469
- else
470
- print (buf, htmlescape (str))
471
- end
460
+ print (buf, htmlescape (str))
472
461
! isnothing (link) && print (buf, " </a>" )
473
462
lastface = face
474
463
end
475
464
print (buf, " </span>" ^ stylestackdepth)
476
- wrap == :none ||
477
- print (buf, " </" , String (wrap), ' >' )
478
465
write (io, take! (buf))
479
466
nothing
480
467
end
0 commit comments