The HTML and Markdown choice drops the Markdown source view (#285)
Rendered Markdown is the one wanted beside the publisher's HTML. A browser that had chosen the source view shows the HTML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -422,13 +422,12 @@ function detailHtml(e: Entry){
|
||||
}
|
||||
|
||||
/// How an item whose feed sends Markdown beside its HTML is shown, kept from one item to the
|
||||
/// next (#285): the publisher's HTML, the Markdown made HTML, or the Markdown as written.
|
||||
const TEXT_VIEWS=[['html','HTML'],['markdown','Markdown'],['source','Markdown source']];
|
||||
/// next (#285): the publisher's HTML, or the Markdown made HTML.
|
||||
const TEXT_VIEWS=[['html','HTML'],['markdown','Markdown']];
|
||||
let textView=(()=>{ try{ return localStorage.getItem('ipx.textview'); }catch{ return null; } })()||'html';
|
||||
function textOf(e: Entry){
|
||||
// Both cleaned server-side with ammonia, as the description is.
|
||||
// Cleaned server-side with ammonia, as the description is.
|
||||
if(e.markdown&&textView==='markdown'&&e.markdown_html) return e.markdown_html;
|
||||
if(e.markdown&&textView==='source') return `<pre class="mdsrc">${esc(e.markdown)}</pre>`;
|
||||
return (e.description&&e.description.trim())||'<em>No show notes.</em>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user