-
Notifications
You must be signed in to change notification settings - Fork 39
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
Remove redundant backticks around monospaced text #74
Comments
Hi there! If possible I'd like to be assigned this issue. |
Done! Thanks for taking it on. |
hi there, here is the google doc link, is this what you wanted? I think I've been overthinking this and have put it off in fear of doing it wrong so apologies for how long it's been since this got assigned.. let me know how it looks! |
Hmmm, I think there may have been some miscommunication here. The doc you linked looks like a copy of the doc I originally referenced, but I’m not sure what you might have changed in it. Either way, this is a really big and complex doc that covers a lot more stuff than I intended this issue to be about! I was thinking about a doc like this one: https://docs.google.com/document/d/13mZmi-5oR0J2TPkfngMKtPmQ4raizLfUVTQ2ZUCKU30 It currently converts to this markdown: This is a test of redundant/literal backticks that should be removed.
Sometimes people surround code with literal backticks: \``code`\`
Or with backticks inside the code: `` `code` `` But this issue is about converting it to this instead: This is a test of redundant/literal backticks that should be removed.
Sometimes people surround code with literal backticks: `code`
Or with backticks inside the code: `code` Also, feel free use the doc I linked here as a test case. To add it as a fixture, add a reference to it in google-docs-to-markdown/scripts/download-fixtures.js Lines 11 to 20 in 7df0eae
Then run And finally add a test for it in google-docs-to-markdown/test/unit/convert.test.js Lines 19 to 20 in 7df0eae
(Every fixture gets two tests: one for the content you’d get from copy & pasting and one for the the content you’d get if you exported the Google Doc as HTML. But the export one gets skipped because there is some complicated stuff in exports that we don’t support yet. It’s just there for whenever someone starts working on #60.) After all that, you can actually run the tests with: |
@JCardona0110 are you still able to work on this, or should I un-assign it? |
I think it's not something I can handle at the moment, please unassign and
thanks for your patience.
…On Fri, Aug 11, 2023, 6:35 PM Rob Brackett ***@***.***> wrote:
@JCardona0110 <https://github.com/JCardona0110> are you still able to
work on this, or should I un-assign it?
—
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7OW2ESL2YGJSMNN4JNQQI3XU2XRLANCNFSM6AAAAAAZ2JWVXI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
OK, done. |
Because of Markdown’s popularity, a lot of people have taken to the convention of surrounding code-like text with backticks in Google Docs. For example:
(From https://docs.google.com/document/d/1cpzIK-BdP7u6RJSar-Z955GV--2Rj8V4x2vl34m36Go)
If the text is also monospaced, we already convert it “code” and wind up with a lot of messy, redundant backticks in the resulting markdown, like:
Ideally, we should remove these backticks. This should work whether the backticks are monospaced or they are just outside the monospaced text.
(Another nice thing to do might be to detect short runs of backtick-surrounded text and make them code. Right now we only detect monospaced text as code.)
The text was updated successfully, but these errors were encountered: