Parsoid
A bidirectional parser between wikitext and HTML5
|
▼NWikimedia | Class RangeBuilderException Thrown when a DOMRangeBuilder encounters an unexpected state \Parsoid\Wt2Html\DOM\Processors |
▼NParsoid | |
►NConfig | |
►NApi | |
CApiHelper | |
CDataAccess | DataAccess via MediaWiki's Action API |
CEnv | An Env accessing MediaWiki via its Action API |
CPageConfig | PageConfig via MediaWiki's Action API |
CSiteConfig | SiteConfig via MediaWiki's Action API |
CDataAccess | MediaWiki data access abstract class for Parsoid |
CEnv | Environment/Envelope class for Parsoid |
CPageConfig | Page-level configuration interface for Parsoid |
CPageConfigFactory | Marker interface for a PageConfig factory defined in core |
CPageContent | Page content data object |
CProfile | Records time profiling information |
CSiteConfig | Site-level configuration interface for Parsoid |
CStubMetadataCollector | Minimal implementation of a ContentMetadataCollector which just records all metadata in an array |
►NCore | General token sanitizer |
CClientError | Exception thrown on invalid client requests |
CContentMetadataCollector | Interface for collecting the results of a parse |
CContentMetadataCollectorStringSets | Registry of flags used with ContentMetadataCollector::appendOutputStrings() |
CContentModelHandler | |
CDomPageBundle | A page bundle stores an HTML DOM with separated data-parsoid and data-mw content |
CDomSourceRange | Represents a DOM source range |
CElementRange | A simple pair of DOM elements |
CInternalException | Parsoid internal error that we don't know how to recover from |
CLinkTarget | Represents the target of a wiki link |
CMediaStructure | All media should have a fixed structure: |
CPageBundle | A page bundle stores an HTML string with separated data-parsoid and (optionally) data-mw content |
CResourceLimitExceededException | Parsoid resource limit exception |
CSanitizer | |
CSectionMetadata | Section metadata for generating TOC |
CSelectiveUpdateData | Data that's necessary for selective updates (whether html->wt or wt->html) |
CSelserData | TODO: Kept around for backwards compatibilty with uses outside this repo |
CTOCData | Table of Contents data, including an array of section metadata |
►NDOM | |
CAttr | |
CCharacterData | |
CComment | |
CDocument | |
CDocumentFragment | |
CDocumentType | |
CElement | |
CNode | |
CProcessingInstruction | |
CText | |
►NExt | |
►NGallery | |
CGallery | Implements the php parser's renderImageGallery natively |
CMode | |
CNoLinesMode | |
COpts | |
CPackedHoverMode | |
CPackedMode | |
CPackedOverlayMode | |
CParsedLine | |
CSlideshowMode | |
CTraditionalMode | |
►NIndicator | |
CIndicator | Implements the php parser's indicator hook natively |
►NJSON | |
CJSON | Native Parsoid implementation of the "json" contentmodel |
►NLST | |
CLST | |
►NNowiki | |
CNowiki | Nowiki treats anything inside it as plain text |
►NPre | |
CPre | The <pre> extension tag shadows the html pre tag, but has different semantics |
CAnnotationStripper | A Parsoid extension module defining annotations should define an AnnotationStripper that allows Parsoid to strip annotation markup from an arbitrary string, typically in the content of non-wikitext extensions (such as SyntaxHighlight) in the wt2html direction |
CDiffDOMUtils | |
CDiffUtils | |
CDOMDataUtils | This class provides DOM data helpers needed by extensions |
CDOMProcessor | A Parsoid extension module may contain one or more DOMProcessors, which allow Parsoid to post-process the DOM in the wt2html direction, or pre-process the DOM in the html2wt direction |
CDOMUtils | This class provides DOM helpers useful for extensions |
CExtensionError | Exception thrown to halt extension tag content parsing and produce standard error output |
CExtensionModule | A Parsoid native extension module |
CExtensionTag | Wrapper so that the internal token isn't exposed |
CExtensionTagHandler | A Parsoid extension module may register handlers for one or more extension tags |
CParsoidExtensionAPI | Extensions are expected to use only these interfaces and strongly discouraged from calling Parsoid code directly |
CPHPUtils | This class contains sundry helpers unrelated to core Parsoid |
CUtils | This class provides sundry helpers needed by extensions |
CWTSUtils | |
CWTUtils | This class provides helpers needed by extensions |
►NFragments | |
CDomPFragment | An atomic fragment represented as a (prepared and loaded) DOM tree |
CHtmlPFragment | An atomic fragment represented as an HTML string with inline data attributes, not necessarily balanced |
CLiteralStringPFragment | A fragment comprised of a literal string, which will be protected from future processing and will be appropriately escaped when embedded in HTML |
CPFragment | A PFragment is a MediaWiki content fragment |
CStripState | An abstraction/generalization of "strip state" from mediawiki core |
CWikitextPFragment | A non-atomic fragment comprised of a wikitext string and a strip state |
►NHtml2Wt | |
►NConstrainedText | |
CAutoURLLinkText | An autolink to an external resource, like http://example.com |
CConstrainedText | A chunk of wikitext output |
CExtLinkText | An external link, like [http://example.com] |
CLanguageVariantText | Language Variant markup, like -{ ... }- |
CMagicLinkText | An autolink to an RFC/PMID/ISBN, like RFC 1234 |
CRegExpConstrainedText | This subclass allows specification of a regular expression for acceptable (or prohibited) leading (and/or trailing) contexts |
CResult | |
CState | |
CWikiLinkText | An internal wiki link, like [[Foo]] |
►NDOMHandlers | |
CAHandler | |
CBodyHandler | |
CBRHandler | |
CCaptionHandler | |
CDDHandler | |
CDOMHandler | HTML -> Wikitext serialization relies on walking the DOM and delegating the serialization requests to different DOM nodes |
CDOMHandlerFactory | Factory for picking the right DOMHandler for a DOM element |
CDTHandler | |
CEncapsulatedContentHandler | |
CFallbackHTMLHandler | Used as a fallback in other tag handles |
CFigureHandler | |
CHeadingHandler | |
CHRHandler | |
CHTMLPreHandler | |
CImgHandler | |
CJustChildrenHandler | |
CLIHandler | |
CLinkHandler | |
CListHandler | |
CMediaHandler | |
CMetaHandler | |
CPHandler | |
CPreHandler | |
CQuoteHandler | |
CSpanHandler | |
CTableHandler | |
CTDHandler | |
CTHHandler | |
CTRHandler | |
CDiffMarkers | |
CDiffUtils | |
CDOMDiff | A DOM diff helper class |
CDOMNormalizer | DOM normalization |
CLanguageVariantHandler | Serializes language variant markup, like -{ ... }- |
CLinkHandlerUtils | Serializes link markup |
CRemoveRedLinks | |
CSelectiveSerializer | This is a Serializer class that will compare two versions of a DOM and re-use the original wikitext for unmodified regions of the DOM |
CSeparators | |
CSerializerState | State object for the wikitext serializers |
CSingleLineContext | Stack and helpers to enforce single-line context while serializing |
CWikitextEscapeHandlers | |
CWikitextSerializer | Wikitext to HTML serializer |
CWTSUtils | |
►NLanguage | A bidirectional Language Converter, capable of round-tripping variant conversion |
CConstantLanguageGuesser | A simple LanguageGuesser that returns the same "source language" for every node |
CConversionTraverser | |
CCrhConverter | |
CEnConverter | |
CKuConverter | |
CLanguage | Base class for Language objects |
CLanguageConverter | Base class for language variant conversion |
CLanguageCrh | Crimean Tatar (Qırımtatarca) conversion code |
CLanguageEn | English ( / Pig Latin) conversion code |
CLanguageGuesser | An oracle that gives you a predicted "source language" for every node in a DOM, which is used when converting the result back to the source language during round-tripping |
CLanguageKu | Kurdish conversion code |
CLanguageSr | Serbian (Српски / Srpski) specific code |
CLanguageZh | Chinese conversion code |
CMachineLanguageGuesser | Use a {@Link ReplacementMachine} to predict the best "source language" for every node in a DOM |
CSrConverter | |
CZhConverter | |
►NLogger | |
CLintLogger | Logger backend for linter |
CParsoidLogger | |
►NMocks | |
CMockDataAccess | This implements some of the functionality that the tests/ParserTests/MockAPIHelper.php provides |
CMockEnv | |
CMockMetrics | |
CMockPageConfig | |
CMockPageContent | |
CMockSiteConfig | |
►NNodeData | |
CDataBag | |
CDataMw | |
CDataMwAttrib | Rich attribute data for a DOM Element |
CDataMwError | Localizable errors, stored in data-mw |
CDataMwI18n | Data-mw-i18n information, used for internationalization |
CDataParsoid | |
CDataParsoidDiff | Diff markers for a DOM node |
CI18nInfo | |
CNodeData | |
CParamInfo | |
CTempData | |
CTemplateInfo | |
►NParserTests | |
CArticle | Represents a parser test |
CDummyAnnotation | Dummy annotation to test the annotation mechanisms outside of any extension-specific considerations |
CGrammar | |
CI18nTag | |
CItem | |
CMockApiHelper | This class supports the implementation of Parser Tests in a standalone mode and without network access |
CParserHook | See tests/parser/ParserTestParserHook.php in core |
CParserHookProcessor | See tests/parser/ParserTestParserHook.php in core |
CRawHTML | |
CSiteConfig | |
CStats | |
CStyleTag | |
CTest | Represents a parser test |
CTestFileReader | |
CTestMode | Represents a parser test mode, that is, a certain way of executing a parser tests and evaluating the result |
CTestRunner | Test runner for parser tests |
CTestUtils | This class contains helper functions which should not be directly used outside of Parsoid |
CUnexpectedException | |
►NTokens | |
CCommentTk | Represents a comment |
CEndTagTk | Represents an HTML end tag token |
CEOFTk | Represents EOF |
CInvalidTokenException | Thrown when a token is invalid |
CKV | Represents a Key-value pair |
CKVSourceRange | Represents a source offset range for a key-value pair |
CNlTk | Newline token |
CSelfclosingTagTk | Token for a self-closing tag (HTML or otherwise) |
CSourceRange | Represents a source offset range |
CTagTk | HTML tag token |
CToken | Catch-all class for all token types |
►NUtils | This file contains general utilities for scripts in the bin/, tools/, tests/ directories |
►NDOMCompat | |
CTokenList | Implements the parts of DOMTokenList interface which are used by Parsoid |
CCompatJsonCodec | This is a "compatible" JSON codec for the use of Parsoid test runners, etc |
CComputeSelectiveStats | This file contains code to classify opportunities for selective update and collect statistics |
CConfigUtils | This refactors common code in Api and Mock based config computation |
CContentUtils | These utilities are for processing content that's generated by parsing source input (ex: wikitext) |
CDiffDOMUtils | Some diff marker aware DOM utils |
CDOMCompat | Helper class that provides missing DOM level 3 methods for the PHP DOM classes |
CDOMDataUtils | These helpers pertain to HTML and data attributes of a node |
CDOMPostOrder | Non-recursive post-order traversal of a DOM tree |
CDOMTraverser | Class for helping us traverse the DOM |
CDOMUtils | DOM utilities for querying the DOM |
CDTState | State carried while DOM Traversing |
CPHPUtils | |
CPipelineUtils | This file contains parsing pipeline related utilities |
CRichCodecable | This is an extension of JsonCodecable which adds some properties useful for rich attributes: |
CScriptUtils | |
CTiming | A helper class to make it easier to compute timing metrics |
CTitle | |
CTitleException | Exception thrown for invalid titles |
CTitleValue | Lightweight title class |
CTokenUtils | |
CUrlUtils | Utilities for manipulating URLs |
CUtils | This file contains general utilities for token transforms |
CWTUtils | These utilites pertain to querying / extracting / modifying wikitext information from the DOM |
►NWikitext | |
CConsts | |
CContentModelHandler | |
CWikitext | This class represents core wikitext concepts that are currently represented as methods of Parser.php (in core) OR Parsoid.php (here) or other classes |
►NWt2Html | Tokenizer for wikitext, using WikiPEG and a separate PEG grammar file (Grammar.pegphp) |
►NDOM | |
►NHandlers | |
CAddAnnotationIds | |
CAddLinkAttributes | |
CCleanUp | |
CDedupeStyles | |
CDisplaySpace | Apply french space armoring |
CHandleLinkNeighbours | |
CHeadings | |
CLiFixups | |
CTableFixups | Provides DOMTraverser visitors that fix template-induced interrupted table cell parsing by recombining table cells and/or reparsing table cell content as attributes |
CUnpackDOMFragments | |
►NProcessors | |
CAddMediaInfo | |
CAddMetaData | |
CAddRedLinks | |
CAnnotationDOMRangeBuilder | The handling of annotation ranges and transclusion ranges are somewhat different for a number of reasons |
CCompoundTemplateInfo | |
CComputeDSR | |
CConvertOffsets | Very thin shim to call ContentUtils::convertOffsets where requested in the environment |
CDOMRangeBuilder | |
CDOMRangeInfo | |
CDOMRangeInfoArray | |
CLangConverter | |
CLinter | DOM pass that walks the DOM tree, detects specific wikitext patterns, and emits them as linter events |
CMarkFosteredContent | |
CMigrateTemplateMarkerMetas | |
CMigrateTrailingNLs | |
CNormalize | |
CProcessEmbeddedDocs | |
CProcessTreeBuilderFixups | |
CPWrap | |
CPWrapState | |
CRangeBuilderException | |
CRunExtensionProcessors | A wrapper to call extension-specific DOM processors |
CSection | |
CUpdateTemplateOutput | |
CWrapAnnotations | |
CWrapSections | |
CWrapSectionsState | |
CWrapSectionsTplInfo | |
CWrapTemplates | |
►NTreeBuilder | Front-end/Wrapper for a particular tree builder, in this case the parser/tree builder from RemexHtml |
CAttributes | |
CDOMBuilder | This is the DOMBuilder subclass used by Wt2Html |
CRemexPipeline | |
CTreeBuilderStage | |
CTreeMutationRelay | This is a stage inserted between RemexHtml's TreeBuilder and our DOMBuilder subclass |
►NTT | General token sanitizer |
CAttributeExpander | Generic attribute expansion handler |
CAttributeTransformManager | Utility transformation manager for expanding attributes whose keys and/or values are not plain strings |
CBehaviorSwitchHandler | Handler for behavior switches, like 'TOC' and similar |
CDOMFragmentBuilder | |
CExtensionHandler | |
CExternalLinkHandler | |
CLanguageVariantHandler | Handler for language conversion markup, which looks like -{ ... }- |
CListHandler | Create list tag around list items and map wiki bullet levels to html |
COnlyInclude | OnlyInclude sadly forces synchronous template processing, as it needs to hold onto all tokens in case an onlyinclude block is encountered later |
CParagraphWrapper | Insert paragraph tags where needed – smartly and carefully – there is much fun to be had mimicking "wikitext visual newlines" behavior as implemented by the PHP parser |
CParserFunctions | Some parser functions, and quite a bunch of stubs of parser functions |
CPreHandler | PRE-handling relies on the following 6-state FSM |
CQuoteTransformer | MediaWiki-compatible italic/bold handling as a token stream transformation |
CSanitizerHandler | |
CTemplateEncapsulator | A helper class for TemplateHandler that encapsulates template-like syntax with the appropriate meta tags, adding argument info data |
CTemplateExpansionResult | |
CTemplateHandler | Template and template argument handling |
CTokenHandler | |
CTokenHandlerResult | |
CTokenStreamPatcher | This class is an attempt to fixup the token stream to reparse strings as tokens that failed to parse in the tokenizer because of SOL or other constraints OR because tags were being constructed in pieces or whatever |
CTraceProxy | |
CWikiLinkHandler | |
CDOMPostProcessor | Perform post-processing steps on an already-built HTML DOM |
CDOMPPTraverser | This is a class that wraps the DOMTraverser utility for use in the DOM Processor pipeline |
CFrame | A frame represents a template expansion scope including parameters passed to the template (args) |
CGrammar | |
CGrammarCacheEntry | |
CPageConfigFrame | A special subclass of frame used for the topmost frame in the environment; gets most of its actual data from a PageConfig object |
CParams | A parameter object wrapper, essentially an array of key/value pairs with a few extra methods |
CParserPipeline | Wrap some stages into a pipeline |
CParserPipelineFactory | This class assembles parser pipelines from parser stages |
CPegTokenizer | |
CPipelineStage | This represents the abstract interface for a wt2html parsing pipeline stage Currently there are 4 known pipeline stages: |
CTokenizerUtils | |
CTokenTransformManager | Token transformation manager |
CTracingGrammar | |
CTracingGrammarCacheEntry | |
CWt2HtmlDOMProcessor | Wt2html DOM processor used to implement some DOM functionality (ex: DSR computation, template wrapping, etc.) |
CXMLSerializer | Stand-alone XMLSerializer for DOM3 documents |
CParsoid |