mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Merge pull request #926 from mikeller/add_markup
Added markdown processing for GitHub release notes.
This commit is contained in:
commit
e14f75015a
4 changed files with 13 additions and 2 deletions
|
@ -260,8 +260,12 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
$('div.release_info .status').text(summary.status);
|
||||
$('div.release_info .file').text(summary.file).prop('href', summary.url);
|
||||
|
||||
var formattedNotes = summary.notes.trim('\r').replace(/\r/g, '<br />');
|
||||
var formattedNotes = summary.notes.replace(/#(\d+)/g, '[#$1](https://github.com/betaflight/betaflight/pull/$1)');
|
||||
formattedNotes = marked(formattedNotes);
|
||||
$('div.release_info .notes').html(formattedNotes);
|
||||
$('div.release_info .notes').find('a').each(function() {
|
||||
$(this).attr('target', '_blank');
|
||||
});
|
||||
|
||||
$('div.release_info').slideDown();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue