From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 56634138351 for ; Wed, 15 Jan 2020 21:30:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CBEFE085D; Wed, 15 Jan 2020 21:30:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E46DCE085D for ; Wed, 15 Jan 2020 21:30:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0616F34E0C6 for ; Wed, 15 Jan 2020 21:30:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8D25AF for ; Wed, 15 Jan 2020 21:29:59 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1579123725.d10a853abe03569b235f960693f47960c494fd9b.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: appendices/devbook-guide/ X-VCS-Repository: proj/devmanual X-VCS-Files: appendices/devbook-guide/text.xml X-VCS-Directories: appendices/devbook-guide/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: d10a853abe03569b235f960693f47960c494fd9b X-VCS-Branch: master Date: Wed, 15 Jan 2020 21:29:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cd5b102c-5265-4a4e-b10c-022f366fcda7 X-Archives-Hash: b8617c8b45e1b0f940ca3cbf62f6dac3 commit: d10a853abe03569b235f960693f47960c494fd9b Author: Ulrich Müller gentoo org> AuthorDate: Sat Jan 11 10:10:07 2020 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Jan 15 21:28:45 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d10a853a devbook-guide: Explain . Signed-off-by: Ulrich Müller gentoo.org> appendices/devbook-guide/text.xml | 69 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/appendices/devbook-guide/text.xml b/appendices/devbook-guide/text.xml index 5ae077b..0f0a3ad 100644 --- a/appendices/devbook-guide/text.xml +++ b/appendices/devbook-guide/text.xml @@ -262,10 +262,71 @@ prose more punch! Code samples and colour-coding - -Fill this section with the information about the use of -<codesample/>. - +

+The <pre> tag does not support any syntax highlighting. When you +need syntax highlighting, use the <codesample> tag along with a +lang attribute usually you want this to be set to "ebuild" +to syntax highlight ebuild code snippets. Currently, the following languages +are supported: +

+ +
    +
  • c
  • +
  • ebuild
  • +
  • make
  • +
  • m4
  • +
  • sgml
  • +
+ + +Remember that all leading and trailing spaces, and line breaks in +<codesample> blocks will appear in the displayed html page. + + +

+Sample <codesample lang="c"> block: +

+ + +#include <stdio.h> + +main() +{ + /* This is a comment */ + printf("Hello, world!\n"); +} + + +

+You can also specify numbering="lines" to enable line numbering, as in +the following example: +

+ + +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="MicroGnuEmacs, a port from the BSDs" +HOMEPAGE="https://homepage.boetes.org/software/mg/" +SRC_URI="https://github.com/hboetes/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ppc ~ppc64 sparc x86" + +RDEPEND="sys-libs/ncurses:0= + >=dev-libs/libbsd-0.7.0" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_install() { + dobin mg + doman mg.1 + dodoc README tutorial +} +