From 5a3edf4dcaae0f4e1b0f64fc00857959ec480740 Mon Sep 17 00:00:00 2001 From: Ivan Lediaev Date: Mon, 18 Mar 2024 16:19:13 +0100 Subject: [PATCH] fix: replace all usage of @docs-tools/transform with diplodoc --- en/plugins/import.md | 8 ++++---- en/syntax/additional.md | 2 +- en/tools/transform/highlight.md | 2 +- en/tools/transform/index.md | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/en/plugins/import.md b/en/plugins/import.md index 4714358..da3182d 100644 --- a/en/plugins/import.md +++ b/en/plugins/import.md @@ -30,9 +30,9 @@ npm i markdown-it-emoji ```javascript const fs = require('fs'); - const transform = require('@doc-tools/transform'); - const cut = require('@doc-tools/transform/lib/plugins/cut'); - const sup = require('@doc-tools/transform/lib/plugins/sup'); + const transform = require('@diplodoc/transform'); + const cut = require('@diplodoc/transform/lib/plugins/cut'); + const sup = require('@diplodoc/transform/lib/plugins/sup'); const emoji = require('markdown-it-emoji'); const content = fs.readFileSync(filePath, 'utf'); const {result: {html, meta}, logs} = transform(content, {plugins: [cut, sup, emoji]}); @@ -40,7 +40,7 @@ npm i markdown-it-emoji {% note warning %} - When overriding the `plugins` parameter, you must reconnect [YFM plugins](index.md). To do this, import them from the `@doc-tools/transform` package and pass them in the plugin array. + When overriding the `plugins` parameter, you must reconnect [YFM plugins](index.md). To do this, import them from the `@diplodoc/transform` package and pass them in the plugin array. {% endnote %} diff --git a/en/syntax/additional.md b/en/syntax/additional.md index 75b7148..eec1119 100644 --- a/en/syntax/additional.md +++ b/en/syntax/additional.md @@ -51,7 +51,7 @@ You can vote to include footnote support in YFM by default in [GitHub issues](ht Import plugin from package like so: ``` -const checkbox = require('@doc-tools/transform/lib/plugins/checkbox'); +const checkbox = require('@diplodoc/transform/lib/plugins/checkbox'); ``` The task list is a list of checkboxes. A normal item is represented by the `- [ ]` symbol, a checked one by `- [x]`. You can use [line formatting](./base.md#line) in the task description. diff --git a/en/tools/transform/highlight.md b/en/tools/transform/highlight.md index 4dd9796..2f9e645 100644 --- a/en/tools/transform/highlight.md +++ b/en/tools/transform/highlight.md @@ -57,7 +57,7 @@ A set of languages is passed as an object, with: * A function that defines the language as the value. ```javascript -const transform = require('@doc-tools/transform'); +const transform = require('@diplodoc/transform'); const customLang = require('./custom-lang'); const highlightLangs = { 'custom-lang': customLang }; diff --git a/en/tools/transform/index.md b/en/tools/transform/index.md index 65427f0..fa3314b 100644 --- a/en/tools/transform/index.md +++ b/en/tools/transform/index.md @@ -1,6 +1,6 @@ # Transformer -[@doc-tools/transform](https://www.npmjs.com/package/@doc-tools/transform) is a package for converting Yandex Flavored Markdown to HTML. +[@diplodoc/transform](https://www.npmjs.com/package/@diplodoc/transform) is a package for converting Yandex Flavored Markdown to HTML. Use it in your code to work with text during program execution. For example, to display user-generated content. @@ -15,17 +15,17 @@ Use it in your code to work with text during program execution. For example, to 1. Add the package in your code using the `require()` or `import()` function: ```javascript - const transform = require('@doc-tools/transform'); + const transform = require('@diplodoc/transform'); ``` 1. To ensure text is displayed properly, add CSS styles and client scripts to the project: ```css - @import '~@doc-tools/transform/dist/css/yfm.css'; + @import '~@diplodoc/transform/dist/css/yfm.css'; ``` ```javascript - import '@doc-tools/transform/dist/js/yfm'; + import '@diplodoc/transform/dist/js/yfm'; ``` ## Usage {#use} @@ -56,7 +56,7 @@ The package provides the `transform()` function: ```javascript const fs = require('fs'); -const transform = require('@doc-tools/transform'); +const transform = require('@diplodoc/transform'); const content = fs.readFileSync(filePath, 'utf'); const vars = { user: { name: 'Alice' } };