i18n-smell-detector 0.5.1 → 0.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-smell-detector",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Find copied locale values, placeholder mismatches, and hardcoded user-visible strings.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -116,10 +116,6 @@ export async function runCli(argv) {
116
116
  return;
117
117
  }
118
118
 
119
- if (!['check-identical', 'check-hardcoded', 'check-placeholders', 'check'].includes(options.command)) {
120
- throw new Error(`Unknown command: ${options.command}\n${HELP}`);
121
- }
122
-
123
119
  const configPath = await resolveConfigPath(options.configPath, process.cwd());
124
120
  const config = await loadConfig(configPath);
125
121
  const effectiveConfig = {
@@ -1,7 +1,11 @@
1
1
  import { summarizeIssues } from './summary.js';
2
2
 
3
3
  function escapeCell(value) {
4
- return String(value).replace(/\\/g, '\\\\').replace(/\|/g, '\\|').replace(/\n/g, '<br>');
4
+ return String(value)
5
+ .replace(/\r?\n/g, ' ')
6
+ .replace(/\\/g, '\\\\')
7
+ .replace(/\|/g, '\\|')
8
+ .replace(/[*_`[\]]/g, '\\$&');
5
9
  }
6
10
 
7
11
  export function renderMarkdownReport(issues, options) {