Skip to content

Position data included when verbose is false #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
Josmithr opened this issue Sep 27, 2024 · 3 comments
Closed
4 tasks done

Position data included when verbose is false #7

Josmithr opened this issue Sep 27, 2024 · 3 comments
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on

Comments

@Josmithr
Copy link

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

import { fromHtml } from "hast-util-from-html";

const htmlTree = fromHtml("This is some <b>bold</b> text!", { fragment: true, verbose: false });

Expected behavior

The expected output should not contain position information, per the documentation on the verbose parameter, but it does.

Actual behavior

Position information included in generated HAST tree.

Affected runtime and version

[email protected]

Affected package manager and version

[email protected]

Affected OS and version

Linux

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 27, 2024
@wooorm
Copy link
Member

wooorm commented Sep 30, 2024

That is intentional.
You can remove positional info if you want: https://github.com/syntax-tree/unist-util-remove-position.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024

This comment has been minimized.

@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Sep 30, 2024
@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Sep 30, 2024
@wooorm
Copy link
Member

wooorm commented Sep 30, 2024

The important parts in the docs are: “Add extra positional info about attributes, start tags, and end tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants