[EMBEDDING CODE]
# testing
j
Let's try to embed code as well
Copy code
<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>
e
We don't allow user written html, but you can use markdown if you want to include some basic styling.
j
Thanks Emil, but I'm talking about something else,
meaning what if I want to embed code samples
eg if a community is about HTML code snippets
e
You can use three backticks for code blocks, e.g.
Copy code
<div>foo</div>
j
<div>foo</div>
Got it, thank you. An idea could be to auto-recognise code pasting and treat it appropriately, as using backticks would not sound like something the average user would imagine
e
I like the idea :) making it super robust would be tricky for sure, but I guess we could add it easily at least for html like templates (we have something similar for JSON already).
Let me try to spin up a PR real quick.
j
just anoter test <div data-view-component="true" class="TimelineItem-body"> <a class="d-inline-block" data-test-selector="pr-timeline-events-actor-avatar" data-hovercard-type="user" data-hovercard-url="/users/emilos/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/emilos"><img class="avatar avatar-user" src="https://avatars.githubusercontent.com/u/2088208?s=40&amp;u=32533e7a3f3da2c6439829b1a408c2f6995dc137&amp;v=4" width="20" height="20" alt="@emilos"></a> <a class="author Link--primary text-bold" data-test-selector="pr-timeline-events-actor-profile-link" data-hovercard-type="user" data-hovercard-url="/users/emilos/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/emilos">emilos</a> deleted the <span class="commit-ref user-select-contain width-fit"> <span data-view-component="true" class="css-truncate css-truncate-target width-fit"> html-auto-recognise </span> </span> branch <a href="#event-8741885280" data-view-component="true" class="css-truncate css-truncate-target Link--secondary"> <relative-time tense="past" datetime="2023-03-14T11:37:51+01:00" data-view-component="true" title="Mar 14, 2023, 11:37 AM GMT+1">March 14, 2023 11:37</relative-time> </a> </div>
strange how this code based last message does not delete upon trying to.
e
not supporting more complicated cases yet :) I'll look into the deletion
136 Views