<commit_before>if (not SILE.outputters) then SILE.outputters = {} end
local f
local cx
local cy
SILE.outputters.debug = {
  init = function()
    print("Open file", SILE.outputFilename)
    print("Set paper size ", SILE.documentState.paperSize[1],SILE.documentState.paperSize[2])
    print("Begin page")
  end,
  newPage = function()
    print("New page")
  end,
  finish = function()
    print("End page")
    print("Finish")
  end,
  setColor = function(self, color)
    print("Set color", color.r, color.g, color.b)
  end,
  pushColor = function (self, color)
    print("Push color", color.r, color.g, color.b)
  end,
  popColor = function (self)
    print("Pop color")
  end,
  outputHbox = function (value,w)
    buf = {}
    for i=1,#(value.glyphString) do
      buf[#buf+1] = value.glyphString[i]
    end
    buf = table.concat(buf, " ")
    print("T", buf, "("..value.text..")")
  end,
  setFont = function (options)
    if f ~= SILE.font._key(options) then
      print("Set font ", SILE.font._key(options))
      f = SILE.font._key(options)
    end
  end,
  drawImage = function (src, x,y,w,h)
    print("Draw image", src, x, y, w, h)
  end,
  imageSize = function (src)
    local pdf = require("justenoughlibtexpdf");
    local llx, lly, urx, ury = pdf.imagebbox(src)
    return (urx-llx), (ury-lly)
  end,
  moveTo = function (x,y)
    if x ~= cx then print("Mx ",x); cx = x end
    if y ~= cy then print("My ",y); cy = y end
  end,
  rule = function (x,y,w,d)
    print("Draw line", x, y, w, d)
  end,
  debugFrame = function (self,f)
  end,
  debugHbox = function(typesetter, hbox, scaledWidth)<commit_msg>Since we’re breaking regression tests anyway, let’s round the values to avoid FP false positives.<commit_after>if (not SILE.outputters) then SILE.outputters = {} end
local f
local cx
local cy
SILE.outputters.debug = {
  init = function()
    print("Open file", SILE.outputFilename)
    print("Set paper size ", SILE.documentState.paperSize[1],SILE.documentState.paperSize[2])
    print("Begin page")
  end,
  newPage = function()
    print("New page")
  end,
  finish = function()
    print("End page")
    print("Finish")
  end,
  setColor = function(self, color)
    print("Set color", color.r, color.g, color.b)
  end,
  pushColor = function (self, color)
    print("Push color", color.r, color.g, color.b)
  end,
  popColor = function (self)
    print("Pop color")
  end,
  outputHbox = function (value,w)
    buf = {}
    for i=1,#(value.glyphString) do
      buf[#buf+1] = value.glyphString[i]
    end
    buf = table.concat(buf, " ")
    print("T", buf, "("..value.text..")")
  end,
  setFont = function (options)
    if f ~= SILE.font._key(options) then
      print("Set font ", SILE.font._key(options))
      f = SILE.font._key(options)
    end
  end,
  drawImage = function (src, x,y,w,h)
    print("Draw image", src, x, y, w, h)
  end,
  imageSize = function (src)
    local pdf = require("justenoughlibtexpdf");
    local llx, lly, urx, ury = pdf.imagebbox(src)
    return (urx-llx), (ury-lly)
  end,
  moveTo = function (x,y)
    if x ~= cx then print("Mx ",string.format("%.5f",x)); cx = x end
    if y ~= cy then print("My ",string.format("%.5f",y)); cy = y end
  end,
  rule = function (x,y,w,d)
    print("Draw line", x, y, w, d)
  end,
  debugFrame = function (self,f)
  end,
  debugHbox = function(typesetter, hbox, scaledWidth)
{'fraction_non_alphanumeric': 0.1598336304218657, 'fraction_numerical': 0.0029708853238265003, 'mean_word_length': 3.229899497487437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4853413', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1232, 'n_words': 331}