Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-488

Support optional langage for syntax highlighting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Auto Closed
    • 1.3
    • None
    • Module - Markdown
    • None

    Description

      pegdown supports the way to specify the langage for a code block:

      ~~~langage
      code
      ~~~
      

      Following the resolution of DOXIA-484 (pegdown dependency update), we should make sure the overrided

      public void visit( VerbatimNode node ) 

      of the

      MarkdownToDoxiaHtmlSerializer

      includes the support of langage option, ie:

           /**
            * {@inheritDoc}
            */
           @Override
           public void visit( VerbatimNode node )
           {
              printer.println().print("<div class=\"source\"><pre>");
              if (!StringUtils.isEmpty(node.getType())) {
                  printAttribute("class", node.getType());
              }
              printer.print(">");
              ...
           }
      

      Attachments

        1. DOXIA-488.patch
          3 kB
          Charles Salmon

        Activity

          People

            Unassigned Unassigned
            charless Charles Salmon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: