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 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
<!-- $Header$ --> |
26 |
@@ -63,7 +63,7 @@ using GuideXML.</i> |
27 |
|
28 |
<version><i>1</i></version> |
29 |
<date><i>2011-11-29</i></date> |
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 |
<chapter> |
42 |
<title><i>This is my chapter</i></title> |
43 |
<section> |
44 |
@@ -149,7 +149,7 @@ guide document: |
45 |
</body> |
46 |
</section> |
47 |
</chapter> |
48 |
-</pre> |
49 |
+</codesample> |
50 |
|
51 |
<p> |
52 |
Above, I set the chapter title by adding a child <c><title></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><body></c> element: |
55 |
</p> |
56 |
|
57 |
-<pre caption="Example of a body element"> |
58 |
+<codesample lang="sgml"><!-- Example of a body element --> |
59 |
<p> |
60 |
This is a paragraph. <path>/etc/passwd</path> is a file. |
61 |
<uri>http://forums.gentoo.org</uri> is my favorite website. |
62 |
@@ -206,7 +206,7 @@ This is a warning. |
63 |
<impo> |
64 |
This is important. |
65 |
</impo> |
66 |
-</pre> |
67 |
+</codesample> |
68 |
|
69 |
<p> |
70 |
Now, here's how the <c><body></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 |
<foo><i>bar</i></foo> |
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><pre></c> tag with a <c>caption</c> attribute: |
89 |
</p> |
90 |
|
91 |
-<pre caption="Named <pre>"> |
92 |
+<codesample lang="sgml"><!-- Named <pre> --> |
93 |
<pre caption="Output of uptime"> |
94 |
# <i>uptime</i> |
95 |
16:50:47 up 164 days, 2:06, 5 users, load average: 0.23, 0.20, 0.25 |
96 |
</pre> |
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 |
<table> |
109 |
<tr> |
110 |
<th>Foo</th> |
111 |
@@ -541,17 +541,17 @@ An example for indentation is: |
112 |
<li>First option</li> |
113 |
<li>Second option</li> |
114 |
</ul> |
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 : <pre caption = "Attributes"> |
126 |
Correct: <pre caption="Attributes"> |
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 |
<ul> |
139 |
<li>No period</li> |
140 |
<li>With period. Multiple sentences, remember?</li> |
141 |
</ul> |
142 |
-</pre> |
143 |
+</codesample> |
144 |
|
145 |
<p> |
146 |
Code Listings should <e>always</e> have a <c>caption</c>. |