Closed Bug 1519564 Opened 7 years ago Closed 7 years ago

Add a mechanism for disabling all special markdown syntax

Categories

(bugzilla.mozilla.org :: General, enhancement)

Staging
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: dylan)

References

Details

Attachments

(1 file)

Treeherder has a form sheriffs can use to file new intermittent failure bugs for pushes to autoland/m-c/beta/etc without having to jump in to bugzilla and copy/paste a bunch of logs and any additional text that helps to explain the failure.

With bmo's new markdown support, that additional text is getting parsed as markdown, which isn't always something sheriffs want (see bug 1519139).

It'd be nice if there was some way to opt out of parsing the full set of options markdown presents, leaving just the proportional fonts and nice paragraph breaks.

Dylan found http://www.template-toolkit.org/docs/manual/Filters.html#section_html_break_html_para_break

If that could be used for comments that begin with something like #[format(plain)], I'd be able to have Treeherder's bug form just prepend the comment field with that magic phrase, and everything would work nicely (or I could add a checkbox to the form to opt in/out of markdown rendering, and use that magic phrase if they don't want markdown.

Just put the comments in a fence:

\```

  [pasted text] 

\```

That'd do the same as adding new parsing instructions. Since you'd have to make a change to treeherder anyway, this would just be on one side.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX

Wes and I discussed this in #bteam.

Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Summary: Add an opt-out mechanism for having comments parsed with markdown → Add a mechanism for disabling all special markdown syntax

For the very limited use case of splinter / "edit attachment as comment", we've allowed the markdown flag to be off. We don't want to do that most of the time.

The use case Wes wants here is a "What you see is what you get" scenario -- the rendered text would still be in a proportional font, but it won't contain any markup (aside from being paragraph'd and line-break'd). This is a fine experience for the reader, and it can be undone with simple editing. This is better for the reader than the entire block being inside ```.

As an incentive to write comments without this, linkification will also not work in the mode.

Attached file GitHub Pull Request

This adds a syntax / directive #[markdown(off)] which:

  1. results in a proportional font comment
  2. allows the normal bug linking syntax (and links urls)
  3. doesn't use any markdown syntax at all.

It does break things into paragraphs and also inserts <br>'s, so it is quite similar to what markdown does in that case.

Assignee: nobody → dylan
See Also: → 1520221
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: