Just remember you need extra indentation for the numbered list.
Your example, quoted and corrected:
Whilst posting an answer on SO, I noticed that code sample formatting
did not work correctly when posting snippets of code in numbered or
order lists. For example:
Point one
public class TwitterConnection {
private string _consumerKey = ConfigurationManager.AppSettings.Get("consumerKey");
private string _consumerSecret = ConfigurationManager.AppSettings.Get("consumerSecret");
private string _accessKey = ConfigurationManager.AppSettings.Get("accessToken");
private string _accessToken = ConfigurationManager.AppSettings.Get("accessTokenSecret");
private IHubContext _context = GlobalHost.ConnectionManager.GetHubContext<TwitterHub>();
public TwitterConnection()
{
// Access the filtered stream
var filteredStream = Stream.CreateFilteredStream();
filteredStream.MatchingTweetReceived += (sender, args) =>
{
_context.Clients.All.broadcast(args.Tweet.Text);
};
filteredStream.StartStreamMatchingAllConditions();
}
}
- Point two
As you can see, the code sample feature does not work when included in
a list. Does anyone know of any way around this? Or am I just being
stupid?
Feel free to edit, to try and replicate the bug
The source:
Whilst posting an answer on SO, I noticed that code sample formatting did not work correctly when posting snippets of code in numbered or order lists. For example:
1. Point one
public class TwitterConnection {
private string _consumerKey = ConfigurationManager.AppSettings.Get("consumerKey");
private string _consumerSecret = ConfigurationManager.AppSettings.Get("consumerSecret");
private string _accessKey = ConfigurationManager.AppSettings.Get("accessToken");
private string _accessToken = ConfigurationManager.AppSettings.Get("accessTokenSecret");
private IHubContext _context = GlobalHost.ConnectionManager.GetHubContext<TwitterHub>();
public TwitterConnection()
{
// Access the filtered stream
var filteredStream = Stream.CreateFilteredStream();
filteredStream.MatchingTweetReceived += (sender, args) =>
{
_context.Clients.All.broadcast(args.Tweet.Text);
};
filteredStream.StartStreamMatchingAllConditions();
}
}
<!-- -->
2. Point two
As you can see, the code sample feature does not work when included in a list. Does anyone know of any way around this? Or am I just being stupid?
Feel free to edit, to try and replicate the bug
As an aside, the indentation seems funky.