[ https://issues.apache.org/jira/browse/DOXIATOOLS-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823733#comment-17823733 ]
Konrad Windszus commented on DOXIATOOLS-84: ------------------------------------------- There are two different approaches coming to mind: # Use a heuristics which does a best effort detection or # Use Velocity {{StandardParser}} (https://velocity.apache.org/engine/2.3/apidocs/org/apache/velocity/runtime/parser/StandardParser.html) and use the token types with their start/end indices to differentiate VTL from other contexts > Parser: Emit Velocity statements in special Sink events > ------------------------------------------------------- > > Key: DOXIATOOLS-84 > URL: https://issues.apache.org/jira/browse/DOXIATOOLS-84 > Project: Maven Doxia Tools > Issue Type: Improvement > Components: Doxia Converter > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > Velocity is often used together with markup > (https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#Filtering). > When parsing markup including Velocity statements (directives, references > and comments) those are included in the regular {{Sink.text(...)}} event. > Therefore it is often incorrectly escaped when being emitted by a Sink. > Although usually Velocity is supposed to be executed *before* markup is > passed to a parser, there are cases where one wants to retain the Velocity > statements and references in the markup (e.g. for converting from one format > to another with https://maven.apache.org/doxia/doxia-tools/doxia-converter/). -- This message was sent by Atlassian Jira (v8.20.10#820010)