Difference between revisions of "Thread:Talk:Erasesentence/How to use this template"

From Theonomy Wiki
m (Protected "Thread:Talk:Erasesentence/How to use this template" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) [Post replies=Allow only administrators] (indefinite)))
m
 
Line 1: Line 1:
 
<noinclude>{{:Navleft|Templates Reference}}</noinclude>
 
<noinclude>{{:Navleft|Templates Reference}}</noinclude>
  
This template erases one or more sentences from the beginning of the first parameter, based upon the number specified in the second parameter (default 1).
+
This template erases one or more sentences from the beginning of the first parameter, based upon the number specified in the second parameter (default 1). It will insert the text of the third parameter in place of the erased sentence. Note that the matching algorithm will skip an initial &lt;span&gt; tag, and an initial spanned number (scripture verse), before erasing.  
  
 
The purpose is to be able to partially quote a verse of scripture, but allow for input from the different translations.
 
The purpose is to be able to partially quote a verse of scripture, but allow for input from the different translations.
Line 7: Line 7:
 
Example:
 
Example:
  
  <nowiki><sup>19</sup> {{:Erasesentence|{{#scripture:Exodus 34:19-20}}|1}}...</nowiki>
+
  <nowiki>{{:Erasesentence|{{#scripture:Exodus 34:19-20}}|1|...}}</nowiki>
  
 
Input:
 
Input:
Line 13: Line 13:
  
 
Output:
 
Output:
<sup>19</sup> ...{{:Erasesentence|{{#scripture:Exodus 34:19-20}}|1}}
+
{{:Erasesentence|{{#scripture:Exodus 34:19-20}}|1|...}}
  
  
 
See also: [[:Talk:Erasesentencefromend|Erasesentencefromend]] which does the same thing from the end of the input, and [[:Talk:Extractsentence|Extractsentence]] which allows extraction of one of the sentences in the input.
 
See also: [[:Talk:Erasesentencefromend|Erasesentencefromend]] which does the same thing from the end of the input, and [[:Talk:Extractsentence|Extractsentence]] which allows extraction of one of the sentences in the input.

Latest revision as of 13:19, 26 July 2020

Templates Reference

This template erases one or more sentences from the beginning of the first parameter, based upon the number specified in the second parameter (default 1). It will insert the text of the third parameter in place of the erased sentence. Note that the matching algorithm will skip an initial <span> tag, and an initial spanned number (scripture verse), before erasing.

The purpose is to be able to partially quote a verse of scripture, but allow for input from the different translations.

Example:

{{:Erasesentence|{{#scripture:Exodus 34:19-20}}|1|...}}

Input: 19 “All that opens the womb is mine; and all your livestock that is male, the firstborn of cow and sheep. 20 You shall redeem the firstborn of a donkey with a lamb. If you will not redeem it, then you shall break its neck. You shall redeem all the firstborn of your sons. No one shall appear before me empty. Exodus 34:19-20WEB

Output: 19 ... and all your livestock that is male, the firstborn of cow and sheep. 20 You shall redeem the firstborn of a donkey with a lamb. If you will not redeem it, then you shall break its neck. You shall redeem all the firstborn of your sons. No one shall appear before me empty. Exodus 34:19-20WEB


See also: Erasesentencefromend which does the same thing from the end of the input, and Extractsentence which allows extraction of one of the sentences in the input.