Skip to content

Commit ff7db0c

Browse files
committed
fix: Quote <body> and <div> string appearing in List docs
1 parent 08204d1 commit ff7db0c

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

R/documentation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ NULL
20492049
#'
20502050
#' Add the data-is-scrollable="true" attribute to your scrollable element containing the List.
20512051
#'
2052-
#' By default, the List will use the <body> element as the scrollable element. If you contain List within a scrollable <div> using overflow: auto or scroll, List needs to listen for scroll events on that element instead. On initialization, List will traverse up the DOM looking for the first element with the data-is-scrollable attribute to know which element to listen to for knowing when to re-evaulate the visible window.
2052+
#' By default, the List will use the `<body>` element as the scrollable element. If you contain List within a scrollable `<div>` using overflow: auto or scroll, List needs to listen for scroll events on that element instead. On initialization, List will traverse up the DOM looking for the first element with the data-is-scrollable attribute to know which element to listen to for knowing when to re-evaulate the visible window.
20532053
#'
20542054
#' #### My list isn't re-rendering when I mutate its items, what should I do?
20552055
#'

man/List.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scrape-docs/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
### Scrape Fluent UI docs
2-
Run `yarn install` followed by:
3-
* `yarn ts-node makeDocs` to generate `fluent-docs.json` and `../R/documentation.R`.
2+
3+
* `yarn install`: Install dependencies.
4+
* `yarn ts-node makeDocs`: Gnerate `fluent-docs.json` and `../R/documentation.R`.
5+
* `yarn lint [--fix]`: Lint code.

scrape-docs/makeDocs.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,26 @@ const REPLACE_MAP = [
2626
regex: /@name pickers/gm,
2727
replacement: '@name Pickers',
2828
},
29+
// Quote <body> and <div> (appearing in List documentation).
30+
{
31+
regex: /(<body>|<div>)/gm,
32+
replacement: '`$1`',
33+
},
2934
// Quote empty markdown links, e.g. "[Object]" as it throws roxygen warning about missing url
3035
{
3136
regex: /(\[(\w+\s?\w+)\])(?!\(.*\))/gm,
32-
replacement: '`\$1`', // eslint-disable-line
37+
replacement: '`$1`',
3338
},
3439
// Quote regexes in text
3540
{
3641
regex: /(\[(0-9|a-zA-Z|a-zA-Z0-9)\])/gm,
37-
replacement: '`\$1`', // eslint-disable-line
42+
replacement: '`$1`',
3843
},
3944
// Remove empty @details
4045
{
4146
regex: /#'\s+@details[\n\s]+#'[\n\s]+#'[\n\s]+\\itemize\{\n#'\s\}/gm,
42-
replacement: '#\''
43-
}
47+
replacement: '#\'',
48+
},
4449
];
4550

4651
async function main() {

0 commit comments

Comments
 (0)