aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/register.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-02-09 13:24:29 +0100
committerClifford Wolf <clifford@clifford.at>2015-02-09 13:24:29 +0100
commita779a09771f7373b8d1e77d7a9182fd3ed9008e5 (patch)
treebcd5a4835ed0c8d783296a3277b74bbba345d961 /kernel/register.cc
parente0ff4d1152bf517f51b7b2a5042a150a17ad0f21 (diff)
downloadyosys-a779a09771f7373b8d1e77d7a9182fd3ed9008e5.tar.gz
yosys-a779a09771f7373b8d1e77d7a9182fd3ed9008e5.tar.bz2
yosys-a779a09771f7373b8d1e77d7a9182fd3ed9008e5.zip
Fixed creation of command reference in manual
Diffstat (limited to 'kernel/register.cc')
-rw-r--r--kernel/register.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/register.cc b/kernel/register.cc
index 56dc695aa..cdba4c36f 100644
--- a/kernel/register.cc
+++ b/kernel/register.cc
@@ -545,11 +545,10 @@ struct HelpPass : public Pass {
}
void escape_tex(std::string &tex)
{
- size_t pos = 0;
- while ((pos = tex.find('_', pos)) != std::string::npos) {
+ for (size_t pos = 0; (pos = tex.find('_', pos)) != std::string::npos; pos += 2)
tex.replace(pos, 1, "\\_");
- pos += 2;
- }
+ for (size_t pos = 0; (pos = tex.find('$', pos)) != std::string::npos; pos += 2)
+ tex.replace(pos, 1, "\\$");
}
void write_tex(FILE *f, std::string cmd, std::string title, std::string text)
{