Skip to content

Commit b366ddd

Browse files
committed
refactor(many): fix readme formatting, fix docs parsing
1 parent c790958 commit b366ddd

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

packages/__docs__/src/compileMarkdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ function trimIndent(str: string) {
4949
let indent = ''
5050
lines.forEach((line, _i) => {
5151
// matches whitespace at the end of a string
52-
line.replace(/\s*$/, '')
52+
// eslint-disable-next-line no-param-reassign
53+
line = line.replace(/\s*$/, '')
5354
if (indentFound === false) {
5455
if (line === '') {
5556
return

packages/babel-plugin-transform-imports/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,29 @@ category: packages
77
This will convert any non-default imports that are referencing the package only to reference the full path to the module instead. For example:
88

99
```js
10+
---
11+
type: code
12+
---
1013
// a named member import:
1114
import { Text } from '@instructure/ui-elements'
15+
```
1216

1317
would be converted to
1418

19+
```js
20+
---
21+
type: code
22+
---
1523
// a named import using the full module path:
1624
import { Text } from '@instructure/ui-elements/lib/Text'
25+
```
1726

1827
Note that any default imports you are currently using will not be transformed:
1928

29+
```js
30+
---
31+
type: code
32+
---
2033
// a default import using the full path (will not be transformed):
2134
import Text from '@instructure/ui-elements/lib/Text'
2235
```

packages/ui-form-field/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ npm install @instructure/ui-form-field
3030
### Usage
3131

3232
```js
33+
---
34+
type: code
35+
---
3336
import React from 'react'
3437
import { FormField } from '@instructure/ui-form-field'
3538

packages/ui-test-locator/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ npm install @instructure/ui-test-locator
1818

1919
### Usage
2020

21-
```javascript
21+
```js
22+
---
23+
type: code
24+
---
2225
// MyComponent.js
2326
import { testable } from '@instructure/ui-testable'
2427

packages/ui-tooltip/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ npm install @instructure/ui-tooltip
2525
### Usage
2626

2727
```js
28+
---
29+
type: code
30+
---
2831
import React from 'react'
2932
import { Tooltip } from '@instructure/ui-tooltip'
3033

0 commit comments

Comments
 (0)