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

sile-typesetter / sile / 14958605596

11 May 2025 06:34PM UTC coverage: 31.311% (-25.4%) from 56.689%
14958605596

push

github

web-flow
Merge 3e53926d5 into 443551a3e

6301 of 20124 relevant lines covered (31.31%)

4203.99 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