~technomancy/fennel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Don't emit headers twice

Details
Message ID
<20200501202632.1968676-1-benaiah@mischenko.com>
DKIM signature
pass
Download raw message
Patch: +2 -4
---
Fixes a small issue with the last patch I sent in. Also corrects the comment.

 promote-h1-to-title.lua | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/promote-h1-to-title.lua b/promote-h1-to-title.lua
index 1647c76..d5eef63 100644
--- a/promote-h1-to-title.lua
+++ b/promote-h1-to-title.lua
@@ -1,16 +1,14 @@
local title

--- Promote all headers by one level. Set title from level 1 headers,
--- unless it has been set before.
-- Set title from level 1 headers, unless it has been set before.
function promote_header (header)

  if header.level >= 2 then
    return header
  end

  if not title then
    title = header.content
    return nil
    return {}
  end

  local msg = '[WARNING] title already set; demoting header "%s"\n'
-- 
2.26.2
Details
Message ID
<871ro3qk23.fsf@hagelb.org>
In-Reply-To
<20200501202632.1968676-1-benaiah@mischenko.com> (view parent)
DKIM signature
missing
Download raw message
Benaiah Mischenko <benaiah@mischenko.com> writes:

> ---
> Fixes a small issue with the last patch I sent in. Also corrects the comment.

Nice catch; thanks. Applied and deployed.

-Phil
Review patch Export thread (mbox)