From ecc36c3d1c3952541eb1ad667850573ecedd4d36 Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Sun, 13 Mar 2022 21:48:14 +0900 Subject: docs: remove extra whitespaces --- scripts/gen_vimdoc.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'scripts/gen_vimdoc.py') diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 1b7f88cb2a..7152f1005f 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -343,14 +343,6 @@ def self_or_child(n): return n.childNodes[0] -def clean_text(text): - """Cleans text. - - Only cleans superfluous whitespace at the moment. - """ - return ' '.join(text.split()).strip() - - def clean_lines(text): """Removes superfluous lines. @@ -371,12 +363,12 @@ def get_text(n, preformatted=False): if n.nodeName == 'computeroutput': for node in n.childNodes: text += get_text(node) - return '`{}` '.format(text) + return '`{}`'.format(text) for node in n.childNodes: if node.nodeType == node.TEXT_NODE: - text += node.data if preformatted else clean_text(node.data) + text += node.data elif node.nodeType == node.ELEMENT_NODE: - text += ' ' + get_text(node, preformatted) + text += get_text(node, preformatted) return text -- cgit