@textlint/markdown-to-ast
Advanced tools
Comparing version 12.1.1 to 12.2.0
@@ -44,2 +44,4 @@ "use strict"; | ||
const position = node.position; | ||
// line start with 1 | ||
// column start with 0 | ||
const positionCompensated = { | ||
@@ -46,0 +48,0 @@ start: { line: position.start.line, column: Math.max(position.start.column - 1, 0) }, |
@@ -38,2 +38,4 @@ import { SyntaxMap } from "./mapping/markdown-syntax-map"; | ||
const position = node.position; | ||
// line start with 1 | ||
// column start with 0 | ||
const positionCompensated = { | ||
@@ -40,0 +42,0 @@ start: { line: position.start.line, column: Math.max(position.start.column - 1, 0) }, |
{ | ||
"name": "@textlint/markdown-to-ast", | ||
"version": "12.1.1", | ||
"version": "12.2.0", | ||
"description": "Parse Markdown to AST with location info.", | ||
@@ -32,3 +32,3 @@ "homepage": "https://github.com/textlint/textlint/tree/master/packages/@textlint/markdown-to-ast/", | ||
"example:build": "browserify example/js/index.js -o example/app/app.js", | ||
"prepublish": "npm run --if-present build", | ||
"prepack": "npm run --if-present build", | ||
"test": "mocha \"test/**/*.ts\"", | ||
@@ -39,4 +39,4 @@ "updateSnapshot": "npm run build && node tools/update-fixtures.js", | ||
"dependencies": { | ||
"@textlint/ast-node-types": "^12.1.1", | ||
"debug": "^4.3.3", | ||
"@textlint/ast-node-types": "^12.2.0", | ||
"debug": "^4.3.4", | ||
"remark-footnotes": "^3.0.0", | ||
@@ -50,5 +50,5 @@ "remark-frontmatter": "^3.0.0", | ||
"devDependencies": { | ||
"@textlint/ast-tester": "^12.1.1", | ||
"@textlint/ast-tester": "^12.2.0", | ||
"@types/mocha": "^8.2.3", | ||
"@types/node": "^14.18.12", | ||
"@types/node": "^14.18.21", | ||
"@types/traverse": "^0.6.32", | ||
@@ -58,6 +58,6 @@ "browserify": "^16.5.2", | ||
"mkdirp": "^1.0.4", | ||
"mocha": "^9.2.1", | ||
"mocha": "^9.2.2", | ||
"power-assert": "^1.6.1", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^10.5.0", | ||
"ts-node": "^10.8.1", | ||
"ts-node-test-register": "^10.0.0", | ||
@@ -69,3 +69,3 @@ "typescript": "^4.4.4" | ||
}, | ||
"gitHead": "b9a94b850b8303b84a530fd88ad712b03e4d7762" | ||
"gitHead": "e14b6e6ae685dabfca3c8c3f2a33c2029fce8724" | ||
} |
@@ -40,2 +40,4 @@ import { SyntaxMap } from "./mapping/markdown-syntax-map"; | ||
const position = node.position; | ||
// line start with 1 | ||
// column start with 0 | ||
const positionCompensated = { | ||
@@ -45,3 +47,3 @@ start: { line: position.start.line, column: Math.max(position.start.column - 1, 0) }, | ||
}; | ||
const range = [position.start.offset, position.end.offset] as [number, number]; | ||
const range = [position.start.offset, position.end.offset] as const; | ||
node.loc = positionCompensated; | ||
@@ -48,0 +50,0 @@ node.range = range; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32343
449
Updateddebug@^4.3.4