Posts with <code> or <pre> tags


Please login or register to vote for this query.

(click on this box to dismiss)

finds posts that currently contain <code> or <pre> in raw markdown ideally indenting or backticks should be used instead

Ask Ubuntu

Q&A for Ubuntu users and developers

With LatestBodyRevision (PostId, PostHistoryId) as (
Select p.Id, ph.Id as PostHistoryId
From Posts p
Inner Join PostHistory ph on ph.PostId = p.Id
Where ph.PostHistoryTypeId in (2,5,8) and
  not Exists (
    Select * from PostHistory phtwo
    Where phtwo.PostHistoryTypeId in (2,5,8) and phtwo.PostId = p.Id and phtwo.CreationDate > ph.CreationDate

SELECT lbr.PostId AS [Post Link]
From LatestBodyRevision lbr 
inner join PostHistory ph on lbr.PostHistoryId = ph.Id
inner join Posts p on lbr.PostId = p.Id
WHERE ph.Text LIKE '%<code>%' OR
      ph.Text LIKE '%<pre>%'

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results