Skip to content

Commit bbf3d69

Browse files
Gianluca Beilwerwolf2303
authored andcommitted
docs: Escape HTML tags and replace pre in jsdoc examples
1 parent 0e7b1b8 commit bbf3d69

File tree

12 files changed

+25
-18
lines changed

12 files changed

+25
-18
lines changed

packages/builder/lib/lbt/resources/ModuleInfo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ class ModuleInfo {
8484
* global scope. If a module declares global variables, all of them will be exported
8585
* with additional code of the form:
8686
*
87-
* <pre>
88-
* this["name"] = name;
89-
* </pre>
87+
* ```
88+
* this["name"] = name;
89+
* ```
90+
*
9091
*
9192
* To avoid this, developers can either add "name" to the <code>ignoreGlobals</code>
9293
* attribute of a raw-module or they can completely suppress embedding of the module

packages/builder/lib/lbt/resources/ResourceFilterList.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ export default class ResourceFilterList {
141141
* and vice versa.
142142
*
143143
* Example:
144-
* <pre>
144+
* ```
145145
* !sap/ui/core/
146146
* +sap/ui/core/utils/
147-
* </pre>
147+
* ```
148+
*
148149
* excludes everything from sap/ui/core, but includes everything from the subpackage sap/ui/core/utils/.
149150
*
150151
* Note that the filter operates on the full name of each resource. If a resource name

packages/builder/lib/processors/bundlers/moduleBundler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ const log = getLogger("builder:processors:bundlers:moduleBundler");
5757
* denote an arbitrary number of characters or folder names.
5858
* Excludes should be marked with a leading exclamation mark '!'. The order of filters is relevant; a later
5959
* exclusion overrides an earlier inclusion, and vice versa.
60-
* @example <caption>List of modules as glob patterns that should be in- or excluded</caption>
60+
* <caption>List of modules as glob patterns that should be in- or excluded</caption>
61+
* ```
6162
* // Includes everything from "some/path/to/module/",
6263
* // but excludes the subfolder "some/path/to/module/to/be/excluded/"
6364
* const section = {
@@ -66,6 +67,7 @@ const log = getLogger("builder:processors:bundlers:moduleBundler");
6667
* "!some/path/to/module/to/be/excluded/"
6768
* ]
6869
* };
70+
* ```
6971
*
7072
* @property {boolean} [resolve=false] Whether (transitive) dependencies of modules that match the given filters
7173
* should be resolved and added to the module set

packages/builder/lib/processors/versionInfoGenerator.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ function getTimestamp() {
2828
* @typedef {Object<string, {lazy: boolean}>} ManifestLibraries
2929
*
3030
* sample:
31-
* <pre>
31+
* @example
3232
* {
3333
* "sap.chart": {
3434
* "lazy": true
3535
* },
3636
* "sap.f": { }
3737
* }
38-
* </pre>
3938
*/
4039

4140
/**
@@ -366,14 +365,16 @@ const processLibraryInfo = async (libraryInfo) => {
366365
* @param {string} parameters.options.rootProjectVersion Version of the root project
367366
* @param {module:@ui5/builder/processors/versionInfoGenerator~LibraryInfo[]} parameters.options.libraryInfos Array of
368367
* objects representing libraries,
369-
* e.g. <pre>
368+
* e.g.
369+
* ```
370370
* {
371371
* name: "lib.x",
372372
* version: "1.0.0",
373373
* libraryManifest: @ui5/fs/Resource,
374374
* embeddedManifests: @ui5/fs/Resource[]
375375
* }
376-
* </pre>
376+
* ```
377+
*
377378
* @returns {Promise<@ui5/fs/Resource[]>} Promise resolving with an array containing the versionInfo resource
378379
*/
379380

packages/builder/lib/tasks/generateResourcesJson.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ function getCreatorOptions(projectName) {
5555
* Therefore it is also not supported in combination with self-contained build.
5656
* </p>
5757
*
58-
* @example <caption>sample resources.json</caption>
58+
* <caption>sample resources.json</caption>
59+
* ```
5960
* const resourcesJson = {
6061
* "_version": "1.1.0",
6162
* "resources": [
@@ -95,6 +96,7 @@ function getCreatorOptions(projectName) {
9596
* }
9697
* ]
9798
* };
99+
* ```
98100
*
99101
* @public
100102
* @function default

packages/fs/lib/resourceFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export function createLinkReader(parameters) {
235235

236236
/**
237237
* Create a [Link-Reader]{@link @ui5/fs/readers/Link} where all requests are prefixed with
238-
* <code>/resources/<namespace></code>.
238+
* <code>/resources/&lt;namespace&gt;</code>.
239239
*
240240
* This simulates "flat" resource access, which is for example common for projects of type
241241
* "application".

packages/project/lib/build/helpers/TaskUtil.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class TaskUtil {
275275
* @property {Function} createLinkReader
276276
* Create a [Link-Reader]{@link @ui5/fs/readers/Filter} with the given reader.
277277
* @property {Function} createFlatReader Create a [Link-Reader]{@link @ui5/fs/readers/Link}
278-
* where all requests are prefixed with <code>/resources/<namespace></code>.
278+
* where all requests are prefixed with <code>/resources/&lt;namespace&gt;</code>.
279279
*/
280280

281281
/**

packages/project/lib/specifications/ComponentProject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class ComponentProject extends Project {
106106
* <li><b>runtime:</b> Resource paths always match with what the UI5 runtime expects.
107107
* This means that paths generally depend on the project type. Applications for example use a "flat"-like
108108
* structure, while libraries use a "buildtime"-like structure.
109-
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied
109+
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied</li>
110110
* <li><b>flat:</b> Resource paths are never prefixed and namespaces are omitted if possible. Note that
111111
* project types like "theme-library", which can have multiple namespaces, can't omit them.
112112
* Any configured build-excludes are applied</li>

packages/project/lib/specifications/Project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Project extends Specification {
235235
* <li><b>runtime:</b> Resource paths always match with what the UI5 runtime expects.
236236
* This means that paths generally depend on the project type. Applications for example use a "flat"-like
237237
* structure, while libraries use a "buildtime"-like structure.
238-
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied
238+
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied</li>
239239
* <li><b>flat:</b> Resource paths are never prefixed and namespaces are omitted if possible. Note that
240240
* project types like "theme-library", which can have multiple namespaces, can't omit them.
241241
* Any configured build-excludes are applied</li>

packages/project/lib/specifications/types/Module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Module extends Project {
4848
* <li><b>runtime:</b> Resource paths always match with what the UI5 runtime expects.
4949
* This means that paths generally depend on the project type. Applications for example use a "flat"-like
5050
* structure, while libraries use a "buildtime"-like structure.
51-
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied
51+
* This style is typically used for serving resources directly. Therefore, build-excludes are not applied</li>
5252
* <li><b>flat:</b> Resource paths are never prefixed and namespaces are omitted if possible. Note that
5353
* project types like "theme-library", which can have multiple namespaces, can't omit them.
5454
* Any configured build-excludes are applied</li>

0 commit comments

Comments
 (0)