Skip to content

Commit

Permalink
#9 fixed typo in the special character definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Kota Mori committed Dec 4, 2017
1 parent c77f0c9 commit 2d1eed6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# - \cell ... end of each cell
"row", "cell"),
hexstr = c("x2022", "x2014", "x2003", "x2013", "x2002",
"x201C", "x000A", "xu2018", "x000Ax000A", "x000A",
"x201C", "x000A", "x2018", "x000Ax000A", "x000A",
"x2005", "x201D", "x2019", "x000Ax000A", "x0009",
"x000A", "x0009"),
str = c("\u2022", "\u2014", "\u2003", "\u2013", "\u2002",
Expand Down
3 changes: 3 additions & 0 deletions src/dechex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ IntegerVector hex_to_int(std::string h, char sep)
//
// returns:
// integer vector
//
// error if:
// h contains a letter other than 0-9, a-f, A-F, and sep

h += sep; // make sure the last hex is read

Expand Down
2 changes: 2 additions & 0 deletions src/strip_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ List strip_helper(CharacterMatrix match_mat,
if (curhex.size() > 0 && (hex == "" || curhex.size() == 4)) {
// make sure the length is 4
while (curhex.size() < 4) curhex = '0' + curhex;
//Rcout << curhex << "\n";
append_out(doc, 'x' + curhex, true, intable);
curhex = "";
}
Expand Down Expand Up @@ -249,6 +250,7 @@ List strip_helper(CharacterMatrix match_mat,
} else if (ignorable) {
continue;
} else if (specialchars.haskey(word)) {
//Rcout << specialchars.getvalue(word) << "\n";
append_out(doc, specialchars.getvalue(word), false, intable);
if (word == "row") {
intable = false;
Expand Down

0 comments on commit 2d1eed6

Please sign in to comment.