Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tel: href tag not working #865

Closed
4 tasks done
vitalijalbu opened this issue Oct 17, 2024 · 3 comments
Closed
4 tasks done

tel: href tag not working #865

vitalijalbu opened this issue Oct 17, 2024 · 3 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@vitalijalbu
Copy link

Initial checklist

Affected packages and versions

9.0.1

Link to runnable example

No response

Steps to reproduce

Basically I added a simple phone tel: link and it not passing href props

Screenshot 2024-10-17 alle 10 40 17

Expected behavior

It should work as expected

Actual behavior

Not passing props.

my code:

const components = {
  p: PComponent,
  h1: H1Component,
  h2: H2Component,
  h3: H3Component,
  h4: H4Component,
  h5: H5Component,
  h6: H6Component,
  strong: StrongComponent,
  em: EmComponent,
  a: AComponent,
  ul: UlComponent,
  ol: OlComponent,
  img: ImgComponent,
  blockquote: QuoteComponent,
  table: TableComponent,
};

<Markdown
      remarkPlugins={[
        remarkGfm,
        remarkCustomHeaderId,
        remarkParse,
        remarkLinkTarget,
      ]}
      rehypePlugins={[rehypeRaw]}
      components={components}
    >
      {markdown}
    </Markdown>

function AComponent({ children, href = '#', ...props }: LinkProps) {
console.log('AComponent', {href, props, children});
if (href.startsWith('tel:')) {
  return (
    <a href={href} {...props}>
      {children}
    </a>
  );
} else {
  return (
    <TextLink href={href} {...props}>
      {children}
    </TextLink>
  );
}
}

Affected runtime and version

node 20

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 17, 2024
@vitalijalbu
Copy link
Author

Tried also on your md editr online and not working

@wooorm
Copy link
Member

wooorm commented Oct 17, 2024

It is working. It is removed. Read the docs. You want to define urlTransform.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
@wooorm wooorm added the 🙋 no/question This does not need any changes label Oct 17, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants