Explorar o código

:bug: nissaya 在下面显示没有语法提示气泡

visuddhinanda@gmail.com %!s(int64=4) %!d(string=hai) anos
pai
achega
3f17845e61
Modificáronse 1 ficheiros con 9 adicións e 6 borrados
  1. 9 6
      public/app/term/note.js

+ 9 - 6
public/app/term/note.js

@@ -1261,7 +1261,6 @@ function render_one_sent_tran_a(iterator, diff = false) {
 //渲染nissaya单词
 function renderNissayaPreview(str){
     let html ='';
-    //html +="<div class='nissaya'>";
     const sent = str.split("\n");
     for (const iterator of sent) {
         const word =  iterator.split("=");
@@ -1292,7 +1291,6 @@ function renderNissayaPreview(str){
         }
         html += "\n";
     }
-    //html += "</div>";
     return html;
 }
 //缅文语尾高亮和提示气泡
@@ -1554,7 +1552,7 @@ function render_one_sent_tran(book, para, begin, end, iterator) {
 			"</span>";
 	} else {
 		//note_init处理句子链接
-		output += note_init(term_std_str_to_tran(iterator.text, iterator.channal, iterator.editor, iterator.lang));
+		output += note_init(iterator.text, iterator.channal, iterator.editor, iterator.lang);
 	}
 	output += "</div>";
 	//译文正文结束
@@ -1876,7 +1874,8 @@ function set_more_button_display() {
                                 if(channelType==='commentary'){
                                     note_refresh_new();
                                 }
-
+                                popup_init();
+                                guide_init();
 								//初始化文本编辑框消息处理
 								tran_sent_textarea_event_init();
 							}
@@ -2096,7 +2095,9 @@ function sent_save_callback(data) {
 					}
                     switch (thisChannel.type) {
                         case 'nissaya':
-                            divPreview.html(renderNissayaPreview(result.text));
+                            divPreview.html(
+                                "<div class='nissaya'>"+note_init(renderNissayaPreview(result.text), result.channal, result.editor, result.lang)+"</div>"
+                                );
                             break;
                         case 'commentary':
                             divPreview.html(
@@ -2106,12 +2107,14 @@ function sent_save_callback(data) {
                         break;
                         default:
                             divPreview.html(
-                                marked(term_std_str_to_tran(result.text, result.channal, result.editor, result.lang))
+                                note_init(result.text, result.channal, result.editor, result.lang)
                             );
                             term_updata_translation();                        
                             break;
                     }
 					popup_init();
+                    //初始化气泡
+                    guide_init();
 				}
 			}
 		} else if (result.commit_type == 3) {