From patchwork Sun Sep 30 00:21:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 188141 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1385F2C00C7 for ; Sun, 30 Sep 2012 10:22:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEDF328094; Sun, 30 Sep 2012 02:22:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D+vo8C1hlUMY; Sun, 30 Sep 2012 02:22:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 782EE280D6; Sun, 30 Sep 2012 02:22:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6EF0028094 for ; Sun, 30 Sep 2012 02:21:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DCvm3Dvu8z2c for ; Sun, 30 Sep 2012 02:21:41 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTPS id AE2102807F for ; Sun, 30 Sep 2012 02:21:41 +0200 (CEST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3XTnNy6c9Tz4KK2l; Sun, 30 Sep 2012 02:21:38 +0200 (CEST) X-Auth-Info: DRW9hPtQh9YG36pQoNttaepmyphJX6gPr4nW0nU1Ew8= Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3XTnNy5gHlzbbjd; Sun, 30 Sep 2012 02:21:38 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Sun, 30 Sep 2012 02:21:34 +0200 Message-Id: <1348964495-12606-4-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348964495-12606-1-git-send-email-marex@denx.de> References: <1348882394-20629-1-git-send-email-marex@denx.de> <1348964495-12606-1-git-send-email-marex@denx.de> Cc: Marek Vasut Subject: [U-Boot] [PATCH 3/4] doc: kerneldoc: Implement "Example" section handling X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The default kernel-doc strips starting spaces from every single line in the Example section. This makes the code look bad. Thus, implement special handling for this section. Signed-off-by: Marek Vasut --- tools/kernel-doc/kernel-doc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/kernel-doc/kernel-doc b/tools/kernel-doc/kernel-doc index 8848efd..6347418 100755 --- a/tools/kernel-doc/kernel-doc +++ b/tools/kernel-doc/kernel-doc @@ -2424,6 +2424,9 @@ sub process_file($) { # Continued declaration purpose chomp($declaration_purpose); $declaration_purpose .= " " . xml_escape($1); + } elsif ($section =~ m/^Example/) { + $_ =~ s/^\s*\*//; + $contents .= $_; } else { $contents .= $1 . "\n"; }