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

sile-typesetter / sile / 14390735465

10 Apr 2025 09:30PM UTC coverage: 34.559% (-31.7%) from 66.23%
14390735465

push

github

alerque
Merge tag 'v0.15.12' into develop

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

4064 existing lines in 73 files now uncovered.

6918 of 20018 relevant lines covered (34.56%)

2597.26 hits per line

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

86.27
/outputters/base.lua
1
--- SILE outputter class.
2
-- @interfaces outputters
3

4
local outputter = pl.class()
62✔
5
outputter.type = "outputter"
62✔
6
outputter._name = "base"
62✔
7

8
function outputter:_init ()
62✔
9
   SU._avoid_base_class_use(self)
62✔
10
   self.hooks = {}
62✔
11
end
12

13
function outputter:registerHook (category, func)
62✔
14
   if not self.hooks[category] then
1✔
15
      self.hooks[category] = {}
1✔
16
   end
17
   table.insert(self.hooks[category], func)
1✔
18
end
19

20
function outputter:runHooks (category, data)
62✔
21
   if not self.hooks[category] then
62✔
22
      return nil
61✔
23
   end
24
   for _, func in ipairs(self.hooks[category]) do
2✔
25
      data = func(self, data)
2✔
26
   end
27
   return data
1✔
28
end
29

30
function outputter:newPage () end
62✔
31

32
function outputter:abort ()
62✔
33
   return self:finish() -- unless otherwise defined
×
34
end
35

36
function outputter:finish ()
62✔
UNCOV
37
   self:runHooks("prefinish")
×
38
end
39

40
function outputter:getCursor () end
62✔
41

42
function outputter:setCursor (_, _, _) end
62✔
43

44
function outputter:setColor () end
62✔
45

46
function outputter:pushColor () end
62✔
47

48
function outputter:popColor () end
62✔
49

50
function outputter:drawHbox (_, _) end
62✔
51

52
function outputter:setFont (_) end
62✔
53

54
function outputter:drawImage (_, _, _, _, _) end
62✔
55

56
function outputter:getImageSize (_) end
62✔
57

58
function outputter:drawSVG () end
62✔
59

60
function outputter:drawRule (_, _, _, _) end
62✔
61

62
function outputter:debugFrame (_, _) end
62✔
63

64
function outputter:debugHbox (_, _) end
62✔
65

66
function outputter:setLinkAnchor (_, _) end -- Unstable API
62✔
67

68
function outputter:beginLink (_, _) end -- Unstable API
63✔
69

70
function outputter:endLink (_, _, _, _, _, _) end -- Unstable API
62✔
71

72
function outputter:setMetadata (_, _) end
62✔
73

74
function outputter:setBookmark (_, _) end
62✔
75

76
function outputter:drawRaw () end
62✔
77

78
function outputter:getOutputFilename ()
62✔
79
   local fname
80
   if SILE.outputFilename then
124✔
81
      fname = SILE.outputFilename
124✔
UNCOV
82
   elseif SILE.input.filenames[1] then
×
UNCOV
83
      fname = pl.path.splitext(SILE.input.filenames[1])
×
UNCOV
84
      if self.extension then
×
85
         fname = fname .. "." .. self.extension
×
86
      end
87
   end
88
   if not fname then
124✔
UNCOV
89
      SU.error("Cannot guess output filename without an input name")
×
90
   end
91
   return fname
124✔
92
end
93

94
return outputter
62✔
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

© 2026 Coveralls, Inc