From 5670710facccfbb99068f9ee2c10e6d54441cb42 Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Tue, 14 Apr 2020 22:56:16 +0100 Subject: [PATCH] Made icon notation less trigger-happy --- Chapter 3/The Indexer.w | 4 ++-- Tangled/inweb.c | 8 ++++---- docs/inweb/3-ti.html | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Chapter 3/The Indexer.w b/Chapter 3/The Indexer.w index e84f5eb..ba02f25 100644 --- a/Chapter 3/The Indexer.w +++ b/Chapter 3/The Indexer.w @@ -648,10 +648,10 @@ navigation purposes. @ = match_results mr = Regexp::create_mr(); - if (Regexp::match(&mr, item_name, L"<(%c+)> *(%c*)")) { + if (Regexp::match(&mr, item_name, L"<(%i+.%i+)> *(%c*)")) { icon_text = Str::duplicate(mr.exp[0]); item_name = Str::duplicate(mr.exp[1]); - } else if (Regexp::match(&mr, item_name, L"(%c*?) *<(%c+)>")) { + } else if (Regexp::match(&mr, item_name, L"(%c*?) *<(%i+.%i+)>")) { icon_text = Str::duplicate(mr.exp[1]); item_name = Str::duplicate(mr.exp[0]); } diff --git a/Tangled/inweb.c b/Tangled/inweb.c index 1e0c856..00b7d51 100644 --- a/Tangled/inweb.c +++ b/Tangled/inweb.c @@ -17476,10 +17476,10 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { { #line 650 "inweb/Chapter 3/The Indexer.w" match_results mr = Regexp__create_mr(); - if (Regexp__match(&mr, item_name, L"<(%c+)> *(%c*)")) { + if (Regexp__match(&mr, item_name, L"<(%i+.%i+)> *(%c*)")) { icon_text = Str__duplicate(mr.exp[0]); item_name = Str__duplicate(mr.exp[1]); - } else if (Regexp__match(&mr, item_name, L"(%c*?) *<(%c+)>")) { + } else if (Regexp__match(&mr, item_name, L"(%c*?) *<(%i+.%i+)>")) { icon_text = Str__duplicate(mr.exp[1]); item_name = Str__duplicate(mr.exp[0]); } @@ -17575,10 +17575,10 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { { #line 650 "inweb/Chapter 3/The Indexer.w" match_results mr = Regexp__create_mr(); - if (Regexp__match(&mr, item_name, L"<(%c+)> *(%c*)")) { + if (Regexp__match(&mr, item_name, L"<(%i+.%i+)> *(%c*)")) { icon_text = Str__duplicate(mr.exp[0]); item_name = Str__duplicate(mr.exp[1]); - } else if (Regexp__match(&mr, item_name, L"(%c*?) *<(%c+)>")) { + } else if (Regexp__match(&mr, item_name, L"(%c*?) *<(%i+.%i+)>")) { icon_text = Str__duplicate(mr.exp[1]); item_name = Str__duplicate(mr.exp[0]); } diff --git a/docs/inweb/3-ti.html b/docs/inweb/3-ti.html index 2e46432..27f5f3e 100644 --- a/docs/inweb/3-ti.html +++ b/docs/inweb/3-ti.html @@ -1042,10 +1042,10 @@ navigation purposes.
         match_results mr = Regexp::create_mr();
-        if (Regexp::match(&mr, item_name, L"<(%c+)> *(%c*)")) {
+        if (Regexp::match(&mr, item_name, L"<(%i+.%i+)> *(%c*)")) {
             icon_text = Str::duplicate(mr.exp[0]);
             item_name = Str::duplicate(mr.exp[1]);
-        } else if (Regexp::match(&mr, item_name, L"(%c*?) *<(%c+)>")) {
+        } else if (Regexp::match(&mr, item_name, L"(%c*?) *<(%i+.%i+)>")) {
             icon_text = Str::duplicate(mr.exp[1]);
             item_name = Str::duplicate(mr.exp[0]);
         }