• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37527

pending completion
#37527

push

local

web-flow
make `IRShow.method_name` inferrable (#49607)

18 of 18 new or added lines in 3 files covered. (100.0%)

68710 of 81829 relevant lines covered (83.97%)

33068903.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.63
/stdlib/Markdown/src/GitHub/GitHub.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3
include("table.jl")
4

5
@breaking true ->
×
6
function fencedcode(stream::IO, block::MD)
219✔
7
    withstream(stream) do
219✔
8
        startswith(stream, "~~~", padding = true) || startswith(stream, "```", padding = true) || return false
438✔
9
        skip(stream, -1)
13✔
10
        ch = read(stream, Char)
13✔
11
        trailing = strip(readline(stream))
13✔
12
        flavor = lstrip(trailing, ch)
13✔
13
        n = 3 + length(trailing) - length(flavor)
13✔
14

15
        # inline code block
16
        ch in flavor && return false
13✔
17

18
        buffer = IOBuffer()
12✔
19
        while !eof(stream)
26✔
20
            line_start = position(stream)
26✔
21
            if startswith(stream, string(ch) ^ n)
26✔
22
                if !startswith(stream, string(ch))
12✔
23
                    if flavor == "math"
21✔
24
                        push!(block, LaTeX(String(take!(buffer)) |> chomp))
3✔
25
                    else
26
                        push!(block, Code(flavor, String(take!(buffer)) |> chomp))
9✔
27
                    end
28
                    return true
12✔
29
                else
30
                    seek(stream, line_start)
×
31
                end
32
            end
33
            write(buffer, readline(stream, keep=true))
14✔
34
        end
14✔
35
        return false
×
36
    end
37
end
38

39
function github_paragraph(stream::IO, md::MD)
×
40
    skipwhitespace(stream)
×
41
    buffer = IOBuffer()
×
42
    p = Paragraph()
×
43
    push!(md, p)
×
44
    for char in readeach(stream, Char)
×
45
        if char == '\n'
×
46
            eof(stream) && break
×
47
            if blankline(stream) || parse(stream, md, breaking = true)
×
48
                break
×
49
            else
50
                write(buffer, '\n')
×
51
            end
52
        else
53
            write(buffer, char)
×
54
        end
55
    end
×
56
    p.content = parseinline(seek(buffer, 0), md)
×
57
    return true
×
58
end
59

60
@flavor github [list, indentcode, blockquote, admonition, footnote, fencedcode, hashheader,
61
                github_table, github_paragraph,
62

63
                linebreak, escapes, en_dash, inline_code, asterisk_bold,
64
                underscore_bold, asterisk_italic, underscore_italic, image, footnote_link, link, autolink]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc