Код: Выделить всё
if(str.indexOf("/n") > -1){Console.log("Found /n"); lB = "/n";}
if(str.indexOf("/r") > -1){Console.log("Found /r"); lB = "/r";}
if(str.indexOf("/r/r") > -1){Console.log("Found /r/r"); lB = "/r/r";}
if(str.indexOf("/n/n") > -1){Console.log("Found /n/n"); lB = "/n/n";}
if(str.indexOf("/r/n/r/n") > -1){Console.log("Found /r/n/r/n"); lB = "/r/n/r/n";}
if(str.includes("/u21B5")){Console.log("Found U+21B5"); lB = "/u21B5";}
if(str.includes("↵↵")){Console.log("Found ↵"); lB = "↵↵";}
parts = str.split("↵↵");
Пример вывода API (из консоли): «# Почему небо синее?
Код: Выделить всё
Desired result: parts[0] = "# Why Is the Sky Blue?"
parts[1] = "The sky appears blue..."
Подробнее здесь: https://stackoverflow.com/questions/797 ... api-output
Мобильная версия