Markdown filter: only one line is quoted after extract/merge of multi-line quotes

Issue #686 new
Kuro Kurosaka created an issue

The attached file, quoted-list.md, has the three list items that are quoted by "> ". When this file is extracted and remerged (by tikal.sh -x and tikal.sh -m), the re-generated .md has the quote only in the first line, as shown below.

> 1. Drag the asset to the required location in the assembly and select once using the left mouse button.
1. If multiple insertion points have been defined on the model, press the Tab key to cycle through each of the insertion points until you identify the point you want. To automatically place and ground the asset at the layout origin (0, 0, 0), right-click when placing the asset and select **Insert Grounded at Origin**.
1. Continue to move the mouse to rotate the asset, or enter an angle in the value input box. Select again using the left mouse button to define the orientation.

Comments (6)

  1. Sun Hang

    The md file below, in re-generated md file, two spaces are missing after first * and additional new line and 3 spaces are added before ### Point cloud file paths

    *   **PointCloudType** - type of point cloud loaded into a Revit document. Each PointCloudType maps to a single file or identifier (depending upon the type of Point Cloud Engine which governs it).
    *   **PointCloudInstance** - an instance of a point cloud in a location in the Revit project.
    *   **PointCloudFilter** - a filter determining the volume of interest when extracting points.
    *   **PointCollection** - a collection of points obtained from an instance and a filter.
    *   **PointIterator** - an iterator for the points in a PointCollection.
    *   **CloudPoint** - an individual point cloud point, representing an X, Y, Z location in the coordinates of the cloud, and a color.
    *   **PointCloudOverrides** - and its related settings classes specify graphic overrides that are stored by a view to be applied to a PointCloudInstance element, or a scan within the element.
    ### Point cloud file paths
    

    The md file below, in re-generated md file,one space is missing after 1. and additional new line and 3 spaces are added before ### Creating a Point Cloud

    1.  PointCloudType.GetPath() - The path of the link source from which the points are loaded
    2.  Application.PointCloudsRootPath - The root path for point cloud files which is used by Revit to calculate relative paths to point cloud files
    ### Creating a Point Cloud
    
  2. Kuro Kurosaka reporter

    Another issue #687 has been created to address the issue of additional/removal of spaces and empty lines reported by Sun Hang.

  3. Kuro Kurosaka reporter

    The handling of quoted block is not straight forward because of how Flexmark arranges the node tree. Flexmark identify the neighboring lines starting with "> ", and collect them under one node of the type BlockQuote. Under the BlockQuote, there can be many other nodes such as OrderedList, which in turn has multiple OrderdlistItem nodes, each of which has a Paragraph node, which has a Text node. The output (adding lines to the Okapi Event object) happens at or near the leaf nodes.

    Currently, the code handling the BlockQuote is outputting "> ", and that is why there is only one "> " per quoted block. We need to shift the responsibility to the leaf nodes. I am hoping the code that handles the leaf nodes can find out if it is under BlockQuote by traversing the parent pointers, and the output the original quote marker.

  4. Kuro Kurosaka reporter

    Commit ed7ace9 by pull request #245 partially fixes this.

    • quoted-para.md : merged document is identical with the original
    • quoted-list.md: merged document has one extra blank line at the end
    • quoted-more.md: merge document has the second paragraph with HTML tag doubly quoted

    This fix, however, introduced another issue #738.

  5. Log in to comment