Skip to content

Code Highlight markup and Link colouration fix sizeof.adoc #671

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

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

animeshsrivastava24
Copy link
Contributor

@animeshsrivastava24 animeshsrivastava24 commented Jul 13, 2019

Line 69 Do we need to modify the ints to int and add a code element with link?
Ref #546

Line 69 Do we need to modify the **ints** ?
@per1234
Copy link
Collaborator

per1234 commented Jul 14, 2019

Do we need to modify the ints to int and add a code element with link?

I would do it like this:

Note that `sizeof` returns the total number of bytes. So for arrays of larger variable types such as link:../../data-types/int[`int`]s, the for loop would look something like this.

@animeshsrivastava24
Copy link
Contributor Author

animeshsrivastava24 commented Jul 14, 2019

Oh, I didn't think over it in this manner. Thanks a lot for the suggestion.
I'll send another PR with this (link:../../data-types/int[int]s) update in it.

@per1234 per1234 merged commit c2c6ee3 into arduino:master Jul 15, 2019
@animeshsrivastava24
Copy link
Contributor Author

animeshsrivastava24 commented Jul 18, 2019

@per1234 While working on to send the next PR, I am stuck at a small problem and need your guidance

I was working on to modify the unsigned int file

For the first occurrence of ints,
I tried the following:

`link:../int[int]`s

this produces a problem related to desired display output

This produced
image

While for the further occurrences of ints:

link:../int[`int`]s

works fine

image

Please guide how to solve such first occurences

@per1234
Copy link
Collaborator

per1234 commented Jul 20, 2019

I found a solution. It's a bit ugly, but it does work:

`link:../int[int]`{empty}s

{empty} is a predefined character replacement attribute in asciidoctor:
https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions

@animeshsrivastava24
Copy link
Contributor Author

animeshsrivastava24 commented Jul 20, 2019

@per1234 Thanks a lot for the valuable suggestion.

In recent PRs #677 #679, I accidentally added code markup to text. I thought to have your views before proceeding further to do any such further modifications.
Please guide me, do the instances of unsigned int and ints need to be added under code markup in
Line 15
Line 19
https://github.com/arduino/reference-en/blob/master/Language/Variables/Data%20Types/unsignedInt.adoc

@per1234
Copy link
Collaborator

per1234 commented Jul 21, 2019

@animeshsrivastava24 yes please. Any time there is code in the reference, it should be in code markup. I think it's especially important in this case where a code word is made plural, because the markup makes it clear that only part of the word is code, and so prevents confusion (what's an "ints"?)

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 this pull request may close these issues.

2 participants