You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/27 04:59:03 UTC

[GitHub] [cordova-docs] GedasGa opened a new issue #954: Links to the sections with the apostrophe mark don't work

GedasGa opened a new issue #954: Links to the sections with the apostrophe mark don't work
URL: https://github.com/apache/cordova-docs/issues/954
 
 
   # Bug Report
   
   ## Problem
   
   In the Electron's documentation section, if in the navigation bar you click on the "Customizing the Application's Window Process" or on the "Customizing the Electron's Main Process" it won't link you to the appropriate section.
   
   ### What is expected to happen?
   
   It is expected that once you link on any section in the navbar, it will link you to the appropriate section in the documentation.
   
   ### What does actually happen?
   
   Nothing happens. The user remains in the same section.
   
   ### Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   The problem is related to the name of the section and how we build an HTML document from `.md` files. When we build an HTML document, we take the names of the headings from the `.md` file and create an anchor tag for every 2nd layer (`##`) heading.
   
   For instance:
   ```
   <a class="fragment-anchor" id="customizing-the-electron's-main-process"></a>
   ```
   
   We use heading's name as an `id` of the element in the navbar link as well as the document, in this case, `./docs/en/latest/guide/platforms/electron/index.html`.
   
   Since both section names "Customizing the Application's Window Process" and "Customizing the Electron's Main Process" contain an apostrophe, we also happen to use an apostrophe in the `id`. Unfortunately, this is what causes this issue.
   
   ### Possible solutions
   
   - First and the simplest - change the name of the section.
   - Manually edit the `id` of the corresponding element it in the `./docs/en/latest/guide/platforms/electron/index.html` and `href` of `<a>` element in the navbar
   - Use the backslash (\) to escape the apostrophe symbol in the `href` of `<a>` element in the navbar
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   I believe this problem is across all the browsers and operating systems since they all build HTML in a similar way. I've successfully reproduced the problem on the newest Chrome and Safari browsers on macOS.
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to the most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org