You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2021/05/19 01:43:38 UTC

[incubator-annotator-website] 03/03: Fix shell syntax highlighting

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git

commit acd344111f6153036b54597248d14d11d39a6cff
Author: Randall Leeds <ra...@bleeds.info>
AuthorDate: Sun May 16 15:32:40 2021 -0700

    Fix shell syntax highlighting
---
 src/docs/develop.md         |  6 +++---
 src/docs/getting-started.md | 12 ++++++------
 src/docs/index.md           |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/docs/develop.md b/src/docs/develop.md
index a0cdf4f..c676ef5 100644
--- a/src/docs/develop.md
+++ b/src/docs/develop.md
@@ -26,7 +26,7 @@ $ git clone https://gitbox.apache.org/repos/asf/incubator-annotator.git apache-a
 
 Then install dependencies using yarn:
 
-```sh
+``` shell
 $ cd apache-annotator
 $ yarn install
 ```
@@ -35,7 +35,7 @@ $ yarn install
 
 To compile (‘transpile’) the code:
 
-```sh
+``` shell
 $ yarn build
 ```
 
@@ -57,6 +57,6 @@ Now open `http://localhost:8080/` (or whichever address the command prints) in y
 
 This runs the tests for all packages and reports their code coverage:
 
-```sh
+``` shell
 $ yarn test
 ```
diff --git a/src/docs/getting-started.md b/src/docs/getting-started.md
index 1b110d9..5423c8c 100644
--- a/src/docs/getting-started.md
+++ b/src/docs/getting-started.md
@@ -12,13 +12,13 @@ The project is made up of multiple modules. Each module is [available on the NPM
 
 For example:
 
-```sh
+``` shell
 $ yarn add @apache-annotator/dom
 ```
 
 …with in your code:
 
-```js
+``` js
 import { highlightRange } from '@apache-annotator/dom';
 ```
 
@@ -34,7 +34,7 @@ A typical goal of web annotation is to let users highlight a phrase of text in a
 
 First, we define the way to describe the user’s selection as a TextQuoteSelector.
 
-```js
+``` js
 import { describeTextQuote } from '@apache-annotator/dom';
 
 async function describeCurrentSelection() {
@@ -46,7 +46,7 @@ async function describeCurrentSelection() {
 
 If the user had selected the word *“ipsum”* in the befamed *“Lorem ipsum dolor amet …”*, the return value of describeCurrentSelection() might resolve to this:
 
-```
+``` json
 {
   type: 'TextQuoteSelector',
   exact: 'ipsum',
@@ -59,7 +59,7 @@ The *prefix* and *suffix* attributes are there to know which of multiple occurre
 
 Next, we define roughly the inverse function: given a TextQuoteSelector, we highlight the text it points to.
 
-```js
+``` js
 import { createTextQuoteSelectorMatcher, highlightRange } from '@apache-annotator/dom';
 
 async function highlightSelectorTarget(textQuoteSelector) {
@@ -78,7 +78,7 @@ As the [`for await … of`](https://developer.mozilla.org/en-US/docs/Web/JavaScr
 
 We could use the functions defined above in many ways; keeping highlighted quotes in local storage, or in one’s bookmarks, or sharing them with others, and so on. For this example, we keep it simple and highlight each selection upon release of the mouse button; and store the selector to make it appear again after a page reload.
 
-```js
+``` js
 document.addEventListener('mouseup', async () => {
   const selector = await describeCurrentSelection();
   const existingSelectors = JSON.parse(localStorage[document.URL] || '[]');
diff --git a/src/docs/index.md b/src/docs/index.md
index c533e42..9d9d5c3 100644
--- a/src/docs/index.md
+++ b/src/docs/index.md
@@ -34,7 +34,7 @@ The [W3C Web Annotation Data Model](https://www.w3.org/TR/annotation-model) outl
 
 The source code also includes a script for validating Web Annotation Data Model JSON documents against the data model schema. Having [installed from source](/docs/develop/#install-from-source), one can run:
 
-```sh
+``` shell
 $ yarn validate --url https://raw.githubusercontent.com/w3c/web-annotation-tests/master/tools/samples/correct/anno1.json
 ```