Skip to content

Change example code output to use backticks rather than indent #33

@caufang

Description

@caufang

Right now when an "Example" is converted to markdown, it is done so using 4-space indents.

This works, but GitHub renders these as generic code blocks.

Code examples manually defined in the tutorial files are delimited using triple-backticks with the identifier openscad, which then presents with nice code coloring.

Indent

include <BOSL2/std.scad>
include <BOSL2/gears.scad>
spur_gear2d(diam_pitch=10, teeth=20, shaft_diam=5);

Backticks with openscad

include <BOSL2/std.scad>
include <BOSL2/gears.scad>
spur_gear2d(diam_pitch=10, teeth=20, shaft_diam=5);

My question is, would it be possible to change the function that outputs the code examples to use the backtick method?

I'm not verse in python so I can't attempt to do it myself and present a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions