-
edhelas
is there a way to fix the XML indentation in the XEP examples ? it's all broken in many XEPs
-
edhelas
https://xmpp.org/extensions/xep-0409.html for example
-
Ge0rG
edhelas: define "broken"
-
edhelas
https://movim.eu:5280/upload/9d94237298995552fa13436420195fbca436dce7/j2E7LJlOhofjtYzzYBHT8HcJiI29y3Ud9XTHA4SG/Screen_Shot_2018-07-30_at_14.01.35.png
-
Ge0rG
`<span class="pln"> </span>`
-
Ge0rG
it seems like the indentation is part of the original xml, just with 0x20 and not with nbsp.
-
flow
edhelas, that is caused by the author not moving the example stanza to the front of the line in the XML: https://github.com/xsf/xeps/blob/master/xep-0409.xml#L83
-
flow
feel free to submit a PR
-
edhelas
I'm wondering if we could add a linter
-
jonasw
edhelas, I have a linter work-in-progress
-
jonasw
I should probably put it somewhere on the internet
-
jonasw
maybe someone is motivated to work on this, I’m EBUSY currently https://github.com/horazont/xeplint
-
Zash
Wait what, <items node='.' max_items='1'/>
-
Zash
Never seen that before
-
MattJ
Says who?
-
Zash
JabberCat
-
Zash
Also the XEP
-
Zash
https://xmpp.org/extensions/xep-0060.html#example-84
-
Link Mauve
edhelas, it does trigger my OCD, but so far I haven’t been able to do enough introspection in XSLT to reach what I’d like, which is a new <xml-example/> tag which would contain XML in it, not as CDATA but as normal XML, to benefit from all of the checking our parsers already do.
-
Ge0rG
send PRs that move every example block to the left?
-
Link Mauve
I do that whenever I encounter one, but it’d be much better to have that as part of our tooling instead.
-
waqas
I'm much less of an XSLT fan these days
-
Link Mauve
The other benefit would be to be able to do syntax highlighting without depending on JS.
-
waqas
Link Mauve: How? Just for XML you mean? Many of our examples are pseudo-XML, not valid XML.
-
Link Mauve
Oh?
-
Link Mauve
Do you mean the ones with CLIENT: and such?
-
pep.
Maybe allow for the examples to be parsed as xml, add an attribute or something on the tag