Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect rendering of pre-formatted text #30

Closed
nindalf opened this issue Mar 18, 2015 · 3 comments
Closed

Incorrect rendering of pre-formatted text #30

nindalf opened this issue Mar 18, 2015 · 3 comments

Comments

@nindalf
Copy link

nindalf commented Mar 18, 2015

Triple backticks are rendered as <pre> when I set forceExtended in the config. However there are a couple of issues with the text.

  1. Everything from the block appears on the same line. (This could be intended, but I'm not certain)
  2. The first few characters on every line disappears

Example

```
go test -cover // shows you what percentage of the code is covered by tests
go tool cover -html=coverage.out //opens a web browser which shows you which lines aren't covered
```

random text

```
func main() {
    return nil
}
```

renders as

forceExtendedProfile = True

<p>From <a href="http://blog.golang.org/cover">a post</a> on the Go Blog</p>
    <pre><code>est -cover // shows you what percentage of the code is covered by tests
    ool cover -html=coverage.out //opens a web browser which shows you which lines aren't covered
    </code></pre>
    <p>random text</p>
    <pre><code> main() {
    return nil
    </code></pre>

forceExtendedProfile = False

<p>From <a href="http://blog.golang.org/cover">a post</a> on the Go Blog</p>
    <p><code>`
    go test -cover // shows you what percentage of the code is covered by tests
    go tool cover -html=coverage.out //opens a web browser which shows you which lines aren't covered
    </code>`</p>
    <p>random text</p>
    <p><code>`
    func main() {
    return nil
    }
    </code>`</p>
@nindalf
Copy link
Author

nindalf commented Mar 18, 2015

Thanks again for your support. If there is an alternate forum I should be asking these questions, please let me know.

@rjeschke
Copy link
Owner

The behaviour for forceExtendedProfile=false is correct, as there are no fenced code blocks supported.

But the other case is a bug, there was a leading of four characters removed for fenced code blocks, when no block-emitter was given.

Fixed with 77ce758

@nindalf
Copy link
Author

nindalf commented Mar 19, 2015

Thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants