From af4b6cb9a29d6cc98dada0e23b9c6321585e3bef Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 27 Jun 2018 17:07:28 +0000 Subject: [PATCH] Revert "docbook: remove equivalent case." We still need the "length == 2" behavior. This reverts commit 622b17a475a81aa3af5cc743b831d01233b99c31. Change-Id: Id3b7ed9231f3fefeeac5fb910b792139c4844ec8 Reviewed-on: https://code.wireshark.org/review/28484 Reviewed-by: Gerald Combs --- docbook/asciidoctor-macros/commaize-block/extension.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docbook/asciidoctor-macros/commaize-block/extension.rb b/docbook/asciidoctor-macros/commaize-block/extension.rb index 4b2b776b97..710f1a7e63 100644 --- a/docbook/asciidoctor-macros/commaize-block/extension.rb +++ b/docbook/asciidoctor-macros/commaize-block/extension.rb @@ -33,6 +33,8 @@ class CommaizeBlock < Extensions::BlockProcessor if lines.length < 2 create_paragraph parent, lines, attrs + elsif lines.length == 2 + create_paragraph parent, lines.join(" and "), attrs else commaized = lines[0..-2].join(", ") commaized << ", and " + lines[-1]