Skip to content

fail to show line number  #181

Description

@jytang0621

here is my code. I'm confused where goes wrong.

import CodeEditor from "@uiw/react-textarea-code-editor";
import rehypePrism from "rehype-prism-plus";

export const Sparql = () => {
  return (
    <CodeEditor
      value={`  SELECT ?x ?name
  {
    ?x  foaf:mbox <mailto:alice@example> .
    ?x  foaf:knows ?a1 .
    ?a1 foaf:knows ?a2 .
    ?a2 foaf:name ?name .
  }`}
      language="sparql"
      data-color-mode="light"
      rehypePlugins={[
        [rehypePrism, { ignoreMissing: true, showLineNumbers: true }],
      ]}
      style={{
        fontFamily:
          'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace',
      }}
    />
  );
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions