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

Backslash missing in the User Guide #17208

Closed
CyrilleB79 opened this issue Sep 23, 2024 · 13 comments · Fixed by #17283
Closed

Backslash missing in the User Guide #17208

CyrilleB79 opened this issue Sep 23, 2024 · 13 comments · Fixed by #17283
Labels
component/documentation good first issue github features these at https://github.com/nvaccess/nvda/contribute p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@CyrilleB79
Copy link
Collaborator

Steps to reproduce:

Look at User Guide, paragraph "12.2.2. Punctuation/symbol pronunciation"

Actual behavior:

There is the following sentence:

Normal backslashes in the Replacement field should thus be doubled, e.g. "a\b" should be typed in order to get the "a\b" replacement.

Expected behavior:

In the .md file, the sentence is:

Normal backslashes in the Replacement field should thus be doubled, e.g. "a\\b" should be typed in order to get the "a\b" replacement.

So in the converted HTML, the two expressions should be "a\\b" and "a\b", I.e. two backslashes in the first expression.

Technical

From what I have seen about markdown, backslashes are used to escape special markdown characters. When we have two backslashes in a row, the first backslash is just used to escape the second one, i.e. the second one will be literally a backslash. Though, Markdown seems not to complain when backslash is used before a non-special character.

There are two possibilities:

  • Either we just fix this sentence, what would be easier for translators
  • Or we double any backslash in the documentation, for more consistency, but more work for translators.

My personal preference (being also a translator) is the first solution.

NVDA logs, crash dumps and other attachments:

N/A

System configuration

NVDA installed/portable/running from source:

N/A

NVDA version:

2024.4beta

Windows version:

N/A

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

N/A

Other questions

Does the issue still occur after restarting your computer?

N/A

Have you tried any other versions of NVDA? If so, please report their behaviors.

  • NVDA 2024.1: the issue is also present
  • NVDA 2023.3.4: the issue is NOT present

I suspect #15945 to have brought this regression.

If NVDA add-ons are disabled, is your problem still occurring?

N/A

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

N/A

@seanbudd seanbudd added component/documentation p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority good first issue github features these at https://github.com/nvaccess/nvda/contribute triaged Has been triaged, issue is waiting for implementation. labels Sep 23, 2024
@seanbudd seanbudd added this to the 2025.1 milestone Sep 23, 2024
@CyrilleB79
Copy link
Collaborator Author

@michaelDCurran I'd like to know your opinion on this topic give the recent discussion about escaped characters and poedit.

Should all backslashes be escaped (i.e. doubled) in .md files?

@michaelDCurran
Copy link
Member

I think in future we should double all back slashes in the source english markdown files. Once pr #17214 is completed and merged to beta, I will then fix the one double back slash case you pointed out in the English user guide.

@christopherpross
Copy link

@michaelDCurran
Would it be okay if I took over the issue? I would like to try to contribute regularly to NVDA in the future and this would be a good first issue.

@nakul-py
Copy link
Contributor

i am working on this and using first possibility for now by fixing the sentence

seanbudd pushed a commit that referenced this issue Oct 21, 2024
fixes issue #17208

Summary of the issue:
Problem:
The sentence originally read: "Normal backslashes in the Replacement field should thus be doubled, e.g., "a\b" should be typed to get the "a\b" replacement."
In the HTML output, this rendered incorrectly as only one backslash (a\b), when two backslashes (a\b) were intended.
Solution:
The sentence was updated to correctly show double backslashes where needed: "Normal backslashes in the Replacement field should thus be doubled, e.g., "a\\b" should be typed to get the "a\b" replacement and "a\b"
should be typed to get the "a\b" replacement.
This ensures that two backslashes are correctly represented in both Markdown and HTML output
@CyrilleB79
Copy link
Collaborator Author

@seanbudd, shouldn't this issue remain opened?
In #17208 (comment), @michaelDCurran has advocated for doubling all the backslashes and this is not yet done.

I am reopening the issue while waiting for the response from NV Access.

@CyrilleB79 CyrilleB79 reopened this Oct 22, 2024
@nakul-py
Copy link
Contributor

hi @CyrilleB79 ok i will do what @michaelDCurran wants.

@nakul-py
Copy link
Contributor

Hey @seanbudd and @CyrilleB79 i have review all the languages user guides only one of this file has this error so i solved it again and now there was no backslash error in any userguide.md file

@CyrilleB79
Copy link
Collaborator Author

@nakul-py, in the future, the goal is to double all the backslashes in .md files, not only for the sentence that you have already fixed.

For non translatable documentation, this can be done immediately if you want.

For translatable documentation, before submitting a PR, a strategy should be defined in order to minimize the work for translators.

@nakul-py
Copy link
Contributor

hey @CyrilleB79 in all .md files or in only all userguides file.

@CyrilleB79
Copy link
Collaborator Author

Ideally, I guess, all .md files. But NV Access should confirm.

@CyrilleB79
Copy link
Collaborator Author

Except translated .md files as written in #17316.

@seanbudd
Copy link
Member

Are we conscious of any other instances of this issue? There doesn't appear to be a simple regex to discover these. I am in favour of closing and opening new issues or PRs as these issues are found.

@SaschaCowley
Copy link
Member

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/documentation good first issue github features these at https://github.com/nvaccess/nvda/contribute p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@seanbudd @michaelDCurran @SaschaCowley @CyrilleB79 @christopherpross @nakul-py and others