Re: [xml2rfc] Outdenting sourcecode

Kesara Rathnayake <krathnayake@ietf.org> Fri, 23 July 2021 03:33 UTC

Return-Path: <krathnayake@ietf.org>
X-Original-To: xml2rfc@ietfa.amsl.com
Delivered-To: xml2rfc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 207333A1A02 for <xml2rfc@ietfa.amsl.com>; Thu, 22 Jul 2021 20:33:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eTmth1wFfa9N for <xml2rfc@ietfa.amsl.com>; Thu, 22 Jul 2021 20:33:10 -0700 (PDT)
Received: from [192.168.1.198] (unknown [124.197.12.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPSA id 4E6A73A1A03 for <xml2rfc@ietf.org>; Thu, 22 Jul 2021 20:33:10 -0700 (PDT)
Message-ID: <b257bfa2-4684-9572-21e6-4e0a8b7f676f@ietf.org>
Date: Fri, 23 Jul 2021 15:33:02 +1200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.0
Content-Language: en-US
To: xml2rfc@ietf.org
References: <8424B564-47E1-4655-98D3-D9D29D144ECB@tzi.org>
From: Kesara Rathnayake <krathnayake@ietf.org>
In-Reply-To: <8424B564-47E1-4655-98D3-D9D29D144ECB@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/mTI-ERc5_KbVDOmC3XzoNS3oQjA>
Subject: Re: [xml2rfc] Outdenting sourcecode
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XML2RFC discussion list <xml2rfc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc/>
List-Post: <mailto:xml2rfc@ietf.org>
List-Help: <mailto:xml2rfc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jul 2021 03:33:15 -0000


On 22/07/21 7:38 pm, Carsten Bormann wrote:
> When I was younger, xml2rfc outdented artwork that was too wide, giving us a whopping three characters more horizontal space.
> 
> I still get messages that it does, and it sometimes actually does, but then there are cases where it doesn’t.
> 

Do you have an example where xml2rfc outdented artwork CDATA?

> Before I go on a goose chase: What’s going on here?
> 
> (I use xml generated with kramdown-rfc 1.5.2 from https://github.com/ietf-rats-wg/basic-yang-module/blob/master/draft-ietf-rats-yang-tpm-charra.md
> Yes, one can argue how wise it is to have artwork sources indented by four spaces and relying on xml2rfc to reduce its own indent by three so everything just fits, but that’s the way it used to work, and I don’t see how that broke.)

This could be down to how pretty_print in lxml prints CDATA because 
pretty_print_prep function in xml2rfc doesn't seem to be doing anything 
on CDATA.

   --Kesara
> 
> Grüße, Carsten
> 
> _______________________________________________
> xml2rfc mailing list
> xml2rfc@ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc
> 

-- 
Kesara Rathnayake
Senior Software Development Engineer - IETF LLC
krathnayake@ietf.org