Skip to content

Commit

Permalink
Merge branch 'aptos-labs-aptos-move-language' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Apr 5, 2024
2 parents 85de23b + 16959ef commit 91d60a1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/nextra/src/client/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export { ReactComponent as GraphQLIcon } from './graphql.svg'
export { ReactComponent as PythonIcon } from './python.svg'
export { ReactComponent as RustIcon } from './rust.svg'
export { ReactComponent as TerraformIcon } from './terraform.svg'
export { ReactComponent as MoveIcon } from './move.svg'
9 changes: 9 additions & 0 deletions packages/nextra/src/client/icons/move.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe('rehypeIcon', () => {
import { PythonIcon } from 'nextra/icons'
import { RustIcon } from 'nextra/icons'
import { TerraformIcon } from 'nextra/icons'
import { MoveIcon } from 'nextra/icons'
function _createMdxContent(props) {
const _components = {
code: 'code',
Expand Down Expand Up @@ -228,6 +229,12 @@ describe('rehypeIcon', () => {
</_components.span>
</_components.code>
</_components.pre>
{'\\n'}
<_components.pre icon={MoveIcon} tabIndex="0" data-language="move" data-word-wrap="" data-copy="">
<_components.code>
<_components.span> </_components.span>
</_components.code>
</_components.pre>
</>
)
}
Expand Down
3 changes: 2 additions & 1 deletion packages/nextra/src/server/rehype-plugins/rehype-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const REHYPE_ICON_DEFAULT_REPLACES: Record<string, string> = {
rust: 'RustIcon',
rs: 'RustIcon',
terraform: 'TerraformIcon',
tf: 'TerraformIcon'
tf: 'TerraformIcon',
move: 'MoveIcon'
}

function createImport(iconName: string) {
Expand Down

0 comments on commit 91d60a1

Please sign in to comment.