Skip to content

Commit 4865b3b

Browse files
wouterjjderusse
andcommitted
[#15009] Fix indentation of all diff code blocks
Co-authored-by: Jérémy Derussé <[email protected]>
1 parent 8132571 commit 4865b3b

32 files changed

+343
-343
lines changed

configuration/dot-env-changes.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ changes can be made to any Symfony 3.4 or higher app:
6060

6161
.. code-block:: diff
6262
63-
# .gitignore
64-
# ...
63+
# .gitignore
64+
# ...
6565
66-
###> symfony/framework-bundle ###
66+
###> symfony/framework-bundle ###
6767
- /.env
6868
+ /.env.local
6969
+ /.env.local.php
7070
+ /.env.*.local
7171
72-
# ...
72+
# ...
7373
7474
#. Rename ``.env`` to ``.env.local`` and ``.env.dist`` to ``.env``:
7575

controller.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ Add the ``use`` statement atop your controller class and then modify
9898

9999
.. code-block:: diff
100100
101-
// src/Controller/LuckyController.php
102-
namespace App\Controller;
101+
// src/Controller/LuckyController.php
102+
namespace App\Controller;
103103
104104
+ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
105105
106106
- class LuckyController
107107
+ class LuckyController extends AbstractController
108-
{
109-
// ...
110-
}
108+
{
109+
// ...
110+
}
111111
112112
That's it! You now have access to methods like :ref:`$this->render() <controller-rendering-templates>`
113113
and many others that you'll learn about next.

doctrine.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -280,20 +280,20 @@ methods:
280280

281281
.. code-block:: diff
282282
283-
// src/Entity/Product.php
284-
// ...
283+
// src/Entity/Product.php
284+
// ...
285285
286-
class Product
287-
{
288-
// ...
286+
class Product
287+
{
288+
// ...
289289
290290
+ /**
291291
+ * @ORM\Column(type="text")
292292
+ */
293293
+ private $description;
294294
295-
// getDescription() & setDescription() were also added
296-
}
295+
// getDescription() & setDescription() were also added
296+
}
297297
298298
The new property is mapped, but it doesn't exist yet in the ``product`` table. No
299299
problem! Generate a new migration:

frontend/encore/cdn.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ built files are uploaded to the CDN, configure it in Encore:
66

77
.. code-block:: diff
88
9-
// webpack.config.js
10-
// ...
11-
12-
Encore
13-
.setOutputPath('public/build/')
14-
// in dev mode, don't use the CDN
15-
.setPublicPath('/build');
16-
// ...
17-
;
9+
// webpack.config.js
10+
// ...
11+
12+
Encore
13+
.setOutputPath('public/build/')
14+
// in dev mode, don't use the CDN
15+
.setPublicPath('/build');
16+
// ...
17+
;
1818
1919
+ if (Encore.isProduction()) {
2020
+ Encore.setPublicPath('https://my-cool-app.com.global.prod.fastly.net');

frontend/encore/copy-files.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ files into your final output directory.
3232

3333
.. code-block:: diff
3434
35-
// webpack.config.js
35+
// webpack.config.js
3636
37-
Encore
38-
// ...
39-
.setOutputPath('public/build/')
37+
Encore
38+
// ...
39+
.setOutputPath('public/build/')
4040
4141
+ .copyFiles({
4242
+ from: './assets/images',

frontend/encore/custom-loaders-plugins.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ to use the `IgnorePlugin`_ (see `moment/moment#2373`_):
5050

5151
.. code-block:: diff
5252
53-
// webpack.config.js
53+
// webpack.config.js
5454
+ var webpack = require('webpack');
5555
56-
Encore
57-
// ...
56+
Encore
57+
// ...
5858
5959
+ .addPlugin(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
60-
;
60+
;
6161
6262
.. _`handlebars-loader`: https://github.com/pcardune/handlebars-loader
6363
.. _`plugins`: https://webpack.js.org/plugins/

frontend/encore/dev-server.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,29 @@ the ``package.json`` file:
6565

6666
.. code-block:: diff
6767
68-
{
69-
...
70-
"scripts": {
68+
{
69+
...
70+
"scripts": {
7171
- "dev-server": "encore dev-server",
7272
+ "dev-server": "encore dev-server --https --pfx=$HOME/.symfony/certs/default.p12 --allowed-hosts=mydomain.wip",
73-
...
74-
}
75-
}
73+
...
74+
}
75+
}
7676
7777
If you experience issues related to CORS (Cross Origin Resource Sharing), add
7878
the ``--disable-host-check`` and ``--port`` options to the ``dev-server``
7979
command in the ``package.json`` file:
8080

8181
.. code-block:: diff
8282
83-
{
84-
...
85-
"scripts": {
83+
{
84+
...
85+
"scripts": {
8686
- "dev-server": "encore dev-server",
8787
+ "dev-server": "encore dev-server --port 8080 --disable-host-check",
88-
...
89-
}
90-
}
88+
...
89+
}
90+
}
9191
9292
.. caution::
9393

frontend/encore/faq.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ like ``/myAppSubdir``), you will need to configure that when calling ``Encore.se
6363

6464
.. code-block:: diff
6565
66-
// webpack.config.js
67-
Encore
68-
// ...
66+
// webpack.config.js
67+
Encore
68+
// ...
6969
70-
.setOutputPath('public/build/')
70+
.setOutputPath('public/build/')
7171
7272
- .setPublicPath('/build')
7373
+ // this is your *true* public path
@@ -76,7 +76,7 @@ like ``/myAppSubdir``), you will need to configure that when calling ``Encore.se
7676
+ // this is now needed so that your manifest.json keys are still `build/foo.js`
7777
+ // (which is a file that's used by Symfony's `asset()` function)
7878
+ .setManifestKeyPrefix('build')
79-
;
79+
;
8080
8181
If you're using the ``encore_entry_script_tags()`` and ``encore_entry_link_tags()``
8282
Twig shortcuts (or are :ref:`processing your assets through entrypoints.json <load-manifest-files>`

frontend/encore/legacy-applications.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jQuery plugins often expect that jQuery is already available via the ``$`` or
3232

3333
.. code-block:: diff
3434
35-
// webpack.config.js
36-
Encore
37-
// ...
35+
// webpack.config.js
36+
Encore
37+
// ...
3838
+ .autoProvidejQuery()
39-
;
39+
;
4040
4141
After restarting Encore, Webpack will look for all uninitialized ``$`` and ``jQuery``
4242
variables and automatically require ``jquery`` and set those variables for you.
@@ -75,10 +75,10 @@ page, add:
7575

7676
.. code-block:: diff
7777
78-
// webpack.config.js
78+
// webpack.config.js
7979
80-
// require jQuery normally
81-
const $ = require('jquery');
80+
// require jQuery normally
81+
const $ = require('jquery');
8282
8383
+ // create global $ and jQuery variables
8484
+ global.$ = global.jQuery = $;

frontend/encore/postcss.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Then, enable the loader in Encore!
2828

2929
.. code-block:: diff
3030
31-
// webpack.config.js
31+
// webpack.config.js
3232
33-
Encore
34-
// ...
33+
Encore
34+
// ...
3535
+ .enablePostCssLoader()
36-
;
36+
;
3737
3838
Because you just modified ``webpack.config.js``, stop and restart Encore.
3939

@@ -42,17 +42,17 @@ You can also pass options to the `postcss-loader`_ by passing a callback:
4242

4343
.. code-block:: diff
4444
45-
// webpack.config.js
45+
// webpack.config.js
4646
47-
Encore
48-
// ...
47+
Encore
48+
// ...
4949
+ .enablePostCssLoader((options) => {
5050
+ options.config = {
5151
+ // the directory where the postcss.config.js file is stored
5252
+ path: 'path/to/config'
5353
+ };
5454
+ })
55-
;
55+
;
5656
5757
.. _browserslist_package_config:
5858

@@ -65,25 +65,25 @@ support. The best-practice is to configure this directly in your ``package.json`
6565

6666
.. code-block:: diff
6767
68-
{
68+
{
6969
+ "browserslist": [
7070
+ "defaults"
7171
+ ]
72-
}
72+
}
7373
7474
The ``defaults`` option is recommended for most users and would be equivalent
7575
to the following browserslist:
7676

7777
.. code-block:: diff
7878
79-
{
79+
{
8080
+ "browserslist": [
8181
+ "> 0.5%",
8282
+ "last 2 versions",
8383
+ "Firefox ESR",
8484
+ "not dead"
8585
+ ]
86-
}
86+
}
8787
8888
See `browserslist`_ for more details on the syntax.
8989

frontend/encore/reactjs.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Enable react in your ``webpack.config.js``:
1717

1818
.. code-block:: diff
1919
20-
// webpack.config.js
21-
// ...
20+
// webpack.config.js
21+
// ...
2222
23-
Encore
24-
// ...
23+
Encore
24+
// ...
2525
+ .enableReactPreset()
26-
;
26+
;
2727
2828
2929
Then restart Encore. When you do, it will give you a command you can run to

frontend/encore/shared-entry.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Update your code to use ``createSharedEntry()``:
1616

1717
.. code-block:: diff
1818
19-
Encore
20-
// ...
19+
Encore
20+
// ...
2121
- .addEntry('app', './assets/js/app.js')
2222
+ .createSharedEntry('app', './assets/js/app.js')
23-
.addEntry('homepage', './assets/js/homepage.js')
24-
.addEntry('blog', './assets/js/blog.js')
25-
.addEntry('store', './assets/js/store.js')
23+
.addEntry('homepage', './assets/js/homepage.js')
24+
.addEntry('blog', './assets/js/blog.js')
25+
.addEntry('store', './assets/js/store.js')
2626
2727
Before making this change, if both ``app.js`` and ``store.js`` require ``jquery``,
2828
then ``jquery`` would be packaged into *both* files, which is wasteful. By making

0 commit comments

Comments
 (0)