mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-02-03 04:27:02 +00:00
Comments: Add support for new format (#4576)
The new comment format is similar to the description's commandRuns. This should fix the issues with most comments but there are still some more changes that would need to be made like adding support for formatting (bold, italic, underline) and channel emojis. Fixes issue 4566
This commit is contained in:
@@ -7,7 +7,19 @@ private def copy_string(str : String::Builder, iter : Iterator, count : Int) : I
|
||||
cp = iter.next
|
||||
break if cp.is_a?(Iterator::Stop)
|
||||
|
||||
str << cp.chr
|
||||
if cp == 0x26 # Ampersand (&)
|
||||
str << "&"
|
||||
elsif cp == 0x27 # Single quote (')
|
||||
str << "'"
|
||||
elsif cp == 0x22 # Double quote (")
|
||||
str << """
|
||||
elsif cp == 0x3C # Less-than (<)
|
||||
str << "<"
|
||||
elsif cp == 0x3E # Greater than (>)
|
||||
str << ">"
|
||||
else
|
||||
str << cp.chr
|
||||
end
|
||||
|
||||
# A codepoint from the SMP counts twice
|
||||
copied += 1 if cp > 0xFFFF
|
||||
|
||||
Reference in New Issue
Block a user