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

sile-typesetter / sile / 9304049654

30 May 2024 02:12PM UTC coverage: 60.021% (-14.7%) from 74.707%
9304049654

push

github

web-flow
Merge 1a26b4f22 into a1fd105f8

6743 of 12900 new or added lines in 186 files covered. (52.27%)

347 existing lines in 49 files now uncovered.

10311 of 17179 relevant lines covered (60.02%)

3307.34 hits per line

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

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

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

8
function outputter:_init ()
19✔
9
   self.hooks = {}
19✔
10
   return self
19✔
11
end
12

13
function outputter:registerHook (category, func)
19✔
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)
19✔
21
   if not self.hooks[category] then
19✔
22
      return nil
18✔
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
19✔
31

32
function outputter:finish ()
19✔
NEW
33
   self:runHooks("prefinish")
×
34
end
35

36
function outputter.getCursor () end
19✔
37

38
function outputter.setCursor (_, _, _, _) end
19✔
39

40
function outputter.setColor () end
19✔
41

42
function outputter.pushColor () end
19✔
43

44
function outputter.popColor () end
19✔
45

46
function outputter.drawHbox (_, _, _) end
19✔
47

48
function outputter.setFont (_, _) end
19✔
49

50
function outputter.drawImage (_, _, _, _, _, _) end
19✔
51

52
function outputter.getImageSize (_, _) end
19✔
53

54
function outputter.drawSVG () end
19✔
55

56
function outputter.drawRule (_, _, _, _, _) end
19✔
57

58
function outputter.debugFrame (_, _, _) end
19✔
59

60
function outputter.debugHbox (_, _, _) end
19✔
61

62
function outputter.setLinkAnchor (_, _, _) end -- Unstable API
19✔
63

64
function outputter.beginLink (_, _, _) end -- Unstable API
20✔
65

66
function outputter.endLink (_, _, _, _, _, _, _) end -- Unstable API
19✔
67

68
function outputter.setMetadata (_, _, _) end
19✔
69

70
function outputter.setBookmark (_, _, _) end
19✔
71

72
function outputter.drawRaw (_) end
19✔
73

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

90
return outputter
19✔
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