-
Notifications
You must be signed in to change notification settings - Fork 3
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
{toc} seems to be broken #7
Comments
Can't look into it right this minute, but can you share the .bm source too? At least a paragraph or two before and after the {toc}
I've had problems with it too. But never tried very hard to fix.
On July 14, 2019 8:54:40 PM GMT+02:00, Aadi Bajpai <notifications@github.com> wrote:
[image]<https://user-images.githubusercontent.com/27063113/61188002-a381aa80-a696-11e9-8fee-9e17e4d0279c.png>
Output of meta/<post_id>/toc
- <a href='#1-choose-your'>1. Choose your org early.</a>
- <a href='#2-get-acquainted'>2. Get acquainted with how version control works.</a>
- <a href='#3-quality-over'>3. Quality over quantity would be the way to go except...</a>
- <a href='#4-try-to'>4. Try to make life easier for your org.</a>
- <a href='#5-don’t-restrict'>5. Don’t restrict yourself to tasks.</a>
- <a href='#6-try-to'>6. Try to get really involved.</a>
- <a href='#7-last-but'>7. Last but not the least, be nice be respectful.</a>
- <a href='#useful-links'>Useful Links-</a>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#7?email_source=notifications&email_token=ACIY3NSKR56NX3B4PQIGIO3P7NY7BA5CNFSM4IDRWQ32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7DFLXA>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACIY3NVCWX3LIEOBPO3ASZTP7NY7BANCNFSM4IDRWQ3Q>.
…--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
No problems,
|
Alright think I figured it out. This is notes for myself, but will include a work around for you that you may or may not like. The TOC generating function ...
(among other complexity I don't remember the purpose for at this time) When you don't start with a '# foo' but start with '### foo', that's an h3 tag not h1, which means the markdown will see:
which it interprets as a block of code. But if the tree of headings was properly started with an h1 with h2 children (with h3 children [with h4 children ...]), it should be parsed by markdown as lists of lists of lists as intended. So there's the problem, I think. The fix is ... to fix that. Somehow. I'll think about it more when I can. The workaround is to use h1 headings (a single '#') as """intended""" and to use CSS to make them smaller if you don't like how big they are. I'm guessing their size is why you added '#' chars. You could also try:
(bolding a line by itself as "headings") |
That makes sense, and yes, I used h3 because of the size. I think the fix would be to calculate the number of spaces relative to the tags accrued. That is, the relative hierarchy should be taken into accord, the place value instead of the face value. I'd try but my shell scripts are wonky at best. I actually was using bold text previously but replaced them since I figured they wouldn't be parsed by the toc generator. |
Oh ... yeah. Of course. They wouldn't.
Seems promising. What would you expect to happen with:
Actually, while nonsensical, the following HTML renders reasonably in Chrome and Firefox.
Maybe the fix won't be so hard ........ |
Output of meta/<post_id>/toc
The text was updated successfully, but these errors were encountered: