Skip to content

Commit

Permalink
Fixed #2 by removing nbsp before rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jeaye committed Apr 20, 2014
1 parent 6019329 commit 1d840fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ generate: stdman
export reference=$(REFERENCE) &&\
export threads=$(THREADS) &&\
./do_generate
rm -f $(TMP_MAN)/*.html

install:
export echo_prefix=$(ECHO_PREFIX) &&\
Expand Down
1 change: 1 addition & 0 deletions src/html.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class html

/* Add some extra line breaks in these spans. */
str::replace(html, "<span>", "<span><br/>");
str::replace(html, "\u00a0", " "); /* NBSP sucks */

std::ofstream ofs{ state.tmp_file };
if(!ofs.is_open())
Expand Down
2 changes: 1 addition & 1 deletion src/str.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace str
for(size_t start_pos{}; (start_pos = str.find(from, start_pos)) != std::string::npos; )
{
str.replace(start_pos, from.length(), to);
start_pos += to.length(); /* In case 'to' contains 'from', like replacing 'x' with 'yx'. */
start_pos += to.length();
}
}

Expand Down

0 comments on commit 1d840fe

Please sign in to comment.