Skip to content

Inconsistent markdown conversion while typing/exporting #1052

Open
@CobaltCause

Description

@CobaltCause

Bug Report

I was testing stuff on the public test doc and I noticed that if I type e.g. "**foo**", it converts it into "foo", which makes sense. However, if I typed "[foo](https://example.com)", it left it as-is rather than converting it into a hyperlink. That is possibly a bug, possibly a design choice, not sure. I then tried writing "foo", selecting it, and using the UI to insert a link, which worked. So now the document looked like this:

[foo](https://example.com)
foo

Where the second line is a hyperlink, as intended. However, when I copied this document as markdown and pasted it into a text editor, it looked like this:

[foo](https://example.com)

[foo](https://example.com)

which, if converted to HTML, would not be true to the original Docs document, since both lines would be hyperlinks instead of only the second one.

Environment

Possible Solution

Depending on the intended behavior, it may be sufficient to escape the first line in this example when copying to markdown so that the markdown document looks like this:

\[foo\]\(https://example.com)

[foo](https://example.com)

so that when it's converted to HTML, it represents the original Docs document faithfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions