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 functionality to link arbitrary strings in code blocks #1576

Merged
merged 7 commits into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions content/docs/api-reference/get_url.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ Returns the URL string of the storage location (in a
specified by its `path` in a `repo` (<abbr>DVC project</abbr>), is stored.

The URL is formed by reading the project's
[remote configuration](/doc/command-reference/config#remote) and the
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or
[`.dvc` file](/doc/user-guide/dvc-files-and-directories#dvc-files) where the
[remote configuration](/doc/command-reference/config#remote) and the `dvc.yaml`
or [`.dvc` file](/doc/user-guide/dvc-files-and-directories#dvc-files) where the
given `path` is found (`outs` field). The schema of the URL returned depends on
the [type](/doc/command-reference/remote/add#supported-storage-types) of the
`remote` used (see the [Parameters](#parameters) section).
Expand Down
5 changes: 2 additions & 3 deletions content/docs/command-reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ easily tracked with Git.

> Note that `.dvc` files can be considered _orphan stages_, because they have no
> <abbr>dependencies</abbr>, only outputs. These are treated as _always changed_
> by `dvc status` and `dvc repro`, which always executes them. See
> [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) to learn
> more about stages.
> by `dvc status` and `dvc repro`, which always executes them. See `dvc.yaml` to
> learn more about stages.

To avoid adding files inside a directory accidentally, you can add the
corresponding [patterns](/doc/user-guide/dvcignore) in a `.dvcignore` file.
Expand Down
5 changes: 2 additions & 3 deletions content/docs/command-reference/dag.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# dag

Visualize the pipeline(s) in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvclock-file) as one or
more graph(s) of connected [stages](/doc/command-reference/run).
Visualize the pipeline(s) in `dvc.yaml` as one or more graph(s) of connected
[stages](/doc/command-reference/run).

## Synopsis

Expand Down
10 changes: 4 additions & 6 deletions content/docs/command-reference/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ of the project, but without placing them in the <abbr>workspace</abbr>. This
makes the data files available for linking (or copying) into the workspace.
(Refer to [dvc config cache.type](/doc/command-reference/config#cache).) Along
with `dvc checkout`, it's performed automatically by `dvc pull` when the target
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files are not
already in the cache:
`dvc.yaml` or [`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files)
files are not already in the cache:

```
Controlled files Commands
Expand Down Expand Up @@ -199,9 +198,8 @@ Note that the `.dvc/cache` directory was created and populated.
> for more info.

Used without arguments (as above), `dvc fetch` downloads all assets needed by
all [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files in the
current branch, including for directories. The hash values
all `dvc.yaml` and [`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files)
files in the current branch, including for directories. The hash values
`3863d0e317dee0a55c4e59d2ec0eef33` and `42c7025fc0edeb174069280d17add2d4`
correspond to the `model.pkl` file and `data/features/` directory, respectively.

Expand Down
8 changes: 3 additions & 5 deletions content/docs/command-reference/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ downloading, DVC will try to copy the target data from its <abbr>cache</abbr>).
The `path` argument is used to specify the location of the target to be
downloaded within the source repository at `url`. `path` can specify any file or
directory in the source repo, including those tracked by DVC, or by Git. Note
that DVC-tracked targets should be found in a
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or
that DVC-tracked targets should be found in a `dvc.yaml` or
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) file of the
project.

Expand Down Expand Up @@ -96,9 +95,8 @@ model.pkl

Note that the `model.pkl` file doesn't actually exist in the
[root directory](https://github.com/iterative/example-get-started/tree/master/)
of the source Git repo. Instead, it's exported in the
[`dvc.yaml`](https://github.com/iterative/example-get-started/blob/master/dvc.yaml)
file as an output of the `train` stage (in the `outs` field). DVC then
of the source Git repo. Instead, it's exported in the `dvc.yaml` file as an
output of the `train` stage (in the `outs` field). DVC then
[pulls](/doc/command-reference/pull) the file from the default
[remote](/doc/command-reference/remote) of the source DVC project (found in its
[config file](https://github.com/iterative/example-get-started/blob/master/.dvc/config)).
Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/import-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ $ dvc run -n download_data \

`dvc import-url` generates an import stage
[`.dvc` file](/doc/user-guide/dvc-files-and-directories#dvc-files) and `dvc run`
a regular stage (in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file)).
a regular stage (in `dvc.yaml`).

## Options

Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ downloading, DVC will try to copy the target data from its <abbr>cache</abbr>).
The `path` argument is used to specify the location of the target to be
downloaded within the source repository at `url`. `path` can specify any file or
directory in the source repo, including those tracked by DVC, or by Git. Note
that DVC-tracked targets should be found in a
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or
that DVC-tracked targets should be found in a `dvc.yaml` or
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) file of the
project.

Expand Down
8 changes: 3 additions & 5 deletions content/docs/command-reference/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ sub-projects to mitigate the issues of initializing in the Git repository root:
different remote storages, for example, for different sub-projects, etc.

- Not enough isolation/granularity - commands like `dvc pull`, `dvc checkout`,
and others analyze the whole repository to look for
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or
and others analyze the whole repository to look for `dvc.yaml` or
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files to
download files and directories, to reproduce <abbr>pipelines</abbr>, etc. It
can be expensive in the large repositories with a lot of projects.
Expand Down Expand Up @@ -125,9 +124,8 @@ include:

- SCM other than Git is being used. Even though there are DVC features that
require DVC to be run in the Git repo, DVC can work well with other version
control systems. Since DVC relies on simple
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) files to
manage <abbr>pipelines</abbr>, data, etc, they can be added into any SCM thus
control systems. Since DVC relies on simple `dvc.yaml` files to manage
<abbr>pipelines</abbr>, data, etc, they can be added into any SCM thus
providing large data files and directories versioning.

- There is no need to keep the history at all, e.g. having a deployment
Expand Down
8 changes: 3 additions & 5 deletions content/docs/command-reference/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ positional arguments:
DVC, by effectively replacing data files, models, directories with `.dvc` files
(`.dvc`), hides actual locations and names. This means that you don't see data
files when you browse a <abbr>DVC repository</abbr> on Git hosting (e.g.
Github), you just see the
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
Github), you just see the `dvc.yaml` and
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files. This makes
it hard to navigate the project to find <abbr>data artifacts</abbr> for use with
`dvc get`, `dvc import`, or `dvc.api`.
Expand Down Expand Up @@ -96,9 +95,8 @@ src
If you open the
[example-get-started](https://github.com/iterative/example-get-started)
project's page, you will see a similar list but the `model.pkl` file. It's
tracked by DVC and not visible to Git. It's exported in the
[`dvc.yaml`](https://github.com/iterative/example-get-started/blob/master/dvc.yaml)
file as an output of the `train` stage (in the `outs` field).
tracked by DVC and not visible to Git. It's exported in the `dvc.yaml` file as
an output of the `train` stage (in the `outs` field).

We can now, for example, download the model file with:

Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/metrics/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ The differences shown by this command include the new value, and numeric
difference (delta) from the previous value of metrics (rounded to 5 digits
precision). They're calculated between two commits (hash, branch, tag, or any
[Git revision](https://git-scm.com/docs/revisions)) for all metrics in the
<abbr>project</abbr>, found by examining all of the
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
<abbr>project</abbr>, found by examining all of the `dvc.yaml` and
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files in both
versions.

Expand Down
5 changes: 2 additions & 3 deletions content/docs/command-reference/metrics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ stages:

> `cache: false` above specifies that `summary.json` is not tracked or
> <abbr>cached</abbr> by DVC (`-M` option of `dvc run`). These metric files are
> normally committed with Git instead. See
> [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) for more
> information on the file format above.
> normally committed with Git instead. See `dvc.yaml` for more information on
> the file format above.

### Supported file formats

Expand Down
6 changes: 2 additions & 4 deletions content/docs/command-reference/params/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ itself does not ascribe any specific meaning for these values. They are
user-defined, and serve as a way to generalize and parametrize an machine
learning algorithms or data processing code.

DVC saves the param names and their latest values in the
[`dvc.yaml` file](/doc/user-guide/dvc-files-and-directories#dvcyaml-file). These
DVC saves the param names and their latest values in the `dvc.yaml` file. These
values will be compared to the ones in the params files to determine if the
stage is invalidated upon pipeline [reproduction](/doc/command-reference/repro).

Expand Down Expand Up @@ -109,8 +108,7 @@ epochs = params['train']['epochs']
layers = params['train']['layers']
```

You can find that each parameter and it's value were saved to
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file). These
You can find that each parameter and it's value were saved to `dvc.yaml`. These
values will be compared to the ones in the parameters files whenever `dvc repro`
is used, to determine if dependency to the params file is invalidated:

Expand Down
6 changes: 3 additions & 3 deletions content/docs/command-reference/plots/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ please see `dvc plots`.
## Options

- `--targets <path>` - specific metric files to visualize. These must be listed
in a [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) file
(see the `--plots` option of `dvc run`). When specifying multiple `--targets`
and `revisions`, you may use `--` after this option's arguments, e.g.:
in a `dvc.yaml` file (see the `--plots` option of `dvc run`). When specifying
multiple `--targets` and `revisions`, you may use `--` after this option's
arguments, e.g.:

```dvc
$ dvc plots diff --targets t1.json t2.csv -- HEAD v1 v2
Expand Down
5 changes: 2 additions & 3 deletions content/docs/command-reference/plots/modify.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ plots are generated with `dvc plot show` or `dvc plot diff`. This command sets
(or unsets) default display properties for a specific metrics file.

The path to the metrics file `target` is required. It must be listed in a
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) file (see
the `--plots` option of `dvc run`). `dvc plots modify` adds the display
properties to `dvc.yaml`.
`dvc.yaml` file (see the `--plots` option of `dvc run`). `dvc plots modify` adds
the display properties to `dvc.yaml`.

Property names are passed as [options](#options) to this command (prefixed with
`--`). These are based on the full
Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/plots/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ AUC curves, confusion matrices, etc. All plots defined in `dvc.yaml` are used by
default.

Optionally, specific metric file `targets` to show are accepted. These must be
listed in a [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file)
file (see the `--plots` option of `dvc run`).
listed in a `dvc.yaml` file (see the `--plots` option of `dvc run`).

The plot style can be customized with
[plot templates](/doc/command-reference/plots#plot-templates), using the
Expand Down
9 changes: 4 additions & 5 deletions content/docs/command-reference/pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Download tracked files or directories from
[remote storage](/doc/command-reference/remote) to the <abbr>cache</abbr> and
<abbr>workspace</abbr>, based on the current
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
<abbr>workspace</abbr>, based on the current `dvc.yaml` and
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files.

## Synopsis
Expand Down Expand Up @@ -39,9 +38,9 @@ remote.

With no arguments, just `dvc pull` or `dvc pull --remote <name>`, it downloads
only the files (or directories) missing from the workspace by searching all
stages in [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file)
or [`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files currently
in the <abbr>project</abbr>. It will not download files associated with earlier
stages in `dvc.yaml` or
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files currently in
the <abbr>project</abbr>. It will not download files associated with earlier
commits in the <abbr>repository</abbr> (if using Git), nor will it download
files that have not changed.

Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ with `git commit` and `git push`).

Under the hood a few actions are taken:

- The push command by default uses all
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
- The push command by default uses all `dvc.yaml` and
[`.dvc` files](/doc/user-guide/dvc-files-and-directories#dvc-files) in the
<abbr>workspace</abbr>. The command options listed below will either limit or
expand the set of stages (in dvc.yaml) or `.dvc` files to consult.
Expand Down
3 changes: 1 addition & 2 deletions content/docs/command-reference/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ $ cat .gitignore

## Example: remove a stage

Let's imagine we have a stage named `train` in our
[`dvc.yaml` file](/doc/user-guide/dvc-files-and-directories#dvcyaml-file), and
Let's imagine we have a stage named `train` in our `dvc.yaml` file, and
corresponding files in the <abbr>workspace</abbr>:

```yaml
Expand Down
10 changes: 4 additions & 6 deletions content/docs/command-reference/run.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# run

Helper command to create or update _stages_ in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories). Requires a name and a
Helper command to create or update _stages_ in `dvc.yaml`. Requires a name and a
command.

## Synopsis
Expand All @@ -23,10 +22,9 @@ positional arguments:
## Description

`dvc run` is a helper for creating or updating
[pipeline](/doc/command-reference/pipeline) stages in a
[`dvc.yaml` file](/doc/user-guide/dvc-files-and-directories#dvcyaml-files)
(located in the current working directory). _Stages_ represent individual data
processes, including their input and resulting outputs.
[pipeline](/doc/command-reference/pipeline) stages in a `dvc.yaml` file (located
in the current working directory). _Stages_ represent individual data processes,
including their input and resulting outputs.

A stage name is required and can be provided using the `-n` (`--name`) option.
The other available [options](#options) are mostly meant to describe different
Expand Down
2 changes: 1 addition & 1 deletion content/docs/command-reference/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ options:
| remote | `--cloud` | Comparisons are made between the cache, and the default remote, typically defined with `dvc remote --default`. |

DVC determines which data and code files to compare by analyzing all stages (in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
`dvc.yaml` and
[`.dvc` files](/doc/user-guide/dvc-files-and-directories#dvc-files) in the
<abbr>workspace</abbr> (the `--all-branches` and `--all-tags` options compare
multiple workspace versions).
Expand Down
3 changes: 1 addition & 2 deletions content/docs/install/plugins.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# IDE Plugins and Syntax Highlighting

When you add a file or a stage to your pipeline, DVC creates a special
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) or
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) file
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) or `dvc.yaml` file
(respectively) that contains all the needed information to track your data and
transformations.

Expand Down
3 changes: 1 addition & 2 deletions content/docs/start/data-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ $ dvc run -n prepare \
python src/prepare.py data/data.xml
```

A [`dvc.yaml` file](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) is
generated. It includes information about the command we ran
A `dvc.yaml` file is generated. It includes information about the command we ran
(`python src/prepare.py`), its <abbr>dependencies</abbr>, and
<abbr>outputs</abbr>.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,9 @@ $ dvc run -n train -d train.py -d data \
```

`dvc run` writes a pipeline stage named `train` (specified using the `-n`
option) in [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file).
It tracks all outputs (`-o`) the same way as `dvc add` does. Unlike `dvc add`,
`dvc run` also tracks dependencies (`-d`) and the command (`python train.py`)
that was run to produce the result.
option) in `dvc.yaml`. It tracks all outputs (`-o`) the same way as `dvc add`
does. Unlike `dvc add`, `dvc run` also tracks dependencies (`-d`) and the
command (`python train.py`) that was run to produce the result.

> At this point you could run `git add .` and `git commit` to save the `train`
> stage and its outputs to the repository.
Expand Down
3 changes: 1 addition & 2 deletions content/docs/user-guide/basic-concepts/dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ match: [dependency, dependencies]
---

A file or directory (possibly tracked by DVC) recorded in the `deps` section of
a stage (in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file)) or
a stage (in `dvc.yaml`) or
[`.dvc` file](/doc/user-guide/dvc-files-and-directories#dvc-files) file. See
`dvc run`. Stages are invalidated when any of their dependencies change.
5 changes: 2 additions & 3 deletions content/docs/user-guide/basic-concepts/dvc-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ match:
Initialized by running `dvc init` in the **workspace** (typically a Git
repository). It will contain the
[`.dvc/` directory](/doc/user-guide/dvc-files-and-directories), as well as
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) and
[`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files) files created with
commands such as `dvc add` or `dvc run`.
`dvc.yaml` and [`.dvc`](/doc/user-guide/dvc-files-and-directories#dvc-files)
files created with commands such as `dvc add` or `dvc run`.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: 'External Dependency'
match: ['external dependency', 'external dependencies']
---

A stage dependency (`deps` field in
[`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file) or in an
A stage dependency (`deps` field in `dvc.yaml` or in an
[import stage](/doc/command-reference/import) `.dvc` file) with origin in an
external source, for example HTTP, SSH, Amazon S3, Google Cloud Storage remote
locations, or even other DVC repositories. See
Expand Down
2 changes: 1 addition & 1 deletion content/docs/user-guide/basic-concepts/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ match: [output, outputs]
---

A file or directory tracked by DVC, recorded in the `outs` section of a stage
(in [`dvc.yaml`](/doc/user-guide/dvc-files-and-directories#dvcyaml-file)) or
(in `dvc.yaml`) or
[`.dvc` file](/doc/user-guide/dvc-files-and-directories#dvc-files). Outputs are
usually the result of stages. See `dvc add`, `dvc run`, `dvc import`, et al.
A.k.a. _data artifact_
6 changes: 6 additions & 0 deletions content/linked-terms.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be extracted to a simple JSON or YAML config file so we can easily edit the list later? I mean... It's already easy but would be even easier 🙂

Also, should a test be written for this fn?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could, but using .js allows us to use RegExp literal matchers and dynamic replacement values in a future. It's possible to switch to JSON by simply converting what's there now if we decide we don't want those features.

{
matches: 'dvc.yaml',
url: '/doc/user-guide/dvc-files-and-directories#dvcyaml-file'
}
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
]
3 changes: 2 additions & 1 deletion plugins/gatsby-remark-dvc-linker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ const visit = require('unist-util-visit')

const apiLinker = require('./apiLinker')
const commandLinker = require('./commandLinker')
const simpleLinker = require('./simpleLinker')

// Lifting up the AST visitor in order not to repeat the
// calculations times the amount of linkers we have
module.exports = ({ markdownAST }) => {
visit(
markdownAST,
'inlineCode',
flow([Array, commandLinker, apiLinker, constant(undefined)])
flow([Array, commandLinker, apiLinker, simpleLinker, constant(undefined)])
)
return markdownAST
}
Loading