Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:devbook-guide commit in: appendices/contributing/devbook-guide/
Date: Sun, 23 Sep 2018 14:54:34
Message-Id: 1537712600.f568823a1bca21f40a402588871e6396df9322ad.ulm@gentoo
1 commit: f568823a1bca21f40a402588871e6396df9322ad
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 23 14:23:20 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 23 14:23:20 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=f568823a
7
8 appendices/contributing/devbook-guide: Change <pre> to <codesample>.
9
10 appendices/contributing/devbook-guide/text.xml | 32 +++++++++++++-------------
11 1 file changed, 16 insertions(+), 16 deletions(-)
12
13 diff --git a/appendices/contributing/devbook-guide/text.xml b/appendices/contributing/devbook-guide/text.xml
14 index 42865d5..564e29d 100644
15 --- a/appendices/contributing/devbook-guide/text.xml
16 +++ b/appendices/contributing/devbook-guide/text.xml
17 @@ -38,7 +38,7 @@ Let's start learning the GuideXML syntax. We'll start with the the initial
18 tags used in a GuideXML document:
19 </p>
20
21 -<pre caption="The initial part of a guide XML document">
22 +<codesample lang="sgml"><!-- The initial part of a guide XML document -->
23 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
24 &lt;!DOCTYPE guide SYSTEM "/dtd/guide.dtd"&gt;
25 &lt;!-- &#36;Header&#36; --&gt;
26 @@ -63,7 +63,7 @@ using GuideXML.</i>
27
28 &lt;version&gt;<i>1</i>&lt;/version&gt;
29 &lt;date&gt;<i>2011-11-29</i>&lt;/date&gt;
30 -</pre>
31 +</codesample>
32
33 <p>
34 On the first lines, we see the requisite tag that identifies this as an XML
35 @@ -135,7 +135,7 @@ link="#doc_chap2_pre1">previous excerpt</uri> and append a
36 guide document:
37 </p>
38
39 -<pre caption="Minimal guide example">
40 +<codesample lang="sgml"><!-- Minimal guide example -->
41 &lt;chapter&gt;
42 &lt;title&gt;<i>This is my chapter</i>&lt;/title&gt;
43 &lt;section&gt;
44 @@ -149,7 +149,7 @@ guide document:
45 &lt;/body&gt;
46 &lt;/section&gt;
47 &lt;/chapter&gt;
48 -</pre>
49 +</codesample>
50
51 <p>
52 Above, I set the chapter title by adding a child <c>&lt;title&gt;</c>
53 @@ -180,7 +180,7 @@ Now, it's time to learn how to mark up actual content. Here's the XML code for
54 an example <c>&lt;body&gt;</c> element:
55 </p>
56
57 -<pre caption="Example of a body element">
58 +<codesample lang="sgml"><!-- Example of a body element -->
59 &lt;p&gt;
60 This is a paragraph. &lt;path&gt;/etc/passwd&lt;/path&gt; is a file.
61 &lt;uri&gt;http://forums.gentoo.org&lt;/uri&gt; is my favorite website.
62 @@ -206,7 +206,7 @@ This is a warning.
63 &lt;impo&gt;
64 This is important.
65 &lt;/impo&gt;
66 -</pre>
67 +</codesample>
68
69 <p>
70 Now, here's how the <c>&lt;body&gt;</c> element above is rendered:
71 @@ -218,13 +218,13 @@ This is a paragraph. <path>/etc/passwd</path> is a file.
72 Type <c>ls</c> if you feel like it. I <e>really</e> want to go to sleep now.
73 </p>
74
75 -<pre caption="Code Sample">
76 +<codesample lang="sgml"><!-- Code Sample -->
77 This is text output or code.
78 # <i>this is user input</i>
79
80 Make HTML/XML easier to read by using selective emphasis:
81 &lt;foo&gt;<i>bar</i>&lt;/foo&gt;
82 -</pre>
83 +</codesample>
84
85 <note>
86 This is a note.
87 @@ -259,12 +259,12 @@ exactly, making it well-suited for code excerpts. You must name the
88 <c>&lt;pre&gt;</c> tag with a <c>caption</c> attribute:
89 </p>
90
91 -<pre caption="Named &lt;pre&gt;">
92 +<codesample lang="sgml"><!-- Named &lt;pre&gt; -->
93 &lt;pre caption="Output of uptime"&gt;
94 # &lt;i&gt;uptime&lt;/i&gt;
95 16:50:47 up 164 days, 2:06, 5 users, load average: 0.23, 0.20, 0.25
96 &lt;/pre&gt;
97 -</pre>
98 +</codesample>
99
100 </body>
101 </subsection>
102 @@ -522,7 +522,7 @@ the content.
103 An example for indentation is:
104 </p>
105
106 -<pre caption="Indentation Example">
107 +<codesample lang="sgml"><!-- Indentation Example -->
108 &lt;table&gt;
109 &lt;tr&gt;
110 &lt;th&gt;Foo&lt;/th&gt;
111 @@ -541,17 +541,17 @@ An example for indentation is:
112 &lt;li&gt;First option&lt;/li&gt;
113 &lt;li&gt;Second option&lt;/li&gt;
114 &lt;/ul&gt;
115 -</pre>
116 +</codesample>
117
118 <p>
119 <b>Attributes</b> may not have spaces in between the attribute, the "=" mark,
120 and the attribute value. As an example:
121 </p>
122
123 -<pre caption="Attributes">
124 +<codesample lang="sgml"><!-- Attributes -->
125 Wrong : &lt;pre caption = "Attributes"&gt;
126 Correct: &lt;pre caption="Attributes"&gt;
127 -</pre>
128 +</codesample>
129
130 </body>
131 </subsection>
132 @@ -571,12 +571,12 @@ Every sentence, including those inside tables and listings, should start
133 with a capital letter.
134 </p>
135
136 -<pre caption="Periods and capital letters">
137 +<codesample lang="sgml"><!-- Periods and capital letters -->
138 &lt;ul&gt;
139 &lt;li&gt;No period&lt;/li&gt;
140 &lt;li&gt;With period. Multiple sentences, remember?&lt;/li&gt;
141 &lt;/ul&gt;
142 -</pre>
143 +</codesample>
144
145 <p>
146 Code Listings should <e>always</e> have a <c>caption</c>.