json-ld / yaml-ld

CG specification for YAML-LD and UCR
https://json-ld.github.io/yaml-ld/spec
Other
19 stars 8 forks source link

HTML `<script>` tag content doesn't need to be dedented #135

Closed anatoly-scherbakov closed 2 months ago

anatoly-scherbakov commented 3 months ago
          @gkellogg (cc @TallTed)

Note the comment about the need to unindent a stream. Probably not necessary for documents in general.

Yes! See my comment above. More explicitly:

This version of @anatoly-scherbakov's example returns the same parse events as the original version:

  "@context": https://json-ld.org/contexts/person.jsonld
  "@id": http://dbpedia.org/resource/John_Lennon
  name: John Lennon
  born: 1940-10-09
  spouse: http://dbpedia.org/resource/Cynthia_Lennon
---
  "@context": https://json-ld.org/contexts/person.jsonld
  "@id": http://dbpedia.org/resource/Cynthia_Lennon
  born: 1939-09-10

So @anatoly-scherbakov I don't think we should require HTML parsers to dedent scripts. We should only:

Originally posted by @VladimirAlexiev in https://github.com/json-ld/yaml-ld/issues/132#issuecomment-2036415272