From: Dave P. <dav...@gm...> - 2016-05-19 06:49:39
|
On 19 May 2016 at 02:43, Daniel Miller <dm...@am...> wrote: > 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. > 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? An xpath tool, only if the generated html is well formed. the real problem is isolating the span from others? There appears to be no class attribute to differentiate it from other spans? If you can change it to <span class="special"> then it is easy. An identity transform with a template matching the very first span with that class attribute. <xsl:template match="span[@class='special']"/> which will remove it... It may well be easier to remove it where it is generated? I.e. remove the source of the problem, not a symptom? HTH -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk |