aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile.gnu2
-rw-r--r--render.f9010
2 files changed, 9 insertions, 3 deletions
diff --git a/makefile.gnu b/makefile.gnu
index 6b4b4bd..4284588 100644
--- a/makefile.gnu
+++ b/makefile.gnu
@@ -138,7 +138,7 @@ $(DESTDIR)/bin/lr87: lr87
$(DESTDIR)/share/lr87/LICENSE.txt: LICENSE.txt
mkdir -p $(DESTDIR)/share/lr87
cp LICENSE.txt $(DESTDIR)/share/lr87
-$(DESTDIR)/share/lr87/LICENSE.txt: README.md
+$(DESTDIR)/share/lr87/README.md: README.md
mkdir -p $(DESTDIR)/share/lr87
cp README.md $(DESTDIR)/share/lr87
diff --git a/render.f90 b/render.f90
index 860e06a..387d897 100644
--- a/render.f90
+++ b/render.f90
@@ -301,7 +301,7 @@ contains
class(renderer)::r
character(*)::text
- integer::i_whitespace, d_length
+ integer::i_whitespace, d_length, i_start_display
character(len=:), allocatable::url, display
@@ -325,7 +325,13 @@ contains
else
d_length = len_trim(url) - i_whitespace + 1
allocate(character(len=d_length) :: display)
- display = adjustl(url(i_whitespace:len_trim(url)))
+
+ ! Adjustl doesn't handle tabs, so we need to do this manually...
+ i_start_display = i_whitespace
+ do while(any([" ", char(9)] == url(i_start_display:i_start_display)))
+ i_start_display = i_start_display + 1
+ end do
+ display = url(i_start_display:len_trim(url))
url = url(1:(i_whitespace-1))
end if