From: Daniel M. <dm...@am...> - 2016-05-19 01:43:49
|
I found a legacy extension that generates simple pullquotes (mdx_pullquote). A couple of minor tweaks and it is compatible with current Markdown/Pelican versions. This works quite well - except for one item. The generated html from the processing (Markdown is used as a preprocessor for Pelican for generating html) places each paragraph in a <p> (which is correct) and delimits the appropriate text with a <span> within the paragraph. The problem is because the <span> appears within the paragraph, and it appears wherever the text is defined - vertical placement of the span is limited. If that's not clear I have a fiddle at https://jsfiddle.net/HeavyThumper/e4e01p0h/ that shows a sample generated html. What I would like is to have the selected text copied to a <span> or <div> that is declared before and outside of the base <p>. Simple example: Markdown source: This is the base text. This can be very long. [This is special](+). The delimeters shown are what the current plugin uses with a inlinepattern. Current output html using only inlinepattern: <p>This is the base text. This can be very long. <span data-pullquote="This is special">This is special</span>. The delimeters shown are what the current plugin uses with a inlinepattern.</p> Desired output html using...(here's where I need help) <span>This is special</span> <p>This is the base text. This can be very long. This is special. The delimeters shown are what the current plugin uses with a inlinepattern.</p> What extension tool would possibly work for this? Treeprocessor? -- Daniel |