Returns the line number or text ID of a todo (depends on the
        configuration.
343522
def number(self, p_todo):
        
        if config().identifiers() == "text":
            return self.uid(p_todo)
        else:
            return self.linenumber(p_todo)
841610
def get_relativelinenumbertable(self):
        

        lnt = self.get_linenumbertable()
        if lnt:
            lineoff = lnt[0][1]
            return tuple((o, l - lineoff) for (o, l) in lnt)
        else:
            return tuple()
1154206
function getPos(lines, lineNum, code, indicator) {

	var line, min, max, dots = false, prefix = 0;
	var pos = {};

	// console.log('code', code);

	// handle special cases
	if (code === '{{{{') {
		pos.min = 0;
		pos.max = 4;
		return pos;
	} else if (code === '{{{') {
		pos.min = 0;
		pos.max = 3;
		return pos;
	} else  if (code === '{{') {
		pos.min = 0;
		pos.max = 2;
		return pos;
	} else if (code.indexOf('{{<') !== -1) {
		pos.min = lines[lineNum].indexOf('{{<');
		pos.max = pos.min + 3;
		return pos;
	} else if (code === '{{}}') {
		pos.min = 0;
		pos.max = 4;
		return pos;
	} else if (code.indexOf('{{{}}{') !== -1) {
		pos.min = lines[lineNum].indexOf('{{{}}}');
		pos.max = pos.min + 6;
		return pos;
	} else if (code.indexOf('{{#}}') !== -1) {
		pos.min = lines[lineNum].indexOf('{{#}}');
		pos.max = pos.min + 5;
		return pos;
	}

	// trim off extra prefix and suffix from code which
	// could force us to not find the pos in the line.
	code = code.substring(0, indicator.length);
	code = code.replace('...', function() {
		dots = true;
		return '';
	});

	prefix = code.indexOf('{{');
	line = lines[lineNum];
	min = line.indexOf(code);
	min = min + prefix;
	max = (!dots)
		? min + indicator.length - 1
		: min + indicator.length - 4;

	// todo: if (min === max) max = findMax(line, min); // find first ' ' or '}'
	if (min === max) max++;

	if (min === -1) {
		return {
			min: 0,
			max: 1
		};
	} else {
		return {
			min: min,
			max: max
		};
	}
}
443862
def get_identifier(self):
        
        if 'disqus_identifier' in self.options:
            return self.options['disqus_identifier']

        title_nodes = self.state.document.traverse(nodes.title)
        if not title_nodes:
            raise DisqusError('No title nodes found in document, cannot derive disqus_identifier config value.')
        return title_nodes[0].astext()
677949
public static int getLineNumber(String text, int posChar) {

	int len = Math.min(posChar, text.length());
	int result = 1;

	for (int i = 0; i < len; i++) {

	    if (text.charAt(i) == '\n') result++;
	}

	return result;
    }
1091077
def _get_id_format(self):
        
        id_format = gf.safe_get(
            self.parameters,
            gc.PPN_TASK_OS_FILE_ID_REGEX,
            self.DEFAULT_ID_FORMAT,
            can_return_none=False
        )
        try:
            identifier = id_format % 1
        except (TypeError, ValueError) as exc:
            self.log_exc(u"String '%s' is not a valid id format" % (id_format), exc, True, ValueError)
        return id_format
282709
public String getHelp() {
		StringBuilder sb = new StringBuilder(data.size() * HELP_TEXT_LENGTH_PER_PARAM);

		sb.append("Required Parameters:");
		sb.append(HELP_TEXT_LINE_DELIMITER);

		for (Option o : data.values()) {
			sb.append(this.helpText(o));
		}
		sb.append(HELP_TEXT_LINE_DELIMITER);

		return sb.toString();
	}
530356
function determineTitle(title, notitle, lines, info) {
  var defaultTitle = '**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*';

  if (notitle) return '';
  if (title) return title;
  return info.hasStart ? lines[info.startIdx + 2] : defaultTitle;
}
1374827
def listnum(lines, id, caption, lang = nil)
      first_line_num = line_num
      if highlight_listings?
        common_code_block_lst(id, lines, 'reviewlistnumlst', 'caption', caption, lang, first_line_num: first_line_num)
      else
        common_code_block(id, lines, 'reviewlist', caption, lang) { |line, idx| detab((idx + first_line_num).to_s.rjust(2) + ': ' + line) + "\n" }
      end
    end
1331284
def markdownify_operative_config_str(string):
  """"""

  # TODO(b/37527917): Total hack below. Implement more principled formatting.
  def process(line):
    """Convert a single line to markdown format."""
    if not line.startswith('#'):
      return '    ' + line

    line = line[2:]
    if line.startswith('===='):
      return ''
    if line.startswith('None'):
      return '    # None.'
    if line.endswith(':'):
      return '#### ' + line
    return line

  output_lines = []
  for line in string.splitlines():
    procd_line = process(line)
    if procd_line is not None:
      output_lines.append(procd_line)

  return '\n'.join(output_lines)
674907
def get_line_at(self, coordinates):
        """"""
        cursor = self.cursorForPosition(coordinates)
        cursor.select(QTextCursor.BlockUnderCursor)
        return to_text_string(cursor.selectedText()).replace(u'\u2029', '')
895971
function getActualLineIndentText(line) {
            let actualText = actualLineIndentTexts.get(line)
            if (actualText === undefined) {
                const lineText = getLineText(line)
                const index = lineText.search(/\S/u)
                if (index >= 0) {
                    actualText = lineText.slice(0, index)
                } else {
                    actualText = lineText
                }
                actualLineIndentTexts.set(line, actualText)
            }
            return actualText
        }
150502
def gettextdelimiter(self, retaintokenisation=False):
        """"""
        for e in self:
            if isinstance(e, New) or isinstance(e, Current):
                return e.gettextdelimiter(retaintokenisation)
        return ""
1022916
def get_ID_text(token):
    
    if isinstance(token, CommonToken):
        text = token.text
    else:
        text = token.getText()

    text = text.lstrip('\\')
    return text
299621
@DefinedBy(Api.COMPILER)
    public long getLineNumber() {
        if (sourcePosition == null) {
            sourcePosition = new SourcePosition();
        }
        return sourcePosition.getLineNumber();
    }
931388
def get_line_number(line_map, offset):
    """"""
    for lineno, line_offset in enumerate(line_map, start=1):
        if line_offset > offset:
            return lineno
    return -1
1026125
public int getLine()
  {
    if (_line >= 0)
      return _line;

    Attribute attr = getAttribute("LineNumberTable");

    if (attr == null) {
      _line = 0;
      return _line;
    }

    _line = 0;
    return _line;
  }