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

Add HTML links for "synopsis" code blocks #559

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

gmlueck
Copy link
Contributor

@gmlueck gmlueck commented Jun 9, 2024

Extend and improve the "codebox" Asciidoc role:

  • Rename "codebox" to "synopsis". My intent is to use this role
    mostly to define the synopsis of an API.

  • Create an Asciidoctor extension that enables HTML links for source
    listings that use the "synopsis" role and also define an id like:

    [source,role=synopsis,id=XXX]
    

    In the HTML render, when you hover the mouse over a code synopsis, a
    pound sign ("#") appears. Clicking on this gives you a link directly
    to that code synopsis. This makes it easy to get a direct link to
    any API that is defined with the "synopsis" role. Note that this
    behavior is similar to the way section headers work in the HTML
    render, where you can click on a "section sign" symbol to get a URL
    directly to a section.

Change the synopses of the math builtin function sections to use this
new style.

Extend and improve the "codebox" Asciidoc role:

* Rename "codebox" to "synopsis".  My intent is to use this role
  mostly to define the synopsis of an API.

* Create an Asciidoctor extension that enables HTML links for source
  listings that use the "synopsis" role and also define an id like:

  ```
  [source,role=synopsis,id=XXX]
  ```

  In the HTML render, when you hover the mouse over a code synopsis, a
  pound sign ("#") appears.  Clicking on this gives you a link directly
  to that code synopsis.  This makes it easy to get a direct link to
  any API that is defined with the "synopsis" role.  Note that this
  behavior is similar to the way section headers work in the HTML
  render, where you can click on a "section sign" symbol to get a URL
  directly to a section.
Add ids to the synopsis `[source]` blocks for the builtin math
functions.  As a result, the HTML render now allows you to get a link
directly to the synopsis for any of these functions.
@gmlueck gmlueck added the editorial Some purely editorial problem label Jun 9, 2024
@gmlueck
Copy link
Contributor Author

gmlueck commented Jun 9, 2024

Merging as editorial.

@gmlueck gmlueck merged commit ae99673 into KhronosGroup:SYCL-2020/master Jun 9, 2024
2 checks passed
@gmlueck gmlueck deleted the gmlueck/synopsis branch June 9, 2024 15:12
keryell pushed a commit that referenced this pull request Sep 10, 2024
Add HTML links for "synopsis" code blocks
gmlueck added a commit that referenced this pull request Nov 7, 2024
Add HTML links for "synopsis" code blocks

(cherry picked from commit ae99673)
gmlueck added a commit that referenced this pull request Nov 7, 2024
Add HTML links for "synopsis" code blocks

(cherry picked from commit ae99673)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Some purely editorial problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant