我有这个HTML:
<p id="element">Waiting for Message</p>
Run Code Online (Sandbox Code Playgroud)
来自服务器的这个字符串使用JSON.stringify(),其中包含中断和制表符,即
var = "Heading (info:info) \n info: \n \t and so on "; // The actual string is more complex though, just an example
Run Code Online (Sandbox Code Playgroud)
而这个Jquery将字符串发布到段落标记:
$("#element").text(data); // data is the string from the server(not in JSON!)
Run Code Online (Sandbox Code Playgroud)
问题是HTML忽略了格式,但是当我使用警告框时,它会显示正确的格式.我正在动态更新元素,因为数据来自服务器.有什么指针吗?
我有一些本地提交,并且对主人进行了更改.所以我做了一个:
git pull // it automatically merged and had a conflict with one file only.
subl <file> // Made the wrong fix and saved it
git commit // It opened nano and I Typed "fixed merge" saved it
git push master origin
Run Code Online (Sandbox Code Playgroud)
如何在拉动之前返回并重做合并并推送?特别是在合并之前回到右边.