In users/{id}/timeline, the detail field for comment events is formatted with Markdown and not HTML. Is it normal?

I saw in the question Comments are returning markdown that the API should return HTML comments and I wonder if it's always the case.

Here's a sample request: http://api.stackoverflow.com/1.1/users/22656/timeline


  "total": 35457,
  "page": 1,
  "pagesize": 30,
  "user_timelines": [
      "user_id": 22656,
      "timeline_type": "comment",
      "post_id": 5057438,
      "post_type": "answer",
      "comment_id": 5663582,
      "action": "comment",
      "creation_date": 1298217147,
      "description": "[java] insertion sort - syntax question",
      "detail": "@aioobe: I've undone the downvote, but I think it's clearer to talk about what the *general* translation is... it's not like the compiler is *actually* going to put the decrement after the assignment."

The detail property contains text like *general* or *actually*.


1 Answer 1


It is something of a historical accident that this method returns markdown, however it has become too dangerous to change it.

Consider it for 1.0 and 1.1.

  • @Kevin you seriously expect apps to convert the markdown in HTML, in order to display it in a user friendly way. I'd love to know how the backend of the API works; if changing this is considered dangerous, it seems the API is held together with bits of tape, and a few kicks.
    – Jonathan.
    Commented Feb 20, 2011 at 20:46
  • @Jonathan I don't know but if this is an old bug, fixing it may break existing apps that have worked around it. This is far from perfect, but I'll find a workaround too.
    – Jilouc
    Commented Feb 20, 2011 at 21:16
  • @Jilouc considering this seems to be the only route which returns markdown over HTML, and previously it was said this was a bug that has been fixed, it's pretty safe to assume that apps have not gone to the trouble of implementing markdown->HTML for this one occasion?
    – Jonathan.
    Commented Feb 20, 2011 at 21:26
  • @Jonathan That was just a guess. I don't know how the API works internally so when Kevin says it's dangerous to fix it for the moment, I believe him. I'm going to use comments/{id} with vectorized comment ids to get the HTML version of timeline comments.
    – Jilouc
    Commented Feb 20, 2011 at 21:46
  • @Jonathan - this is not a comment (comments are returned by /comments, /questions?comments=true, and so on), it is referring to a comment. The referred to bug did, originally, return html and when it switched to markdown that was a bug. This method has always returned markdown. Commented Feb 20, 2011 at 21:46
  • @Jilouc - the simplest workaround is to query /comments/{id} for the html equivalent, and is the only one I've seen in practice. Pulling in a markdown renderer (even our OSS one) is probably overkill. Commented Feb 20, 2011 at 21:47
  • @Kevin, but why have one route return markdown and the others HTML, that's inconsistant, and you've just said that using markdown renderer is overkill, and that another request should be made, something that has been previously said should be kept to a minimum.
    – Jonathan.
    Commented Feb 20, 2011 at 22:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .