|
@@ -197,7 +197,7 @@ namespace HTEXLib.Translator
|
|
|
textImg = testInfo.question.Replace(replace.oldstr, "");
|
|
|
|
|
|
}
|
|
|
- textImg = HtmlHelper.DoTextImg(textImg);
|
|
|
+ //textImg = HtmlHelper.DoTextImg(textImg);
|
|
|
testInfo.shaCode = ShaHashHelper.GetSHA1(textImg);
|
|
|
//处理解析
|
|
|
testInfo.explain = testInfo.explain.Replace(langConfig.Item.Start + langConfig.Item.Analysis + langConfig.Item.End, "");//.Replace(Start + EndedTag + End, "");
|
|
@@ -233,7 +233,7 @@ namespace HTEXLib.Translator
|
|
|
//doc.LoadHtml(optsHtml);
|
|
|
//optsHtml = doc.DocumentNode.InnerText;
|
|
|
//处理选项
|
|
|
- StringBuilder textImg = new StringBuilder();
|
|
|
+ StringBuilder textImg = new StringBuilder();
|
|
|
for (int i = 0; i < optionsKeys.Length - 1; i++)
|
|
|
{
|
|
|
string optRgex = optionsKeys[i] + "\\s*(\\.|\\.|\\、|\\:|\\:)([\\s\\S]*?)" + optionsKeys[i + 1] + "\\s*(\\.|\\.|\\、|\\:|\\:)";
|
|
@@ -246,7 +246,8 @@ namespace HTEXLib.Translator
|
|
|
{
|
|
|
optHtml = optHtml.Substring(2, optHtml.Length - 4);
|
|
|
optHtml = HtmlHelper.DoUselessTag(optHtml);
|
|
|
- textImg.Append(HtmlHelper.DoTextImg(optHtml));
|
|
|
+ //textImg.Append(HtmlHelper.DoTextImg(optHtml));
|
|
|
+ textImg.Append(optHtml);
|
|
|
testInfo.option.Add(new CodeValue { code = optionsKeys[i], value = optHtml });
|
|
|
//testInfo.option.Add(new Dictionary<string, string> { { "code", optionsKeys[i] },{ "value", optHtml } });
|
|
|
//testInfo.option.TryAdd(optionsKeys[i], optHtml);
|
|
@@ -271,7 +272,8 @@ namespace HTEXLib.Translator
|
|
|
// optHtml = optHtml.Substring(2, optHtml.Length - 6);
|
|
|
optHtml = optHtml.Substring(2).Replace(langConfig.Item.Start + langConfig.Item.Answer + langConfig.Item.End, "").Replace(langConfig.Item.Start + langConfig.Item.Analysis + langConfig.Item.End, "");
|
|
|
optHtml = HtmlHelper.DoUselessTag(optHtml);
|
|
|
- textImg.Append(HtmlHelper.DoTextImg(optHtml));
|
|
|
+ // textImg.Append(HtmlHelper.DoTextImg(optHtml));
|
|
|
+ textImg.Append(optHtml);
|
|
|
testInfo.option.Add(new CodeValue { code = optionsKeys[i], value = optHtml });
|
|
|
//testInfo.option.Add(new Dictionary<string, string> { { "code", optionsKeys[i] }, { "value", optHtml } });
|
|
|
//testInfo.option.TryAdd(optionsKeys[i], optHtml);
|
|
@@ -287,7 +289,8 @@ namespace HTEXLib.Translator
|
|
|
//TODO
|
|
|
}
|
|
|
testInfo.question = HtmlHelper.DoUselessTag(testInfo.question);
|
|
|
- textImg.Append(HtmlHelper.DoTextImg(testInfo.question));
|
|
|
+ //textImg.Append(HtmlHelper.DoTextImg(testInfo.question));
|
|
|
+ textImg.Append(testInfo.question);
|
|
|
testInfo.shaCode = ShaHashHelper.GetSHA1(textImg.ToString());
|
|
|
List<string> answers = testInfo.answer;
|
|
|
HashSet<string> ans = new HashSet<string>();
|
|
@@ -334,7 +337,8 @@ namespace HTEXLib.Translator
|
|
|
{
|
|
|
testInfo.question = testInfo.question.Replace(langConfig.Item.Start + langConfig.Item.Analysis + langConfig.Item.End, "").Replace(langConfig.Item.Start + langConfig.Item.Answer + langConfig.Item.End, "");
|
|
|
testInfo.question = HtmlHelper.DoUselessTag(testInfo.question);
|
|
|
- StringBuilder textImg = new StringBuilder(HtmlHelper.DoTextImg(testInfo.question));
|
|
|
+ //StringBuilder textImg = new StringBuilder(HtmlHelper.DoTextImg(testInfo.question));
|
|
|
+ StringBuilder textImg = new StringBuilder(testInfo.question);
|
|
|
testInfo.shaCode = ShaHashHelper.GetSHA1(textImg.ToString());
|
|
|
for (int i = 0; i < testInfo.answer.Count; i++)
|
|
|
{
|
|
@@ -386,7 +390,8 @@ namespace HTEXLib.Translator
|
|
|
exercise.question = HtmlHelper.DoUselessTag(ls/*.Replace(ComposeStart, "").Replace(ComposeEnd, "")*/);
|
|
|
//.Replace(ComposeTag, Start);
|
|
|
//获取综合题的材料加每个小题的sha1Code
|
|
|
- string testQs = HtmlHelper.DoTextImg(exercise.question);
|
|
|
+ // string testQs = HtmlHelper.DoTextImg(exercise.question);
|
|
|
+ string testQs = exercise.question;
|
|
|
List<DOCX.Models.ItemInfo> dtos = Translate(testinfo, langConfig);
|
|
|
if (dtos.IsNotEmpty())
|
|
|
{
|