Skip to content

Commit 4197142

Browse files
authored
Misc getting started fixes (#2775)
1 parent 3fd4144 commit 4197142

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/src/content/introduction/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In this guide, we’ll show you how to get started with Victory and walk you thr
2323

2424
You can do this on your own if you'd like, or you can...
2525

26-
* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using ```git clone git@github.com:FormidableLabs/victory-tutorial.git```
26+
* Clone down [this project we've started for you](https://github.com/FormidableLabs/victory-tutorial) using `git clone git@github.com:FormidableLabs/victory-tutorial.git`
2727
* `cd victory-tutorial`
2828
* Replace the existing code in the `client.js` file with:
2929

@@ -153,6 +153,8 @@ class App extends React.Component {
153153
ReactDOM.render(<App/>, mountNode);
154154
```
155155

156+
While the axes defaults are great, you can see there's some overlap with the y-axis and first bar. Let's fix that in the next section.
157+
156158
#### 6. Customize the axes
157159

158160
Next, let's modify the tick labels on the axes to be a little more descriptive. We can do this by adding and configuring `VictoryAxis` components to our chart, so let's import `VictoryAxis`. Import statements should now look like this:

docs/src/partials/markdown/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export function renderHeading(props) {
113113
const slug = text
114114
.trim()
115115
.toLowerCase()
116+
.replace(/^\d+\.\s*/, "") // remove leading numbers and periods
116117
.replace(/[^\w\- ]/g, "") // Remove punctuation
117118
.replace(/\s+/g, "-"); // Replace spaces with a dash
118119

@@ -144,7 +145,6 @@ renderHeading.propTypes = {
144145
* @param {Object} meta - meta
145146
* @returns {Object} link element
146147
*/
147-
// eslint-disable-next-line react/no-multi-comp
148148
export const renderLink = ({ href, children }) => {
149149
if (/^\w+:/.test(href)) {
150150
return (
@@ -161,7 +161,7 @@ renderLink.propTypes = {
161161
href: PropTypes.string,
162162
};
163163

164-
/* eslint-enable react/prop-types, no-magic-numbers */
164+
/* eslint-enable no-magic-numbers */
165165
const Markdown = (props) => {
166166
const { className, source, scope, theme } = props;
167167
/* eslint-disable react/prop-types, no-magic-numbers */

0 commit comments

Comments
 (0)