Firepup650
(Firepup Sixfifty)
5 Diciembre, 2024 05:40
1
No estoy seguro de qué causa esto, pero actualmente se puede reproducir en Announcing: AI Web Artifacts
Normal:
Encogido:
3 Me gusta
sam
(Sam Saffron)
5 Diciembre, 2024 07:13
2
hmmm esto es realmente confuso. @awesomerobot ¿alguna idea?
Parece que el fragmento incluye HTML innecesario. La etiqueta <style> sobrescribe el estilo de la página.
1 me gusta
Definitivamente hay algún CSS defectuoso en alguna parte… display: flex se añade al body… y parece que hay algo de HTML del enlace compartido que está llegando ahí?
Parece venir de
def onebox
<<~HTML
<div>
<aside class="onebox allowlistedgeneric" data-onebox-src="#{url}">
<header class="source">
<span class="onebox-ai-llm-title">#{I18n.t("discourse_ai.share_ai.onebox_title", llm_name: llm_name)}</span>
<a href="#{url}" target="_blank" rel="nofollow ugc noopener" tabindex="-1">#{Discourse.base_uri}</a>
</header>
<article class="onebox-body">
<h3><a href="#{url}" rel="nofollow ugc noopener" tabindex="-1">#{title}</a></h3>
#{html_excerpt}
</article>
<div style="clear: both"></div>
</aside>
</div>
HTML
end
esto se añade en línea:
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-...\u003c/p\u003e\u003cp\u003e...\u003c/p\u003e\u003ca href='/discourse-ai/ai-bot/shared-ai-conversations/xrWufuvPZJFxlUvYW2cHSQ'\u003eRead full transcript\u003ca\u003e
u003c/article\u003e
u003cdiv style=\"clear: both\"\u003e\u003c/div\u003e
u003c/aside\u003e
u003c/div\u003e
¿problema con html_excerpt?
¿un enlace sin cerrar está causando problemas?
strip_links: true,
strip_details: true,
)
html << "<p><b>#{post.user.username}</b>: #{text}</p>"
if html.length > 1000
html << "<p>...</p>"
break
end
end
html << "<a href='#{url}'>#{I18n.t("discourse_ai.share_ai.read_more")}<a>"
html
end
def onebox
<<~HTML
<div>
<aside class="onebox allowlistedgeneric" data-onebox-src="#{url}">
<header class="source">
<span class="onebox-ai-llm-title">#{I18n.t("discourse_ai.share_ai.onebox_title", llm_name: llm_name)}</span>
<a href="#{url}" target="_blank" rel="nofollow ugc noopener" tabindex="-1">#{Discourse.base_uri}</a>
veamos:
main ← fix-close-link
opened 08:02PM - 05 Dec 24 UTC
This link should be closed
`html << "<a href='#{url}'>#{I18n.t("discourse_ai.… share_ai.read_more")}<a>"`
3 Me gusta