Skip to content

Commit

Permalink
LingvoDSL: Use &omegat-org#91; &omegat-org#93; instead of [ &r…
Browse files Browse the repository at this point in the history
…brack;

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Sep 25, 2021
1 parent 67f1ad7 commit e1b5468
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/org/omegat/core/dictionaries/LingvoDSL.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ static String replaceTag(final String line) {

static {
List<RE> reList = new ArrayList<>();
reList.add(new RE("\\[\\[(.+?)\\]\\]", "&lbrack;$1&rbrack;"));
reList.add(new RE("\\\\\\[", "&lbrack;"));
reList.add(new RE("\\\\\\]", "&rbrack;"));
reList.add(new RE("\\[\\[(.+?)\\]\\]", "&#91;$1&#93;"));
reList.add(new RE("\\\\\\[", "&#91;"));
reList.add(new RE("\\\\\\]", "&#93;"));
reList.add(new RE("\\[b\\](.+?)\\[/b\\]", "<strong>$1</strong>"));
reList.add(new RE("\\[i\\](.+?)\\[/i\\]", "<span style='font-style: italic'>$1</span>"));
reList.add(new RE("\\[trn\\](.+?)\\[/trn\\]", "$1"));
Expand Down
4 changes: 2 additions & 2 deletions test/src/org/omegat/core/dictionaries/LingvoDSLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testReadArticleChinese() throws Exception {
List<DictionaryEntry> result = dict.readArticles(word);
assertFalse(result.isEmpty());
assertEquals(word, result.get(0).getWord());
assertEquals("&lbrack;y\u012B ge y\u00E0ng&rbrack;&nbsp;\nsame as \u4E00\u6A23|\u4E00\u6837 y\u012B y\u00E0ng&nbsp;, the same\n", result.get(0).getArticle());
assertEquals("&#91;y\u012B ge y\u00E0ng&#93;&nbsp;\nsame as \u4E00\u6A23|\u4E00\u6837 y\u012B y\u00E0ng&nbsp;, the same\n", result.get(0).getArticle());
}

@Test
Expand Down Expand Up @@ -122,7 +122,7 @@ public void testReadArticleIndentStyles() throws Exception {
"<p style=\"text-indent: 60px\">to abandon attempts</p>\n" +
"<p style=\"text-indent: 60px\">to abandon a claim</p>\n" +
"<p style=\"text-indent: 60px\">to abandon convertibility</p>\n" +
"<p style=\"text-indent: 60px\">to abandon the &lbrack;gold&rbrack; standard</p>\n" +
"<p style=\"text-indent: 60px\">to abandon the &#91;gold&#93; standard</p>\n" +
"<p style=\"text-indent: 60px\">to abandon price control</p>\n" +
"<p style=\"text-indent: 60px\">to abandon a right</p>\n",
result.get(0).getArticle());
Expand Down

0 comments on commit e1b5468

Please sign in to comment.