Skip to content

Commit ede4281

Browse files
wouterjjderusse
andcommitted
[PATCH] Fix syntax of all diff code blocks
Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
1 parent 290ef4d commit ede4281

32 files changed

+343
-343
lines changed

configuration/dot-env-changes.rst

Lines changed: 4 additions & 4 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 9 additions & 9 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 12 additions & 12 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 12 additions & 12 deletions
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy