You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was walking by, and while I didn't read through the entire thing I wanted to say this. There were a few features added to the core at users' requests when it was all small an nimble. These days I would say it makes much more sense to be opinionated and remove corner cases like useBR, tabWidth and several different spellings of "lang-", "language-" as language prefixes in the class name (as far as I remember there is a very precise recommendation in HTML5 to use "language-"). Everyone with special cases would be expected to do pre- or post-processing.
Very early on we were perhaps a bit too open and allowed some things to slip into core that perhaps should not have - and today they are also things that could easily be handled with our new plugin API.
v10.5 Deprecate tabReplace
Provide plugin?
v11 Remove tabReplace
Plugin Code
Consider: Before resorting to this you should probably consider the much simpler CSS tab-size property.
constTAB_REPLACE_RE=/^(<[^>]+>|\t)+/gm;consttabReplacePlugin={"after:highlightBlock": ({ result })=>{result.value=result.value.replace(TAB_REPLACE_RE,(m)=>m.replace(/\t/g,options.tabReplace));}};// how to use ithljs.addPlugin(tabReplacePlugin);
The text was updated successfully, but these errors were encountered:
From isagalaev in #2529:
Very early on we were perhaps a bit too open and allowed some things to slip into core that perhaps should not have - and today they are also things that could easily be handled with our new plugin API.
tabReplace
tabReplace
Plugin Code
Consider: Before resorting to this you should probably consider the much simpler CSS
tab-size
property.The text was updated successfully, but these errors were encountered: