Cookbook /
ReverseHeadings-Users
If you use or used the ReverseHeadings recipe, you can add yourself in the list below. These statistics may help newcomers to select recipes for their wikis. Both (+) positive and (-) negative short comments are welcome. For longer comments or questions please use the ReverseHeadings-Talk page.
Users
You can edit this page and add your name.
- (+/-) Your comment here. Your name or profile link here.
- (+) Peter Kay says: the way the recipe is written, one ! gives <h6>, which is (for my browsers anyway) just plain text. I would rather have ! go to <h5> and not use <h6> at all.
So I use:
Markup('^!', 'block', '/^(!{1,6})(.*)$/e', "'<:block><h'.(6-strlen('$1')).PSS('>$2</h').(6-strlen('$1')).'>'");
If you'd rather anything more than 5 !s also be <h1> ( so !!!!! on up ):
Markup('^!', 'block', '/^(!+)(.*)$/e', "'<:block><h'.(strlen('$1')<5?6-strlen('$1'):1).PSS('>$2</h').(strlen('$1')<5?6-strlen('$1'):1).'>'");
Glad to have this - it's more intuitive for me!
Thanks!
User notes for the ReverseHeadings recipe (talk).