metanorma / metanorma-iso

Metanorma processor for ISO standards
BSD 2-Clause "Simplified" License
14 stars 5 forks source link

Broken hyperlinks since metanorma-iso 2.1.6 (2.1.5 worked fine) #759

Closed Intelligent2013 closed 2 years ago

Intelligent2013 commented 2 years ago

Source document: https://github.com/CalConnect/iso-8601-1-amd1

The command: bundle exec metanorma -t iso -x presentation iso-8601-1-amd.adoc

Resulted presentation xml:

<p id="_">The procedures used to develop this document and those intended for its further
maintenance are described in the ISO/IEC Directives, Part 1. In particular, the
different approval criteria needed for the different types of ISO documents
should be noted. This document was drafted in accordance with the editorial
rules of the ISO/IEC Directives, Part 2 (see
http<span class="//www.iso.org/directives">www.iso.org/directives</span>).</p>

Rendered PDF: image

Expected PDF: image

The problem: the wrong tag http<span class="//www.iso.org/directives">www.iso.org/directives</span> is using instead of: <link target="https://www.iso.org/directives">www.iso.org/directives</link>

ronaldtse commented 2 years ago

In my computer it renders correctly:

Screen Shot 2022-08-14 at 3 09 53 PM

The encoding is correct:

The procedures used to develop this document and those intended for its further
maintenance are described in the ISO/IEC Directives, Part 1. In particular, the
different approval criteria needed for the different types of ISO documents
should be noted. This document was drafted in accordance with the editorial
rules of the ISO/IEC Directives, Part 2 (see
https://www.iso.org/directives[www.iso.org/directives]).

Not sure why it appears as such?

Intelligent2013 commented 2 years ago

What I did:

ronaldtse commented 2 years ago

OH MY. I was using metanorma-standoc 2.1.5. After bundle update, I have the same broken results as you do:

Fetching gem metadata from https://rubygems.org/..............
Resolving dependencies...
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using minitest 5.16.2
Using public_suffix 4.0.7
Using faraday-em_http 1.0.0
Using faraday-em_synchrony 1.0.0
Using faraday-rack 1.0.0
Using faraday-excon 1.1.0
Using ruby2_keywords 0.0.5
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using amazing_print 1.4.0
Using multipart-post 2.2.3
Using faraday-retry 1.0.3
Using asciimath 2.0.4
Using faraday-net_http 1.0.1
Using multi_json 1.15.0
Using racc 1.6.0
Using rsec 1.0.0
Using builder 3.2.4
Using bundler 2.3.7
Using camertron-eprun 1.1.1
Using cldr-plurals-runtime-rb 1.1.0
Using htmlentities 4.3.4
Using cnccs 0.1.6
Using cabin 0.9.0
Using date 3.2.2
Using latex-decode 0.4.0 (was 0.3.2)
Using descriptive_statistics 2.5.1
Using cliver 0.3.2
Using faraday-httpclient 1.0.1
Using scanf 1.0.0
Using asciidoctor 2.0.17
Using unicode-types 1.7.0
Using unf_ext 0.0.8.2
Using rubyzip 2.3.2
Using coderay 1.1.3
Using matrix 0.4.2
Using thor 1.0.1
Using rchardet 1.8.0
Using mime-types-data 3.2022.0105
Using seven_zip_ruby 1.3.0
Using connection_pool 2.2.5
Using ffi 1.15.5
Using ruby-ole 1.2.12.2
Using graphql 1.13.6
Using temple 0.8.2
Using link_header 0.0.8
Using plist 3.6.0
Using hollaback 0.1.1
Using image_size 3.0.2
Using plane1converter 0.0.1
Using thread_safe 0.3.6
Using uuidtools 2.2.0
Using iso-639 0.3.5
Using iso639 1.3.2
Using marcel 1.0.2
Using liquid 4.0.3
Using socksify 1.7.1
Using timeout 0.3.0
Using net-http-digest_auth 1.4.1
Using rubyntlm 0.6.3
Using webrick 1.7.0
Using webrobots 0.1.2
Using isoics 0.1.11
Using lightly 0.3.3
Using parslet 2.0.0
Using json-canonicalization 0.3.0
Using rack 2.2.4
Using rexml 3.2.5
Using logger 1.5.1
Using roman-numerals 0.3.0
Using ox 2.14.11
Using mn2pdf 1.48
Using method_source 1.0.0
Using optout 0.0.2
Using unicode2latex 0.0.6
Using ttfunk 1.7.0
Using tokenizer 0.3.0
Using gb-agencies 0.0.7
Using tilt 2.0.11 (was 2.0.10)
Using hashie 4.1.0
Using faraday-multipart 1.0.4
Using nokogiri 1.13.8 (arm64-darwin) (was 1.13.7)
Using arr-pm 0.0.11
Using bibtex-ruby 6.0.0
Using time 0.2.0
Using mnconvert 1.20.0 (was 1.19.0)
Using net-http-persistent 4.0.1
Using metanorma-ietf-data 0.2.0
Using expressir 1.2.7 (arm64-darwin)
Using mdb 0.5.0
Using unf 0.1.4
Using tzinfo 2.0.5
Using i18n 1.12.0
Using emf2svg 1.4.2 (arm64-darwin)
Using extract_ttc 0.1.0
Using addressable 2.8.0
Using sys-proctable 1.2.6
Using rdf 3.2.9 (was 3.2.8)
Using net-protocol 0.1.3
Using pubid-core 0.2.2
Using thor-hollaback 0.2.1
Using latexmath 0.1.5
Using ruby-graphviz 1.2.5
Using pry 0.14.1
Using ruby-jing 0.0.3
Using haml 5.2.2
Using asciimath2unitsml 0.4.3
Using equivalent-xml 0.6.0
Using iev 0.3.1
Using sterile 1.0.23
Using mathml2asciimath 0.0.14
Using nokogiri-styles 0.1.2
Using reverse_markdown 1.4.0
Using faraday 1.10.1 (was 1.10.0)
Using lutaml-express 0.2.1
Using domain_name 0.5.20190701
Using twitter_cldr 6.11.3
Using tzinfo-data 1.2022.2 (was 1.2022.1)
Using git 1.11.0
Using mime-types 3.4.1
Using sys-uname 1.2.2
Using ffi-libarchive 1.1.3
Using algolia 2.2.5
Using bcp47 0.3.3
Using down 5.3.1
Using sxp 1.2.2
Using faraday_middleware 1.2.0
Using http-cookie 1.0.5
Using metanorma-utils 1.2.9
Using net-ftp 0.1.3
Using pubid-iso 0.1.10 (was 0.1.8)
Using rdf-xsd 3.2.1
Using rdf-aggregate-repo 3.2.1
Using sparql-client 3.2.1
Using rdf-isomorphic 3.2.1
Using ffi-compiler2 2.0.1
Using json-ld 3.2.3 (was 3.2.1)
Using rdf-normalize 0.5.0
Using css_parser 1.11.0
Using activesupport 7.0.3.1
Using lutaml-uml 0.4.3
Using ebnf 2.3.1
Using mechanize 2.8.5
Using rdf-vocab 3.2.1
Using rdf-ordered-repo 3.2.1
Using isodoc-i18n 1.0.5
Using rdf-reasoner 0.8.0
Using rdf-trix 3.2.0
Using libmspack 0.10.1.2
Using html2doc 1.4.2.1
Using premailer 1.11.1
Using graphql-client 0.16.0
Using sparql 3.1.8
Using rdf-turtle 3.2.1
Using lutaml-xmi 0.2.3
Using rdf-rdfa 3.2.0
Using rdf-tabular 3.2.1
Using relaton-bib 1.12.6 (was 1.12.2)
Using rdf-json 3.2.0
Using rdf-microdata 3.2.1
Using rdf-n3 3.1.2
Using rdf-rdfxml 3.2.0
Using rdf-trig 3.2.0
Using shacl 0.1.1
Using lutaml 0.7.4
Using word-to-markdown 1.1.8
Using ld-patch 3.1.3
Using json-ld-preloaded 3.2.0
Using relaton-3gpp 1.12.0
Using relaton-iso-bib 1.12.1
Using relaton-calconnect 1.12.1
Using relaton-cie 1.12.1
Using relaton-ecma 1.12.0
Using serrano 1.0.0
Using ffi-libarchive-binary 0.2.6 (arm64-darwin)
Using relaton-oasis 1.12.0
Using relaton-omg 1.12.0
Using relaton-un 1.12.1
Using relaton-render 0.4.1 (was 0.3.10)
Using reverse_adoc 0.3.5
Using relaton-ietf 1.12.11 (was 1.12.4)
Using relaton-bsi 1.12.0
Using relaton-cen 1.12.0
Using relaton-gb 1.12.1
Using relaton-iec 1.12.0
Using relaton-iso 1.12.4 (was 1.12.1)
Using relaton-iana 1.12.5 (was 1.12.3)
Using relaton-nist 1.12.5 (was 1.12.4)
Using relaton-ieee 1.12.8 (was 1.12.4)
Using excavate 0.3.0
Using relaton-iho 1.12.1
Using relaton-bipm 1.12.3 (was 1.12.1)
Using relaton-itu 1.12.0
Using relaton-ogc 1.12.0
Using fontist 1.14.2
Using shex 0.6.4
Using linkeddata 3.1.6
Using metanorma 1.4.12 (was 1.4.11)
Using relaton-w3c 1.12.4 (was 1.12.3)
Using relaton 1.12.4 (was 1.12.2)
Using relaton-cli 1.12.1 (was 1.12.0)
Using relaton-iev 1.1.4
Using isodoc 2.2.0 (was 2.1.5)
Using metanorma-plugin-lutaml 0.4.15
Using metanorma-plugin-datastruct 0.2.0
Using metanorma-standoc 2.2.0 (was 2.1.5)
Using metanorma-generic 2.2.0 (was 2.1.3)
Using metanorma-ieee 0.0.4 (was 0.0.3)
Using metanorma-itu 2.1.6 (was 2.1.5.1)
Using metanorma-cc 2.1.6 (was 2.1.5)
Using metanorma-ietf 3.0.9 (was 3.0.8)
Using metanorma-m3aawg 2.1.6 (was 2.1.5)
Using metanorma-csa 2.1.6 (was 2.1.5)
Using metanorma-ogc 2.2.0 (was 2.1.5)
Using metanorma-un 0.9.6 (was 0.9.5)
Using metanorma-iho 0.6.6 (was 0.6.5)
Using metanorma-iso 2.1.6 (was 2.1.5)
Using metanorma-bipm 2.1.6 (was 2.1.5)
Using metanorma-iec 2.1.6 (was 2.1.5)
Using metanorma-cli 1.5.21 (was 1.5.20)
ronaldtse commented 2 years ago

All specified hyperlinks are broken now:

Screen Shot 2022-08-14 at 4 38 26 PM
opoudjis commented 2 years ago

Crap. https://xxx[yyy] is being misparsed as http{blank}s://xxx[yyy], with the newly introduced s:[] span macro.

I am... astonished. The fact that macros are not checked for text before the start of the macros is such a design fail in Asciidoctor as to beggar belief.