Skip to content

Commit 1855f58

Browse files
author
Chris Cho
committed
Fix code block indentation (#457)
(cherry picked from commit ce0fa18)
1 parent 8d52b07 commit 1855f58

File tree

4 files changed

+60
-61
lines changed

4 files changed

+60
-61
lines changed

source/fundamentals/collations.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ following documents:
193193

194194
.. code-block:: none
195195

196-
{ "_id" : 1, "first_name" : "Hans" }
197-
{ "_id" : 2, "first_name" : "Gunter" }
198-
{ "_id" : 3, "first_name" : "Günter" }
199-
{ "_id" : 4, "first_name" : "Jürgen" }
196+
{ "_id" : 1, "first_name" : "Hans" }
197+
{ "_id" : 2, "first_name" : "Gunter" }
198+
{ "_id" : 3, "first_name" : "Günter" }
199+
{ "_id" : 4, "first_name" : "Jürgen" }
200200

201201
Consider the following ``findOneAndUpdate()`` operation on this collection
202202
which **does not** specify a collation:
@@ -229,9 +229,9 @@ the operation returns the following updated document:
229229

230230
.. code-block:: none
231231

232-
{ lastErrorObject: { updatedExisting: true, n: 1 },
233-
value: { _id: 3, first_name: 'Günter' },
234-
ok: 1 }
232+
{ lastErrorObject: { updatedExisting: true, n: 1 },
233+
value: { _id: 3, first_name: 'Günter' },
234+
ok: 1 }
235235

236236
findOneAndDelete() Example
237237
``````````````````````````
@@ -242,9 +242,9 @@ documents:
242242

243243
.. code-block:: none
244244

245-
{ "_id" : 1, "a" : "16" }
246-
{ "_id" : 2, "a" : "84" }
247-
{ "_id" : 3, "a" : "179" }
245+
{ "_id" : 1, "a" : "16" }
246+
{ "_id" : 2, "a" : "84" }
247+
{ "_id" : 3, "a" : "179" }
248248

249249
In this example, we set the ``numericOrdering`` collation parameter to ``true``
250250
to sort numeric strings based on their numerical order instead of their
@@ -260,8 +260,8 @@ documents:
260260

261261
.. code-block:: none
262262

263-
{ "_id" : 1, "a" : "16" }
264-
{ "_id" : 2, "a" : "84" }
263+
{ "_id" : 1, "a" : "16" }
264+
{ "_id" : 2, "a" : "84" }
265265

266266
If you perform the same operation without collation on the original
267267
collection of three documents, it matches documents based on the lexical value
@@ -280,8 +280,8 @@ contains the following documents:
280280

281281
.. code-block:: none
282282

283-
{ "_id" : 2, "a" : "84" }
284-
{ "_id" : 3, "a" : "179" }
283+
{ "_id" : 2, "a" : "84" }
284+
{ "_id" : 3, "a" : "179" }
285285

286286
Aggregation Example
287287
```````````````````

source/fundamentals/crud/query-document.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@ This code snippet returns the following results:
148148

149149
.. code-block:: javascript
150150

151-
collection.find({
152-
rating: { $eq: 5 },
153-
qty: { $gt: 4 }
154-
})
151+
collection.find({
152+
rating: { $eq: 5 },
153+
qty: { $gt: 4 }
154+
})
155155

156156
.. code-block:: javascript
157157

158-
collection.find({
159-
$and: [
160-
{ rating: { $eq: 5 }},
161-
{ qty: { $gt: 4 }}
162-
]
163-
})
158+
collection.find({
159+
$and: [
160+
{ rating: { $eq: 5 }},
161+
{ qty: { $gt: 4 }}
162+
]
163+
})
164164

165165
For more information on comparison operators, see the reference manual
166166
entry for :manual:`Comparison Query Operators </reference/operator/query-comparison/>`.

source/fundamentals/logging.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,16 @@ apply a filter to log messages from the ``Db`` class only.
8484

8585
.. code-block:: js
8686

87-
// Set debug level
88-
Logger.setLevel("debug");
87+
// Set debug level
88+
Logger.setLevel("debug");
8989

90-
// Only log statements on "Db" class
91-
Logger.filter("class", ["Db"]);
90+
// Only log statements on "Db" class
91+
Logger.filter("class", ["Db"]);
9292

93-
const db = client.db("sample_mflix");
93+
const db = client.db("sample_mflix");
9494

95-
// Execute command { hello: 1 } against db
96-
await db.command({ hello: 1 });
97-
}
95+
// Execute command { hello: 1 } against db
96+
await db.command({ hello: 1 });
9897

9998
The logger output of the code above is similar to the prior example, but
10099
excludes logging from classes other than ``Db`` such as ``Server`` and

source/quick-start.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -168,35 +168,35 @@ application.
168168

169169
.. code-block:: js
170170

171-
const { MongoClient } = require("mongodb");
172-
173-
// Replace the uri string with your connection string.
174-
const uri =
175-
"mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&writeConcern=majority";
176-
177-
const client = new MongoClient(uri, {
178-
useNewUrlParser: true,
179-
useUnifiedTopology: true,
180-
});
181-
182-
async function run() {
183-
try {
184-
await client.connect();
185-
186-
const database = client.db('sample_mflix');
187-
const movies = database.collection('movies');
188-
189-
// Query for a movie that has the title 'Back to the Future'
190-
const query = { title: 'Back to the Future' };
191-
const movie = await movies.findOne(query);
192-
193-
console.log(movie);
194-
} finally {
195-
// Ensures that the client will close when you finish/error
196-
await client.close();
197-
}
198-
}
199-
run().catch(console.dir);
171+
const { MongoClient } = require("mongodb");
172+
173+
// Replace the uri string with your connection string.
174+
const uri =
175+
"mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&writeConcern=majority";
176+
177+
const client = new MongoClient(uri, {
178+
useNewUrlParser: true,
179+
useUnifiedTopology: true,
180+
});
181+
182+
async function run() {
183+
try {
184+
await client.connect();
185+
186+
const database = client.db('sample_mflix');
187+
const movies = database.collection('movies');
188+
189+
// Query for a movie that has the title 'Back to the Future'
190+
const query = { title: 'Back to the Future' };
191+
const movie = await movies.findOne(query);
192+
193+
console.log(movie);
194+
} finally {
195+
// Ensures that the client will close when you finish/error
196+
await client.close();
197+
}
198+
}
199+
run().catch(console.dir);
200200

201201
.. tip::
202202

0 commit comments

Comments
 (0)