Opened 4 years ago
Closed 4 years ago
#5308 closed defect (bug) (fixed)
Correct formatting for code blocks imported from GitHub PRs
Reported by: | SergeyBiryukov | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Trac | Keywords: | |
Cc: |
Description
Background: #4903
As seen in https://core.trac.wordpress.org/ticket/43941#comment:71, the formatting of code blocks looks broken:
Take the following example
`
register_meta('post', 'my_meta', [
'object_subtype' => 'post',
'single' => false,
'show_in_rest' => [
...
],
'type' => 'array',
'default' => array(233),
]);
`
The GitHub syntax:
``` ```
should be converted to the syntax that Trac recognizes:
{{{ }}}
Change History (4)
#2
follow-up:
↓ 3
@
4 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Looks like [10031] didn't work as expected for some reason:
https://core.trac.wordpress.org/ticket/50669#comment:5
https://github.com/WordPress/wordpress-develop/pull/407#issuecomment-658788769
Could we also convert links from the GitHub syntax:
([`add_editor_style()`](https://github.com/WordPress/wordpress-develop/blob/b00172339467889b736cf0a8d0a7bc5a502b1158/src/wp-includes/theme.php#L2037)
to Trac syntax?
[https://github.com/WordPress/wordpress-develop/blob/b00172339467889b736cf0a8d0a7bc5a502b1158/src/wp-includes/theme.php#L2037 `add_editor_style()`]
#3
in reply to:
↑ 2
@
4 years ago
Replying to SergeyBiryukov:
Looks like [10031] didn't work as expected for some reason:
I suspect there might be two different codepaths in play, and one isn't calling the syntax translate function.
Could we also convert links from the GitHub syntax:
I saw a bunch of these this morning and was going to add that today, I think images are another one.
In 10031: