restful-api-guidelines icon indicating copy to clipboard operation
restful-api-guidelines copied to clipboard

some formatting can't be converted to PDF

Open ePaul opened this issue 4 years ago • 3 comments

Problem Pages 10 (durable references) and 44/45 (common method properties table) of the PDF show some pieces of text as plain HTML instead of formatted properly.

Analysis

When running the make all locally, I get some errors:

...
docker run -v /home/pebermann/projektoj/restful-api-guidelines:/documents/ asciidoctor/docker-asciidoctor:latest asciidoctor \
  -D /documents/output index.adoc;
docker run -v /home/pebermann/projektoj/restful-api-guidelines:/documents/ asciidoctor/docker-asciidoctor:latest asciidoctor-pdf \
  -D /documents/output index.adoc;
asciidoctor: ERROR: failed to parse formatted text: ​<code><a href="https://infrastructure-api-repository.zalandoapis.com/" class="bare">https://infrastructure-api-repository.zalandoapis.com/</a></code> <b>–</b> used to refer to user defined, immutable API specification revisions published via the internal API repository.
asciidoctor: ERROR: failed to parse formatted text: ​<code><a href="https://opensource.zalando.com/restful-api-guidelines/{model.yaml}" class="bare">https://opensource.zalando.com/​restful-api-guidelines/​{model.yaml}</a></code> <b>–</b> used to refer to guideline defined re-usable API fragments (see <code>{model.yaml}</code> files in <a href="https://github.com/zalando/restful-api-guidelines/tree/master/models">restful-api-guidelines/models</a> for details).
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> No, but <a anchor="229"><span class="should-keyword"><strong>SHOULD</strong></span> consider to design <code>POST</code> and <code>PATCH</code> idempotent</a>
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> May, but only if specific <a href="#post"><code>POST</code></a> endpoint is <a anchor="safe">safe</a>. <strong>Hint:</strong> not supported by most caches.
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> No, but <a anchor="229"><span class="should-keyword"><strong>SHOULD</strong></span> consider to design <code>POST</code> and <code>PATCH</code> idempotent</a>
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> No, but <a anchor="229"><span class="should-keyword"><strong>SHOULD</strong></span> consider to design <code>POST</code> and <code>PATCH</code> idempotent</a>
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> May, but only if specific <a href="#post"><code>POST</code></a> endpoint is <a anchor="safe">safe</a>. <strong>Hint:</strong> not supported by most caches.
asciidoctor: ERROR: failed to parse formatted text: <span class="should-keyword">&#x26a0;&#xFE0F;</span> No, but <a anchor="229"><span class="should-keyword"><strong>SHOULD</strong></span> consider to design <code>POST</code> and <code>PATCH</code> idempotent</a>
mv -f output/index.pdf output/zalando-guidelines.pdf;
...

It looks like the HTML→PDF conversion did break here somehow? The only thing I can see which those have in common is that some more or less complicated HTML is included via a {...} directive into the actual code here.

ePaul avatar Jan 10 '22 11:01 ePaul

I checked this before and back than I found no serious consequences based on this warning for the created pdf-file, so I decided to ignore it.

tkrop avatar Jan 11 '22 18:01 tkrop

Yeah, but it has the effect that on two pages the formatting is broken. (The ERRORs are just a symptom which might help identify the problem.) api-guidelines-durable-references api-guidelines-method-properties

The icons in front of the Yes/No are broken too, but that seems to be a separate issue and not related to these ERRORs.

ePaul avatar Jan 12 '22 18:01 ePaul

If fixing this issue turns out to be not straightforward (asciidoc update?), then we do not further support pdf generation / download option.

tfrauenstein avatar Feb 08 '22 14:02 tfrauenstein

The table for rule 149 is fixed, but the link in rule in rule 234 is still broken.

ePaul avatar Mar 21 '23 14:03 ePaul

We decided to not invest time into fixing this, instead added #753 for removing the PDF + epub versions.

ePaul avatar Mar 21 '23 14:03 ePaul