Skip to content

Commit

Permalink
combine markdown code and markdown slice name
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo committed Jun 8, 2018
1 parent 4d13dae commit f4428c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions superset/assets/src/dashboard/util/dashboardLayoutConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ function getChartHolder(item) {
Math.round(size_y / GRID_RATIO * 100 / ROW_HEIGHT),
);
if (code !== undefined) {
let markdownContent = '';
if (slice_name) {
markdownContent = `##### **${slice_name}**\n`;
}
let markdownContent = ' '; // white-space markdown
if (code) {
markdownContent += code;
markdownContent = code;
} else if (slice_name.trim()) {
markdownContent = `##### **${slice_name}**\n`;
}

return {
type: MARKDOWN_TYPE,
id: `DASHBOARD_MARKDOWN_TYPE-${generateId()}`,
Expand Down

0 comments on commit f4428c3

Please sign in to comment.