2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
bbob/.changeset/tiny-dolls-raise.md
T
Nikolay Kost 0566241e23 feat(#271): whitespaceInTags mode (#272)
* fix: test for buggy behavior

* feat: implement whitespaceInTags mode

* feat: move all char arrays to Map

* feat: revert Map for char arrays
2025-03-09 02:23:03 +02:00

695 B

@bbob/parser, @bbob/types, @bbob/cli, @bbob/core, @bbob/html, @bbob/plugin-helper, @bbob/preset, @bbob/preset-html5, @bbob/preset-react, @bbob/preset-vue, @bbob/react, @bbob/vue2, @bbob/vue3
@bbob/parser @bbob/types @bbob/cli @bbob/core @bbob/html @bbob/plugin-helper @bbob/preset @bbob/preset-html5 @bbob/preset-react @bbob/preset-vue @bbob/react @bbob/vue2 @bbob/vue3
minor minor minor minor minor minor minor minor minor minor minor minor minor

Added whitespaceInTags parsing option (true by default) with this option you can disable parsing [tags with spaces] it will be considered as text

import html5 from '@bbob/preset-html5'
import parse from '@bbob/html'

const html = parse('[b]lorem[/b] [foo bar] [i]ipsum[/i]', html5(), {
  whitespaceInTags: false
})

console.log(html) // <b>lorem </b> [foo bar] <i>ipsum</i>