Skip to content

Commit b39bd1b

Browse files
authored
Editorial: split multi-<code> <pre>s into individual <pre><code>
This pattern makes conversion to Bikeshed more complicated, so convert them to individual code blocks. The rendered result is very similar.
1 parent e80a243 commit b39bd1b

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

source

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118675,6 +118675,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
118675118675
"/d-1.mjs": "sha384-MBO5IDfYaE6c6Aao94oZrIOiC6CGiSN2n4QUbHNPhzk5Xhm0djZLQqTpL0HzTUxk"
118676118676
}
118677118677
}</code></pre>
118678+
118678118679
<p>The above example provides integrity metadata to be enforced on the modules <code
118679118680
data-x="">/a-1.mjs</code> and <code data-x="">/d-1.mjs</code>, even if the latter is not defined
118680118681
as an import in the map.</p>
@@ -119132,12 +119133,14 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119132119133
match are not conflicting, and all make it to the merged map.</p>
119133119134

119134119135
<p>So, the following existing and new import maps:</p>
119136+
119135119137
<pre><code class="json" data-x="">{
119136119138
"imports": {
119137119139
"/app/": "./original-app/",
119138119140
}
119139-
}</code>
119140-
<code class="json" data-x="">{
119141+
}</code></pre>
119142+
119143+
<pre><code class="json" data-x="">{
119141119144
"imports": {
119142119145
"/app/helper": "./helper/index.mjs"
119143119146
},
@@ -119147,7 +119150,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119147119150
}
119148119151
}
119149119152
}</code></pre>
119153+
119150119154
<p>Would be equivalent to the following single import map:</p>
119155+
119151119156
<pre><code class="json" data-x="">{
119152119157
"imports": {
119153119158
"/app/": "./original-app/",
@@ -119167,13 +119172,16 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119167119172

119168119173
<p>So, if the <span>resolved module set</span> already contains the "<code
119169119174
data-x="">/app/helper</code>", the following new import map:</p>
119175+
119170119176
<pre><code class="json" data-x="">{
119171119177
"imports": {
119172119178
"/app/helper": "./helper/index.mjs",
119173119179
"lodash": "/node_modules/lodash-es/lodash.js"
119174119180
}
119175119181
}</code></pre>
119182+
119176119183
<p>Would be equivalent to the following one:</p>
119184+
119177119185
<pre><code class="json" data-x="">{
119178119186
"imports": {
119179119187
"lodash": "/node_modules/lodash-es/lodash.js"
@@ -119185,6 +119193,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119185119193
<p>The same is true for rules that impact already resolved modules defined in specific scopes.
119186119194
If we already resolved "<code data-x="">/app/helper</code>" from "<code
119187119195
data-x="">/app/main.mjs</code>" the following new import map:</p>
119196+
119188119197
<pre><code class="json" data-x="">{
119189119198
"scopes": {
119190119199
"/app/": {
@@ -119195,7 +119204,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119195119204
"lodash": "/node_modules/lodash-es/lodash.js"
119196119205
}
119197119206
}</code></pre>
119207+
119198119208
<p>Would similarly be equivalent to:</p>
119209+
119199119210
<pre><code class="json" data-x="">{
119200119211
"imports": {
119201119212
"lodash": "/node_modules/lodash-es/lodash.js"
@@ -119209,6 +119220,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119209119220
would not be added to the map.</p>
119210119221
<p>For example, if we already resolved "<code data-x="">/app/helper</code>" from "<code
119211119222
data-x="">/app/vendor/main.mjs</code>", the following new import map:</p>
119223+
119212119224
<pre><code class="json" data-x="">{
119213119225
"scopes": {
119214119226
"/app/": {
@@ -119227,7 +119239,9 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119227119239
"/app/helper": "./other_path/helper/index.mjs"
119228119240
}
119229119241
}</code></pre>
119242+
119230119243
<p>Would be equivalent to:</p>
119244+
119231119245
<pre><code class="json" data-x="">{
119232119246
"scopes": {
119233119247
"/vendor/": {
@@ -119249,18 +119263,22 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
119249119263
already resolved modules, the existing import map rules persist.</p>
119250119264

119251119265
<p>For example, the following existing and new import maps:</p>
119266+
119252119267
<pre><code class="json" data-x="">{
119253119268
"imports": {
119254119269
"/app/helper": "./helper/index.mjs",
119255119270
"lodash": "/node_modules/lodash-es/lodash.js"
119256119271
}
119257-
}</code>
119258-
<code class="json" data-x="">{
119272+
}</code></pre>
119273+
119274+
<pre><code class="json" data-x="">{
119259119275
"imports": {
119260119276
"/app/helper": "./main/helper/index.mjs"
119261119277
}
119262119278
}</code></pre>
119279+
119263119280
<p>Would be equivalent to the following single import map:</p>
119281+
119264119282
<pre><code class="json" data-x="">{
119265119283
"imports": {
119266119284
"/app/helper": "./helper/index.mjs",

0 commit comments

Comments
 (0)