invicticide / fractive

Fractive is a free, open-source, Markdown-based hypertext authoring tool for writing interactive fiction.
http://fractive.io
Other
37 stars 5 forks source link

Heading-styled links #91

Closed NQNStudios closed 6 years ago

NQNStudios commented 6 years ago

What happened

When an inline link is in a heading, like so:

### [Link]({@Whatever:inline})

The html is generated with the link inside the header declaration, so that formatting is automatically applied to whatever is expanded. If what's expanded is a section, the text size of the inner paragraphs returns to normal, but the letters will be all-caps because the font will still be the header font.

Expected behavior

I don't think format of links should be preserved around anything expanded inline in their place. Any other formatting done on a link could be included inside the brackets and thus will be wiped when replacement happens, but because of Markdown syntax you can't put header formatting inside link brackets and the <h3> will always be generated outside the <a>. So, I think in this edge case of link formatting, the compiler should rearrange the tags so the <h3> is inside the <a> and not vice-versa.