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

sile-typesetter / sile / 14684598788

26 Apr 2025 07:55PM UTC coverage: 29.023% (-36.3%) from 65.328%
14684598788

push

github

alerque
test(fonts): Update test to work on new ICU instead of old

5840 of 20122 relevant lines covered (29.02%)

379.34 hits per line

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

0.0
/languages/ca/init.lua
1
SILE.nodeMakers.ca = pl.class({
×
2
   _base = SILE.nodeMakers.unicode,
3

4
   -- overridden properties from parent class
5
   quoteTypes = { qu = true }, -- split tokens at apostrophes &c.
6
})
7

8
local hyphens = require("languages.ca.hyphens-tex")
×
9
SILE.hyphenator.languages["ca"] = hyphens
×
10

11
SILE.hyphenator.languages["ca"].hyphenateSegments = function (node, segments, j)
×
12
   -- punt volat (middle dot) cancels when hyphenated
13
   -- Catalan typists may use a punt volat or precomposed characters.
14
   -- The shaper might behave differently depending on the font, so we need to
15
   -- be consistent here with the typist's choice.
16
   local hyphenChar = SILE.settings:get("font.hyphenchar")
×
17
   local replacement, hyphen
18
   if luautf8.find(segments[j], "ŀ$") then -- U+0140
×
19
      segments[j] = luautf8.sub(segments[j], 1, -2)
×
20
      replacement = SILE.shaper:createNnodes("ŀ", node.options)
×
21
      hyphen = SILE.shaper:createNnodes("l" .. hyphenChar, node.options)
×
22
   elseif luautf8.find(segments[j], "Ŀ$") then -- U+013F
×
23
      segments[j] = luautf8.sub(segments[j], 1, -2)
×
24
      replacement = SILE.shaper:createNnodes("Ŀ", node.options)
×
25
      hyphen = SILE.shaper:createNnodes("L" .. hyphenChar, node.options)
×
26
   elseif luautf8.find(segments[j], "l·$") then -- l + U+00B7
×
27
      segments[j] = luautf8.sub(segments[j], 1, -3)
×
28
      replacement = SILE.shaper:createNnodes("l·", node.options)
×
29
      hyphen = SILE.shaper:createNnodes("l" .. hyphenChar, node.options)
×
30
   elseif luautf8.find(segments[j], "L·$") then -- L + U+00B7
×
31
      segments[j] = luautf8.sub(segments[j], 1, -3)
×
32
      replacement = SILE.shaper:createNnodes("L·", node.options)
×
33
      hyphen = SILE.shaper:createNnodes("L" .. hyphenChar, node.options)
×
34
   else
35
      hyphen = SILE.shaper:createNnodes(hyphenChar, node.options)
×
36
   end
37
   local discretionary = SILE.types.node.discretionary({ replacement = replacement, prebreak = hyphen })
×
38
   return discretionary, segments
×
39
end
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