about summary refs log tree commit diff stats
path: root/linkify
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-30 20:24:37 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-30 20:24:37 -0800
commit901ae474300d70bcc00e7e0b420ca87c8cbf6f55 (patch)
treeaf60b1c8c92bfc10a6bb6bd1082a765fcc718004 /linkify
parent0474ec865af12cff08dd255954fbccf6d38085e6 (diff)
downloadmu-901ae474300d70bcc00e7e0b420ca87c8cbf6f55.tar.gz
4899
Bug in my linkify tool introduced in commit 4891.
Diffstat (limited to 'linkify')
-rw-r--r--linkify/linkify.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/linkify/linkify.cc b/linkify/linkify.cc
index bb6eb772..b37c5296 100644
--- a/linkify/linkify.cc
+++ b/linkify/linkify.cc
@@ -131,7 +131,9 @@ void replace_tags_in_file(const string& filename, const map<string, syminfo>& in
       out << line.substr(0, skip_first_span);
       istringstream in2(line.substr(skip_first_span));
       in2 >> std::noskipws;
-      bool at_start_of_line = ends_with(filename, ".subx");
+      // only in .subx files, refuse to linkify the first word on a line
+      bool at_start_of_line = ends_with(filename, ".subx.html");
+//?       cerr << filename << ": " << at_start_of_line << '\n';
       while (has_data(in2)) {
         if (isspace(in2.peek())) {
 //?           cerr << "space\n";
@@ -229,7 +231,7 @@ void replace_tags_in_file(const string& filename, const map<string, syminfo>& in
               }
               else {
                 if (at_start_of_line) {
-//?                   cerr << "  at start of line\n";
+//?                   cerr << "  at start of line; refusing to linkify " << symbol << "\n";
                   out << symbol;
                 }
                 else {