[idea] <pre> tag dedentation #7087
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
Currently the
<pre>
tag is the primary way in which we specify preformatted text, however it's currently quite painful for authoring, i.e. consider the following example:In this example our code is split up over multiple indentation levels without the source itself, on the starting
<pre>
line it's completely inconsistent with following lines, and the final line is dedented relative to the usual indentation for authoring.It would be nice for this tag to be more human authorable, code samples is a particularly large use case, but I imagine there are other uses for improved formatting.
Now one way we could improve this is to implement something along the lines of the JS string dedent proposal, in that proposal you can indent preformatted strings more logically following conventional indentation styles within the code itself.
For example one could dedent a string as such:
It would be nice to have this sort've capability with the
<pre>
tag, perhaps a dedent attribute or something that allows for authoring dedented blocks:The text was updated successfully, but these errors were encountered: