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

I need to check why my text is not being properly converted to markdown #637

Closed
ldco2016 opened this issue Apr 30, 2024 · 0 comments
Closed

Comments

@ldco2016
Copy link

So I was going to use the text to markdown UI you used to have in your uiwjs.github.io but its not there anymore.

I implemented the @uiwjs/react-md-markdown library in a project, but when I paste the following:

[{"content":"# Querying for Elements With Different Criteria\n\nReact Testing Library provides many different query functions. Each begins with a name like getBy, findBy, etc. The names also have common endings. The different name endings indicate how the query for an element will be performed.\n\n| End of Function Name | Search Criteria |\n|----------------------|--------------------------------------------------------------------|\n| ByRole | Finds elements based on their implicit or explicit ARIA role |\n| ByLabelText | Find form elements based upon the text their paired labels contain |\n| ByPlaceholderText | Find form elements based upon their placeholder text |\n| ByText | Find elements based upon the text they contain |\n| ByDisplayValue | Find elements based upon their current value |\n| ByAltText | Find elements based upon their alt attribute |\n| ByTitle | Find elements based upon their title attribute |\n| ByTestId | Find elements based upon their data-testid attribute |\n\n## When to Use Each\n\nAlways prefer using query functions ending with ByRole. Only use others if ByRole is not an option.","type":"text","id":"erck3"},{"content":"import { screen, render } from '@testing-library/react';\nimport { useState } from 'react';\n\nfunction DataForm() {\n const [email, setEmail] = useState('asdf@asdf.com');\n\n return (\n

\n

Enter Data

\n\n <div data-testid="image wrapper">\n <img alt="data" src="data.jpg" />\n \n\n <label htmlFor="email">Email\n <input \n id="email"\n value={email}\n onChange={e => setEmail(e.target.value)}\n />\n\n <label htmlFor="color">Color\n <input id="color" placeholder="Red" />\n\n <button title="Click when ready to submit">\n Submit\n \n \n );\n}\n\nrender();","type":"code","id":"drua1"},{"content":"test('selecting different elements', () => {\n render();\n\n const elements = [\n screen.getByRole('button'),\n screen.getByText(/enter/i),\n\n screen.getByLabelText(/email/i),\n screen.getByPlaceholderText('Red'),\n screen.getByDisplayValue('asdf@asdf.com'),\n screen.getByAltText('data'),\n screen.getByTitle(/ready to submit/i),\n\n screen.getByTestId('image wrapper')\n ];\n\n for (let element of elements) {\n expect(element).toBeInTheDocument();\n }\n});","type":"code","id":"cpl5j"}]

It does not properly convert it to Markdown on the right hand panel.

@ldco2016 ldco2016 closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant