gtx-cli 2.1.12 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.1.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#620](https://github.com/generaltranslation/gt/pull/620) [`1404b8f`](https://github.com/generaltranslation/gt/commit/1404b8feda21acdfba42483d496c61816babd327) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Display warning on MDX header mismatch instead of failure
|
|
8
|
+
|
|
3
9
|
## 2.1.12
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ import remarkMdx from 'remark-mdx';
|
|
|
4
4
|
import remarkFrontmatter from 'remark-frontmatter';
|
|
5
5
|
import remarkStringify from 'remark-stringify';
|
|
6
6
|
import { visit } from 'unist-util-visit';
|
|
7
|
-
import {
|
|
7
|
+
import { logWarning } from '../console/logging.js';
|
|
8
8
|
/**
|
|
9
9
|
* Generates a slug from heading text
|
|
10
10
|
*/
|
|
@@ -89,7 +89,7 @@ export function addExplicitAnchorIds(translatedContent, sourceHeadingMap, settin
|
|
|
89
89
|
const translatedFile = translatedPath
|
|
90
90
|
? `translated file: ${translatedPath}`
|
|
91
91
|
: 'translated file';
|
|
92
|
-
|
|
92
|
+
logWarning(`Header count mismatch detected! ${sourceFile} has ${sourceHeadingMap.length} headers but ${translatedFile} has ${translatedHeadings.length} headers. ` +
|
|
93
93
|
`This likely means your source file was edited after translation was requested, causing a mismatch between ` +
|
|
94
94
|
`the number of headers in your source file vs the translated file. Please re-translate this file to resolve the issue.`);
|
|
95
95
|
}
|