Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git
M src/main/java/com/keenwrite/processors/text/TextReplacementFactory.java
22
package com.keenwrite.processors.text;
33
4
import com.keenwrite.util.Strings;
5
46
import java.util.Map;
57
...
3133
   * recursively defined values must have been interpolated previously.
3234
   *
33
   * @param haystack The text containing zero or more variables to replace.
34
   * @param needles  The map of variables to their dereferenced values.
35
   * @param text    The text containing zero or more variables to replace.
36
   * @param needles The map of variables to their dereferenced values.
3537
   * @return The text with all variables replaced.
3638
   */
3739
  public static String replace(
38
    final String haystack, final Map<String, String> needles ) {
39
    assert haystack != null;
40
    final String text, final Map<String, String> needles ) {
41
    final String haystack = Strings.sanitize( text );
4042
    assert needles != null;
4143