input: Your link code is &l4000&r. PM the bot on Discord (&l3XP3R1M3N2L B0T&r) containing just this &lcode&r as the &bmessage&r to link your accounts.
with character &
here are the outputs with different versions of the library (api & legacy serializer):
adventure 4.0.0-SNAPSHOT (wrong works properly)
TextComponentImpl{content="Your link code is ", children=[
TextComponentImpl{content="4000", children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}},
TextComponentImpl{content=". PM the bot on Discord (", children=[
TextComponentImpl{content="3XP3R1M3N2L B0T", children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}},
TextComponentImpl{content=") containing just this ", children=[
TextComponentImpl{content="code", children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}},
TextComponentImpl{content=" as the ", children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}},
TextComponentImpl{content="message", children=[], style=Style{color=aqua, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}},
TextComponentImpl{content=" to link your accounts.", children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}}
text 3.0.1-3.0.4 (also wrong)
TextComponentImpl{content=Your link code is , children=[
TextComponentImpl{content=4000, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=. PM the bot on Discord (, children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=) containing just this , children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content= as the , children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=message, children=[], style=Style{color=aqua, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content= to link your accounts., children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=3XP3R1M3N2L B0T, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=code, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}
text 3.0.0 (correct)
TextComponentImpl{content=Your link code is , children=[
TextComponentImpl{content=4000, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=. PM the bot on Discord (, children=[
TextComponentImpl{content=3XP3R1M3N2L B0T, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=) containing just this , children=[
TextComponentImpl{content=code, children=[], style=Style{color=null, obfuscated=null, bold=true, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content= as the , children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content=message, children=[], style=Style{color=aqua, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}},
TextComponentImpl{content= to link your accounts., children=[], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}
], style=Style{color=null, obfuscated=null, bold=null, strikethrough=null, underlined=null, italic=null, clickEvent=null, hoverEvent=null, insertion=null}}