Feature: Markdown-Tabellen in Lagebildern
Analyzer-Prompts erlauben jetzt Tabellen wenn Daten sich strukturiert vergleichen lassen (Produkte, Modelle, Kennzahlen etc.). Frontend parst Markdown-Tabellensyntax und rendert sie als HTML-Tabellen mit passendem Styling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -702,6 +702,23 @@ const UI = {
|
||||
html = html.replace(/<\/ul>(<br>)+/g, '</ul>');
|
||||
html = html.replace(/(<br>){2,}/g, '<br>');
|
||||
|
||||
// Markdown-Tabellen rendern
|
||||
html = html.replace(/(?:^|<br>)((?:\|.+\|(?:<br>|$))+)/g, function(match, tableBlock) {
|
||||
var rows = tableBlock.split('<br>').filter(function(r) { return r.trim().length > 0; });
|
||||
if (rows.length < 2) return match;
|
||||
var isSep = function(r) { return /^\|[\s\-:|]+\|$/.test(r.trim()); };
|
||||
if (!isSep(rows[1])) return match;
|
||||
var parseRow = function(r) { return r.split('|').slice(1, -1).map(function(c) { return c.trim(); }); };
|
||||
var headerCells = parseRow(rows[0]);
|
||||
var thead = '<thead><tr>' + headerCells.map(function(c) { return '<th>' + c + '</th>'; }).join('') + '</tr></thead>';
|
||||
var tbody = '<tbody>' + rows.slice(2).map(function(r) {
|
||||
if (isSep(r)) return '';
|
||||
var cells = parseRow(r);
|
||||
return '<tr>' + cells.map(function(c) { return '<td>' + c + '</td>'; }).join('') + '</tr>';
|
||||
}).join('') + '</tbody>';
|
||||
return '<div class="summary-table-wrap"><table class="summary-table">' + thead + tbody + '</table></div>';
|
||||
});
|
||||
|
||||
// Inline-Zitate [1], [2], [1383a] etc. als klickbare Links rendern
|
||||
if (sources.length > 0) {
|
||||
html = html.replace(/\[(\d+[a-z]?)\]/g, (match, num) => {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren