@@ -432,11 +432,9 @@ function htmlstyle(io::IO, face::Face, lastface::Face=getface())
432432 print (io, " \" >" )
433433end
434434
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}} )
436436 htmlescape (str) = replace (str, ' &' => " &" , ' <' => " <" , ' >' => " >" )
437437 buf = IOBuffer () # Avoid potential overhead in repeatadly printing a more complex IO
438- wrap == :none ||
439- print (buf, ' <' , String (wrap), ' >' )
440438 lastface:: Face = getface ()
441439 stylestackdepth = 0
442440 for (str, styles) in eachregion (s)
@@ -459,22 +457,11 @@ function Base.show(io::IO, ::MIME"text/html", s::Union{<:AnnotatedString, SubStr
459457 htmlstyle (buf, face, lastface)
460458 stylestackdepth += 1
461459 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))
472461 ! isnothing (link) && print (buf, " </a>" )
473462 lastface = face
474463 end
475464 print (buf, " </span>" ^ stylestackdepth)
476- wrap == :none ||
477- print (buf, " </" , String (wrap), ' >' )
478465 write (io, take! (buf))
479466 nothing
480467end
0 commit comments