13

Currently, only list items are allowed inside of the Syntax chunk of content.

This restriction has prevented me from correctly versioning the different syntaxes using the <!-- if version [gte 6] --> tags.

The issue was found when I tried adding more syntax examples for Arrow Functions, within the JavaScript documentation. I tried to wrap the arrow function examples in the version tag, but was given an error that said that only list items are allowed.

My suggestion would be to allow any content in the Syntax blocks, and just have the community maintain a standard format--or at least allow support for versioning.

My workaround has been to add a list item that denotes the version (in bold). You may find that edit here: https://stackoverflow.com/documentation/proposed/changes/71480

5
  • I think the misunderstanding about what the Syntax section is for. It's supposed to be a place to remove redundancy from examples. That being said, I don't think I understand it either.
    – Laurel
    Commented Aug 1, 2016 at 16:07
  • 1
    @Laurel the issue still stands that different syntax is available in different specification versions, leading to the importance of being able to segregate them.
    – ndugger
    Commented Aug 1, 2016 at 16:08
  • I agree; I am working in a tag (regex) with massive amounts of syntax differences between versions. I find the syntax section massively unimportant for the most part, since Examples are a superior system. Why not just use examples?
    – Laurel
    Commented Aug 1, 2016 at 16:12
  • 5
    @Laurel I think syntax is mostly helpful for skimmers, or people that already know how it works, and just need a refresher on how to use something. It should be one of the more important sections on a page, and should act as a preview of the content on the page, or maybe even a table of contents, if we want to put in that effort.
    – ndugger
    Commented Aug 1, 2016 at 16:15
  • docs-beta.stackexchange.com/questions/1502/… They need to migrate the private meta soon: we are getting tons of duplicates.
    – Knu
    Commented Aug 2, 2016 at 13:51

0

Browse other questions tagged .