Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ It is always best to discuss your plans beforehand, to ensure that your contribu
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
- Write good commit messages (see below).
- Push your changes to a topic branch in your fork of the repository.
- As you push your changes, update the pull request with new infomation and tasks as you complete them
- As you push your changes, update the pull request with new information and tasks as you complete them
- Project maintainers might comment on your work as you progress
- When you are done, remove the `work in progess` label and ping the maintainers for a review
- Your pull request must receive a :thumbsup: from two [maintainers](MAINTAINERS)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ A Docusaurus v2 plugin that supports referencing code examples from public GitHu
First, add the theme plugin to your dependencies:

```sh
npm install @saucelabs/theme-github-codeblock
# NPM
npm install --save @saucelabs/theme-github-codeblock

# Yarn
yarn add @saucelabs/theme-github-codeblock
```

## Usage
Expand Down
85 changes: 41 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/theme/ReferenceCodeBlock/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { URL } from 'url'
import React, { useReducer } from 'react'
import CodeBlock from '@theme-init/CodeBlock'

Expand Down Expand Up @@ -51,7 +50,7 @@ export function parseReference (ref: string): GitHubReference {
}
}

export function parseCustomization (metastring: string | undefined): CustomizedLinkOptions {
export function parseCustomization (metastring: string | undefined): CustomizedLinkOptions {

const refTitle = metastring?.match(/title="(?<title>.*?)"/)?.groups?.title;

Expand All @@ -61,7 +60,7 @@ export function parseCustomization (metastring: string | undefined): CustomizedL
const customStylingMatch = metastring?.match(/customStyling/);
const refUseCustomStyling = customStylingMatch?.length === 1;
const refNoteStyling = customStylingMatch?.length === 1 ? {} : noteStyle;

return {
title: refTitle,
linkText: refLinkText,
Expand Down