Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SO and GH are now sharing the same syntax #231

Closed
cderv opened this issue Jan 8, 2019 · 2 comments · Fixed by #257
Closed

SO and GH are now sharing the same syntax #231

cderv opened this issue Jan 8, 2019 · 2 comments · Fixed by #257

Comments

@cderv
Copy link
Contributor

@cderv cderv commented Jan 8, 2019

Big news from today: SO now supports the fenced code blog syntax !

``` r
some code
```

This is just from today, announced in an old feature request post:
https://meta.stackexchange.com/a/322000

Documentation has been updated:
https://stackoverflow.com/editing-help#syntax-highlighting

An illustration
image

I find it very useful to not have to switch between venue = "gh" and venue="so".
I could be at mentioned in documentation and leave so syntax as is. Or it could be change to have only one syntax to maintain.

In fact I just wanted to share in case you would like to integrate this news, if you did not saw it already. 😉

@jennybc
Copy link
Member

@jennybc jennybc commented Feb 4, 2019

AFAICT Stack Overflow still does not support collapsible details, the way GitHub does. This is how we incorporate session info for the "gh" venue. Details on Stack Overflow seem to display in their full, lengthy glory, but don't appear to break anything.

Would be interested to hear if others agree with my assessment.

Is the conclusion that "so" should become an alias for "gh", sort of the way "ds" and I can delete "so"-specific code paths internally?

@cderv
Copy link
Contributor Author

@cderv cderv commented Feb 5, 2019

Yes you're right. I missed that. SO does not seem to accept those <details> and <summary> html tags.

SO has some specific syntax (like spoiler) but nothing I found to collapse using a markdown syntax, and nothing standard.
When trying reprex::reprex(x = {a <- "2";a}, venue = "gh", si = TRUE) and posting on SO editor, it seems to work fine.

So if we make "so" an alias of "gh", the collapse part will not be collapsed, but it is already not collapsed right now when using "so" as non supported. So it won't changed.

This changes in SO that accept markdown code block would mean that internally, the SO specific could be remove. Is it worth it to have less code to maintain ?
One way of real-testing this could be to have a change in documentation to indicate that "gh" could be used instead of "so" and like soft deprecation, add a message when venue = "so" is used to indicate changes in future version. don't know if it something that can be done... 🤔

jennybc added a commit that referenced this issue May 16, 2019
Closes #231

Only remaining difference is putting session info in an collapsible details tag
@jennybc jennybc closed this in #257 May 17, 2019
jennybc added a commit that referenced this issue May 17, 2019
* Venue "so" is *almost* "gh" now

Closes #231

Only remaining difference is putting session info in an collapsible details tag

* Fully commit to "so" == "gh" (almost)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants