Skip to content

feat!: remove ddIndent from state_block#20

Closed
Mister-Hope wants to merge 1 commit into
serkodev:mainfrom
Mister-Hope:main
Closed

feat!: remove ddIndent from state_block#20
Mister-Hope wants to merge 1 commit into
serkodev:mainfrom
Mister-Hope:main

Conversation

@Mister-Hope
Copy link
Copy Markdown
Contributor

@serkodev
Copy link
Copy Markdown
Owner

serkodev commented Dec 3, 2025

Thanks for the PR.

Although I agree that this prop is currently unused, at this stage I think we should keep it to maintain backward compatibility with the markdown-it plugin.

As you can see in the plugin, it checks if (state.ddIndent < 0) { return false }, and since undefined < 0 evaluates to false, removing the prop would change the existing behavior.

@serkodev serkodev closed this Dec 3, 2025
@Mister-Hope
Copy link
Copy Markdown
Contributor Author

Yeah, indeed it will break the existing deflist plugin, however it would not break @mdit/plugin-dl: https://www.npmjs.com/package/@mdit/plugin-dl

The existing official plugin is not aligned to PanDoc deflist, see markdown-it/markdown-it-deflist#18 (which I haven't raised a pr yet because the latter one is not merged for months) and markdown-it/markdown-it-deflist#11

@serkodev
Copy link
Copy Markdown
Owner

serkodev commented Dec 3, 2025

Thanks for investigating this and for raising the issue. I also agree that it would be ideal to remove unused props. However, as I mentioned, for the sake of backward compatibility, we won’t be removing it at this stage.

Additionally, I believe the impact of having this extra prop for now is non-breaking. I hope you can understand. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants