Skip to content

Commit

Permalink
Merge pull request #357 from code-hike/mark-copy-button
Browse files Browse the repository at this point in the history
Add copy button to multiline mark
  • Loading branch information
pomber authored Apr 22, 2023
2 parents d459bd4 + aa719d3 commit 4c8f649
Show file tree
Hide file tree
Showing 7 changed files with 884 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/mdx/dev/content/comment-annotations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ console.log("hey")
Same with other annotations like `mark` and `box`.

```js
// mark(1:2)
function foo() {
// hey
// mark(1)
function foobarloremipsumfoobarloremipsumsitametfoobarloremipsumfoobarloremipsumsitamet() {
// mark[6:9] mark-box
console.log("hover me")
return 8
Expand Down Expand Up @@ -88,7 +89,7 @@ function lorem(ipsum, dolor = 1) {
# mark[3:7]
local sit=0
# label something something
dolor=$((sit - amet(dolor)))
dolor=$((sit - amet(dolor))
# link[19:29] https://github.com/code-hike/codehike
return $sit and consectetur(ipsum) or []
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/dev/files.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "fs"
import { remarkCodeHike } from "../src/index"
import { compile } from "@mdx-js/mdx"
import theme from "shiki/themes/rose-pine-moon.json"
import theme from "./theme.js"
import { withDebugger } from "mdx-debugger"

export async function getFiles() {
Expand Down
Loading

0 comments on commit 4c8f649

Please sign in to comment.