From 8de10aa414b9cce25003beb333f2a8b1bb858098 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Sun, 10 May 2020 12:28:02 -0400 Subject: Fixed adjust link descriptions that contains tabs. Fixed minor makefile mixup. --- makefile.gnu | 2 +- render.f90 | 10 ++++++++-- 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 -- cgit v1.2.3