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

Doc: use string array delimiter as-is input on highlight #5297

Conversation

makenowjust
Copy link
Contributor

Current highlighter implementation loses string array delimiter information, and replaces it with %w( or %i(. Highlighter should respect user input and it can produce invalid Crystal code if string array item has ).

For example, src/string_array.cr:

# ```
# %w[:-) ;)]
# ```
def string_array_example
end

and generated is:

2017-11-15 20 17 07

Thank you.

Current highlighter implementation losts string array delimiter information,
and replaces it with `%w(` or `%i(`. Highlighter should respect user input,
and it can produce invalid Crystal code if string array item has `)`.
@bcardiff bcardiff merged commit 1b95a69 into crystal-lang:master Nov 18, 2017
@bcardiff bcardiff added this to the Next milestone Nov 18, 2017
@bcardiff
Copy link
Member

Thanks @makenowjust

@makenowjust makenowjust deleted the fix/crystal-doc/show-string-array-as-is-input-on-highlight branch November 18, 2017 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants