Difference between revisions of "Template:PrintFirstParagraph"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to extract the first paragraph from a given text. '''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely r...")
 
Line 8: Line 8:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#if: {{#pos: {{{vartext|}}}|&#013;}}<!--
+
-->{{#if: {{#pos_e: {{{vartext|}}}|\n}}<!--
   -->|{{#explode:{{{vartext|}}}|&#013;|0}}<!-- if there are two or more paragraphs
+
   -->|{{#explode_e:{{{vartext|}}}|\n|0}}<!-- if there are two or more paragraphs
 
   -->|{{{vartext|}}}<!-- if there is one paragraph or less  
 
   -->|{{{vartext|}}}<!-- if there is one paragraph or less  
 
-->}}<!-- if
 
-->}}<!-- if
 
--></includeonly>
 
--></includeonly>

Revision as of 23:25, 14 March 2018

This template is used to extract the first paragraph from a given text.

NOTE: As any "printing" template, it doesn't store any values anywhere, but merely returns them.

Parameters:

  • |vartext= - the text to extract the first paragraph from.