# HG changeset patch # User Kim Alvefur # Date 1402511887 -7200 # Node ID ee2302b78c745b5572e73daaaa74fd76b1969d56 # Parent 33a796b2cb91c217863769411113063e581a854b mod_latex: get_child_text! diff -r 33a796b2cb91 -r ee2302b78c74 mod_latex/mod_latex.lua --- a/mod_latex/mod_latex.lua Wed Jun 11 12:50:57 2014 +0200 +++ b/mod_latex/mod_latex.lua Wed Jun 11 20:38:07 2014 +0200 @@ -7,11 +7,8 @@ local function replace_latex(data) module:log("debug", "Replacing latex..."); local origin, stanza = data.origin, data.stanza; - local body = stanza:child_with_name("body"); - if not body then return; end - - body = body:get_text(); - if not body:match("%$%$") then + local body = stanza:get_child_text("body"); + if not body or not body:match("%$%$") then return; end