3

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

Output:

{
  "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*.

0

1 Answer 1

3

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.

7 Comments

@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 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 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 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.
@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.
|

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.