[dreamwidth/dw-free] 77a0c4: Fix several failings in LJ::has_too_many
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: 77a0c4686d9ee3df7e6b4b290864831434566f49
https://github.com/dreamwidth/dw-free/commit/77a0c4686d9ee3df7e6b4b290864831434566f49
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-07-16 (Thu, 16 Jul 2020)
Changed paths:
M cgi-bin/LJ/TextUtil.pm
M t/textutil.t
Log Message:
-----------
Fix several failings in LJ::has_too_many
This function didn't know whether it wanted to deal with text or HTML, and it
also seemed to believe we were living in the promised XHTML STRICT paradise of
1999 where `
` tags always have the self-closing slash (pro-tip: no). So how
about this instead: it's for HTML, and true paragraphs count as two line breaks.
Commit: da9fecb0886769ea5c6771b48edf05fb52944f6f
https://github.com/dreamwidth/dw-free/commit/da9fecb0886769ea5c6771b48edf05fb52944f6f
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-07-16 (Thu, 16 Jul 2020)
Changed paths:
M cgi-bin/LJ/Event/JournalNewComment.pm
Log Message:
-----------
Stop re-converting comments to casual HTML in inbox notifications
For comments posted in Markdown or raw HTML (or with the old "don't autoformat"
checkbox), inbox notifications add bogus extra line breaks. That's because it's
getting the cleaned (format-aware) comment HTML, then going through AGAIN and
force-converting any remaining newlines to `
` tags. So let's don't.
Introduced in b2be8b8e4a (2011); looks like it was a workaround for
`LJ::has_too_many` being unreliable (or possibly it was just WIP dev detritus
that didn't get removed).
Compare: https://github.com/dreamwidth/dw-free/compare/d856b25d6a28...da9fecb08867
Home: https://github.com/dreamwidth/dw-free
Commit: 77a0c4686d9ee3df7e6b4b290864831434566f49
https://github.com/dreamwidth/dw-free/commit/77a0c4686d9ee3df7e6b4b290864831434566f49
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-07-16 (Thu, 16 Jul 2020)
Changed paths:
M cgi-bin/LJ/TextUtil.pm
M t/textutil.t
Log Message:
-----------
Fix several failings in LJ::has_too_many
This function didn't know whether it wanted to deal with text or HTML, and it
also seemed to believe we were living in the promised XHTML STRICT paradise of
1999 where `
` tags always have the self-closing slash (pro-tip: no). So how
about this instead: it's for HTML, and true paragraphs count as two line breaks.
Commit: da9fecb0886769ea5c6771b48edf05fb52944f6f
https://github.com/dreamwidth/dw-free/commit/da9fecb0886769ea5c6771b48edf05fb52944f6f
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2020-07-16 (Thu, 16 Jul 2020)
Changed paths:
M cgi-bin/LJ/Event/JournalNewComment.pm
Log Message:
-----------
Stop re-converting comments to casual HTML in inbox notifications
For comments posted in Markdown or raw HTML (or with the old "don't autoformat"
checkbox), inbox notifications add bogus extra line breaks. That's because it's
getting the cleaned (format-aware) comment HTML, then going through AGAIN and
force-converting any remaining newlines to `
` tags. So let's don't.
Introduced in b2be8b8e4a (2011); looks like it was a workaround for
`LJ::has_too_many` being unreliable (or possibly it was just WIP dev detritus
that didn't get removed).
Compare: https://github.com/dreamwidth/dw-free/compare/d856b25d6a28...da9fecb08867