Skip to content

Commit

Permalink
Remove undocument position option
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 30, 2021
1 parent f160b63 commit c7965b3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
5 changes: 1 addition & 4 deletions packages/rehype-parse/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @typedef {Partial<Record<ErrorCode, ErrorSeverity>>} ErrorFields
*
* @typedef ParseFields
* @property {boolean|undefined} [position=true]
* @property {boolean|undefined} [fragment=false]
* Specify whether to parse a fragment, instead of a complete document.
* In document mode, unopened `html`, `head`, and `body` elements are opened
Expand Down Expand Up @@ -41,8 +40,6 @@ const fatalities = {2: true, 1: false, 0: null}
export default function rehypeParse(options) {
const processorSettings = /** @type {Options} */ (this.data('settings'))
const settings = Object.assign({}, options, processorSettings)
const position =
typeof settings.position === 'boolean' ? settings.position : true

Object.assign(this, {Parser: parser})

Expand All @@ -51,7 +48,7 @@ export default function rehypeParse(options) {
const fn = settings.fragment ? 'parseFragment' : 'parse'
const onParseError = settings.emitParseErrors ? onerror : null
const parse5 = new Parser5({
sourceCodeLocationInfo: position,
sourceCodeLocationInfo: true,
onParseError,
scriptingEnabled: false
})
Expand Down
4 changes: 0 additions & 4 deletions test/fixtures/position-false/config.json

This file was deleted.

1 change: 0 additions & 1 deletion test/fixtures/position-false/index.html

This file was deleted.

23 changes: 0 additions & 23 deletions test/fixtures/position-false/index.json

This file was deleted.

0 comments on commit c7965b3

Please sign in to comment.