MarkdownDeep.SpanFormatter.SplitMarkToken C# (CSharp) Méthode

SplitMarkToken() public méthode

public SplitMarkToken ( List tokens, List marks, Token token, int position ) : Token
tokens List
marks List
token Token
position int
Résultat Token
        public Token SplitMarkToken(List<Token> tokens, List<Token> marks, Token token, int position)
        {
            // Create the new rhs token
            Token tokenRhs = CreateToken(token.type, token.startOffset + position, token.length - position);

            // Adjust down the length of this token
            token.length = position;

            // Insert the new token into each of the parent collections
            marks.Insert(marks.IndexOf(token) + 1, tokenRhs);
            tokens.Insert(tokens.IndexOf(token) + 1, tokenRhs);

            // Return the new token
            return tokenRhs;
        }