Line_end ( int) – Final line (default: None) Position ( *, line_start: int, line_end: int = None, uri: str = None, data: dict = NOTHING ) ¶ĭataclass to store positional data of tokens, in relation to the source text. Without actually advancing the line index. Revert the line index to the set anchor (or 0). Set an anchor for resetting the line index. StopIteration if reached the end of the source lines. Progress the line index and return the line. Return the line number in the source text Line_end_pattern = re.compile('.*(\n|\r)$') ¶ property lineno ¶ Metadata – any metadata associated with the lines Standardize_ends – standardize all lines to end with \n Start_line – the position of the initial line within the full source text. SourceLines ( lines: Union], start_line: int = 0, standardize_ends: bool = False, uri: Optional = None, metadata: Optional = None ) ¶Ī class for storing source lines and tracking current line index. Other Elements ¶ class mistletoe.base_elements. classmethod find ( string: str ) ¶įind all tokens, matching a pattern in the given string Take a pattern match and return the instatiated token. Position – span position within the source textĬlassmethod read ( match: Pattern ) ¶ Pattern = None ¶ parse_inner = True ¶ parse_group = 1 ¶ precedence = 5 ¶ _init_ ( *, content: Optional = None, children: Optional = None, position: Tuple = None ) ¶Ĭontent – raw string content of the token Precedence – Alter the relative order by which the span token is assessed. Parse_group – the group within the pattern match corresponding to the content Parse_inner – whether to do a nested parse of the content SpanToken ( *, content: Optional = None, children: Optional = None, position: Tuple = None ) ¶īase class for span-level tokens. Span Token ¶ class mistletoe.base_elements. Takes the rest of the lines in the document as an classmethod read ( lines: mistletoe.base_elements.SourceLines ) → Optional ¶ Start function (see block_tokenizer.tokenize_main). Returns a boolean representing whether that line marks the start Takes a line from the document as argument, and See SourceLines.anchor,Ĭlassmethod start ( line: str ) → bool ¶ If BlockToken.read returns None, the read result is ignored,īut the token class is responsible for resetting the iterator Note that BlockToken.read returns a token (or None). Iterator (including the start line), and consumes all the lines Start function (see block_tokenizer.tokenize).īlockToken.read takes the rest of the lines in the document as an Every subclass of BlockToken must define a Span-level tokens and block-level tokens) īlockToken.start takes a line from the document as argument,Īnd returns a boolean representing whether that line marks the start (thus if a token has children attribute, it is not a leaf node if a tokenĬalls tokenize_span, it is the boundary between Lines denotes a list of (possibly unparsed) input lines,Īnd is commonly used as the argument name for constructors.īlockToken.children is a list with all the inner tokens BlockToken ¶īase class for block-level tokens. It doesn’t cover all our costs, but it does help, and you get a proper support channel and a bunch of other cool plugin related code.Block Token ¶ class mistletoe.base_elements. It’s because of their support that you get all this for free, so if you use the plugin and know someone who sponsors, make sure to buy them a round.Īnd if you can, please consider sponsoring. Thanks again to all the people and companies that sponsor the plugin. The documentation will be updated in the next few days, I’ll post another note here when it’s done. And BE_ImportFile for importing files into containers – you can do this in the client, but now you can also do it on the server via the plugin. There’s the ability to evaluate JavaScript inside the plugin, which opens a whole world of possibilities. There’s a ConvertContainer for turning a file to a picture and vice versa, so no more exporting and re-importing. This version removes support for Windows XP, so be aware of that if you’re running older OS versions.īut in return you get SMTP along with JPEG compression for reducing container picture sizes. This is a huge release, lots of cool new features. And one more release note, we’ve updated the free BaseElements Plugin to 3.1.0.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |