metanorma / asciidoctor-rfc

AsciiRFC: an AsciiDoc/asciidoctor backend to produce RFC XML v3 (RFC 7991) and v2 (RFC 7749)
BSD 2-Clause "Simplified" License
15 stars 7 forks source link

Spec comparison of RFC XML samples by TXT output #66

Closed opoudjis closed 6 years ago

opoudjis commented 6 years ago
bundle exec bin/asciidoctor-rfc2 spec/examples/davies-template-bare-06.adoc --trace; \
  xml2rfc spec/examples/davies-template-bare-06.xml -o new.txt; \
  xml2rfc spec/examples/davies-template-bare-06.xml.orig -o old.txt; \
  diff old.txt new.txt
opoudjis commented 6 years ago

Added first of many files to rspec; comparing only txt output for now.

opoudjis commented 6 years ago

There are spacing inconsistencies in the markdown files, but they are minor.

opoudjis commented 6 years ago

I introduced open block formatting to deal with the complex nested lists in RFC7511.

Major inconsistency with MMark output is that BCP14 output in MMark is just capitalised, whereas in current gem it is capitalised + strong: SHOULD vs *SHOULD*. Should I drop the boldfacing?

ronaldtse commented 6 years ago

I think we should do both boldface and capitalize :wink:

opoudjis commented 6 years ago

No problem. The MMark output in rspec is going to complain unnecessarily, since the MMark XML output does not do this, but better to make the discrepancy obvious.

opoudjis commented 6 years ago

... on second thought, I'm going to change the *BCP14* to BCP14 within the spec, for the purposes of comparison of the MMark outputs.

ronaldtse commented 6 years ago

Got it!

opoudjis commented 6 years ago

I am working on mitigating the spacing issues.

opoudjis commented 6 years ago

Mitigated as much as I can.

ronaldtse commented 6 years ago

Thank you @opoudjis . We just need to keep in mind that "mmark" is not technically the "authoritative" approach, but sticking to what it does is a good idea.

opoudjis commented 6 years ago

And indeed, there's a couple of areas where I've improved on MMark—notably in forcing use of the relref convention for addressing part of a reference. (It's v3, but I use it as a template for v2 as well.)

ronaldtse commented 6 years ago

@opoudjis could you help document those improvements so we all know what they are! 👍