git: 22d9c0d697 - main - Fix link references in single book

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=22d9c0d697157330d9d6298eaf0ee27659fe30d0

commit 22d9c0d697157330d9d6298eaf0ee27659fe30d0
Author:     Sergio Carlavilla Delgado <[email protected]>
AuthorDate: 2022-12-07 18:22:10 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
CommitDate: 2022-12-07 18:22:10 +0000

    Fix link references in single book
    
    PR:             262661
    Submitted by:   grahamperrin@
---
 shared/lib/InterDocumentReferencesMacro/extension.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/shared/lib/InterDocumentReferencesMacro/extension.rb b/shared/lib/InterDocumentReferencesMacro/extension.rb
index 76e63f4a89..455f63c002 100644
--- a/shared/lib/InterDocumentReferencesMacro/extension.rb
+++ b/shared/lib/InterDocumentReferencesMacro/extension.rb
@@ -15,14 +15,14 @@ class InterDocumentReferencesMacro < Asciidoctor::Extensions::InlineMacroProcess
 
     doc = parent.document
 
-    if doc.attributes['book'] == 'True'
-      if doc.attributes['isonline'] == 1
+    if doc.attributes['book'] == "true"
+      if doc.attributes['isonline'] == "1"
         (create_anchor parent, text, type: :link, target: %(./##{anchor})).render
       else
         (create_anchor parent, text, type: :link, target: %(./index.html##{anchor})).render
       end
     else
-      if doc.attributes['isonline'] == 1
+      if doc.attributes['isonline'] == "1"
         (create_anchor parent, text, type: :link, target: %(../#{destination}/##{anchor})).render
       else
         (create_anchor parent, text, type: :link, target: %(../#{destination}/index.html##{anchor})).render
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.