browser-compat-data icon indicating copy to clipboard operation
browser-compat-data copied to clipboard

Allow use of Markdown in description and notes

Open queengooborg opened this issue 1 year ago • 19 comments

This PR updates the build/lint scripts to allow the use of Markdown for descriptions and notes internally. To retain compatibility with consumers, the Markdown is then converted to HTML.

This is a purely internal change that will not impact consumers, let alone warrant a semantic versioning bump. This will only positively impact maintainers.

Note: some of our notes already have Markdown formatting.

Follow-Up Work

After this PR is approved, we should go through and convert all of our notes to Markdown format in a bulk update.

FUTURE Schema Change Proposal

I plan to open an issue to formally propose this, however I am unsure if we want to do this change now while converting to Markdown, so I am mentioning it here.

To allow consumers to utilize the Markdown versions if they wish to, I am proposing a future change to the schema to convert the notes property into an object containing both formats, like so:

{
  notes: {
    md: "**Foo** bar",
    html: "<strong>Foo</strong> bar"
  }
}

Alternatively (though I'm less favorable of this), to keep from making a breaking change, we can add a notesMD property alongside the HTML version:

{
  notes: "<strong>Foo</strong> bar",
  notesMD: "**Foo** bar"
}

queengooborg avatar Dec 06 '23 05:12 queengooborg

I'm all for it, though I think this needs a decision from the maintainers.

A question: does this lead to a new major release?

Maybe we should do it in two phases: changing the schema, allowing some time for consumers (MDN displays these notes, maybe others) to adapt, and then making the textual changes (If I remember well, HTML tags are valid in MD, so it should be ok).

teoli2003 avatar Dec 06 '23 07:12 teoli2003

A question: does this lead to a new major release?

No, this actually does not change the schema! To the end user, they'll just see a few notes change, but they're still formatted as HTML.

My apologies, I didn't clarify that the schema proposal is for a future schema change. This PR purely changes internal formatting for maintainers. I updated the PR description to clarify this.

queengooborg avatar Dec 06 '23 08:12 queengooborg

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 10 '23 17:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 10 '23 20:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 14 '23 22:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 15 '23 11:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 18 '23 08:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 19 '23 17:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Feb 09 '24 11:02 github-actions[bot]

When's this planned? Very much looking forward to working in markdown.

hamishwillee avatar Mar 31 '24 23:03 hamishwillee

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Jun 25 '24 11:06 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Jul 03 '24 11:07 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Jul 22 '24 11:07 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Jul 22 '24 11:07 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Aug 21 '24 12:08 github-actions[bot]