Skip to content

Commit ae64f51

Browse files
authored
Merge pull request #9 from malmaud/writemime_fix
Fix writemime deprecation
2 parents 34f5b7d + b168c2d commit ae64f51

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ os:
33
- linux
44
- osx
55
julia:
6-
- 0.3
76
- 0.4
87
- nightly
98
notifications:

REQUIRE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
julia 0.3
2-
Compat 0.7.15
1+
julia 0.4
2+
Compat 0.8.0

src/LaTeXStrings.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ latexstring(args...) = latexstring(string(args...))
3030
macro L_str(s, flags...) latexstring(s) end
3131
macro L_mstr(s, flags...) latexstring(s) end
3232

33-
import Base: writemime, show, write, endof, getindex, sizeof, search, rsearch, isvalid, next, length, bytestring, IOBuffer, pointer
33+
import Base: write, endof, getindex, sizeof, search, rsearch, isvalid, next, length, bytestring, IOBuffer, pointer
34+
@compat import Base.show
3435

3536
write(io::IO, s::LaTeXString) = write(io, s.s)
36-
writemime(io::IO, ::MIME"application/x-latex", s::LaTeXString) = write(io, s)
37-
writemime(io::IO, ::MIME"text/latex", s::LaTeXString) = write(io, s)
37+
@compat show(io::IO, ::MIME"application/x-latex", s::LaTeXString) = write(io, s)
38+
@compat show(io::IO, ::MIME"text/latex", s::LaTeXString) = write(io, s)
3839

3940
function show(io::IO, s::LaTeXString)
4041
print(io, "L")

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using Base.Test
33

44
# write your own tests here
55
tst1 = L"an equation: $\alpha^2$"
6-
tst1u = utf8(tst1)
6+
tst1u = Compat.UTF8String(tst1)
77
@test tst1 == "an equation: \$\\alpha^2\$" == tst1u
88
@test L"\alpha^2" == "\$\\alpha^2\$"
99
@test stringmime("text/latex", tst1) == tst1u

0 commit comments

Comments
 (0)