Skip to content

Commit

Permalink
Fixed MamakaKaiao source parsing of page breaks
Browse files Browse the repository at this point in the history
jonthysell committed Jun 14, 2021
1 parent befde4f commit 718b4fc
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
## next ##

* Fixed PukuiElbert source parsing of page breaks
* Fixed MamakaKaiao source parsing of page breaks

## v0.11 ##

2 changes: 1 addition & 1 deletion src/HawDict/Input/MamakaKaiaoInputDict.cs
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ protected override string CleanSourceHtml(string s)

s = s
.Replace("spanclass", "span class")
.Replace("</td></tr></table><p>&nbsp;</p>\n<table style=\"margin-left:auto;margin-right:auto;width:700px;\"><tr><td>", "")
.Replace("</td></tr></table><p>&nbsp;</p>\n<table style=\"word-break:break-word;margin-left:auto;margin-right:auto;width:700px;\"><tr><td>", "")
.Replace("</p>\n\n\n \n\n\n <p align=\"Justify\">\n", " ")
.Replace("</p>\n\n\n \n\n\n <p align=\"justify\"><i>", " <i>")
.Replace("</i></span>", "</span>")
1 change: 0 additions & 1 deletion src/HawDict/Input/PlaceNamesInputDict.cs
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ protected override string CleanSourceHtml(string s)
{
s = Regex.Replace(s, "<table style=\"word-break:break-word;margin-left:auto;margin-right:auto;width:700px;\"><tr><td>\n<br><br><br><br><br>\n<div align=\"right\">GLOSSARY</div>.*<h1>AaAaAa</h1>", "<table style=\"word-break:break-word;margin-left:auto;margin-right:auto;width:700px;\"><tr><td>\n<h1>AaAaAa</h1>", RegexOptions.Singleline);


s = s.Replace("<span></p>Ke-au-kaha</span>", "<span>Ke-au-kaha</span>")
.Replace(" </td></tr></table><p>&nbsp;</p>\n<table style=\"word-break:break-word;margin-left:auto;margin-right:auto;width:700px;\"><tr><td>", " ")
.Replace("<span></p>Ke-kaulike", "<span>Ke-kaulike")

0 comments on commit 718b4fc

Please sign in to comment.