@admins and @wendell There's a formatting issue with Posts using numbered lists and code tags
Creating a numbered list with source code formatted tags inbetween each item causes the numbering to restart at 1.
What I input:
1. String
```bash
script here
```
2. String
What happens:
String
script here
String
What I expect
String script here (done using single ` tags)
String
Other odd behaviour
Putting script tags inside script with another script block after normal content causes the first script block to not be closed and run across the content in the middle.
sudo rm -rf /
```funkylanguage
do more stuff
```
```
This Line not in script tags <- Script tags go right over this which is not inside the script tags.
```script
Other script code
I think that's because <pre> tags come before code blocks during markup usually. Issue with discourse, I don't think L1 can do anything about this. You'd be better off filing a bug report on the discourse github.
Yeah I gave It another test and It basically comes down to how browsers handle HTML and how Discourse converts it's own markup tags to HTML, as well as how it sanitizes input I guess.
Here's an example of how regular HTML behaves in a browser using HTML 'pre' tags.
Ok so looking at the code that discourse generated It's clearly an issue with escaping nested tags as part of the input sanitization process. It's just not done correctly since it simply terminates on the next closing tag instead of the last aligned tag.
As for the
```
tags with numbers.
This is what happens:
It replaces them with pre tags in the output but places them inbetween the ordered list rather than inside the ordered list as list items. Which is actually possible to do with HTML: