mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Get rid of shadowing even if the shadowing there is probably the safer solution
This commit is contained in:
parent
60b1a595e1
commit
47e3257963
1 changed files with 5 additions and 3 deletions
|
@ -718,15 +718,17 @@ process_spoilers(cmark_node *node)
|
|||
continue;
|
||||
|
||||
std::string_view next_content = cmark_node_get_literal(next);
|
||||
if (auto posEnd = next_content.find("||"); posEnd != std::string_view::npos) {
|
||||
if (auto posEndNext = next_content.find("||");
|
||||
posEndNext != std::string_view::npos) {
|
||||
// We found the end of the spoiler
|
||||
std::string before_spoiler = std::string(content.substr(0, posStart));
|
||||
std::string after_spoiler = std::string(next_content.substr(posEnd + 2));
|
||||
std::string after_spoiler =
|
||||
std::string(next_content.substr(posEndNext + 2));
|
||||
|
||||
std::string inside_spoiler_start =
|
||||
std::string(content.substr(posStart + 2));
|
||||
std::string inside_spoiler_end =
|
||||
std::string(next_content.substr(0, posEnd));
|
||||
std::string(next_content.substr(0, posEndNext));
|
||||
|
||||
std::string spoiler_text = extract_spoiler_warning(inside_spoiler_start);
|
||||
|
||||
|
|
Loading…
Reference in a new issue