elements and dispense with the fragile regex parsing.Preventing line breaks in elements
11–20 of 23 posts
Re: Preventing line breaks in <code> elements
#12You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
Re: Preventing line breaks in <code> elements
#13You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
Some commenters are missing that this is a reference to https://stackoverflow.com/a/1732454 .
Re: Preventing line breaks in <code> elements
#14Re: Preventing line breaks in <code> elements
#15Re: Preventing line breaks in <code> elements
#16You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
Some commenters are missing that this is a reference to https://stackoverflow.com/a/1732454 .
And also
> Nov, 2020
And then, StackOverflow asks itself why it looses users.
Re: Preventing line breaks in <code> elements
#17Earlier quoted context omitted.
Some commenters are missing that this is a reference to https://stackoverflow.com/a/1732454 .
> Locked. There are disputes about this answer’s content being resolved at this time [sic] And also > Nov, 2020 And then, StackOverflow asks itself why it looses users.
Re: Preventing line breaks in <code> elements
#18You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
You can absolutely parse HTML with regex, so long as the document is finite in length. Every finite language is regular, hence can be parsed with regex's.
> You can absolutely parse HTML with regex, so long as the document is finite in length
This isn't sufficient, unless I'm misinterpreting what you're saying. It's not enough to have documents of finite length (all documents are finite in length), you need documents with a max length, so you have a finite number of possible documents to parse.
Re: Preventing line breaks in <code> elements
#19Earlier quoted context omitted.
Some commenters are missing that this is a reference to https://stackoverflow.com/a/1732454 .
> Locked. There are disputes about this answer’s content being resolved at this time [sic] And also > Nov, 2020 And then, StackOverflow asks itself why it looses users.
Re: Preventing line breaks in <code> elements
#20You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML.
You can absolutely parse HTML with regex, so long as the document is finite in length. Every finite language is regular, hence can be parsed with regex's.