Table not getting printed
lamyergeier opened this issue · 2 comments
lamyergeier commented
Current Behavior
$ mdless << 'EOT'
- Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit.
- Calling `git stash` without any arguments is equivalent to `git stash push`.
- The modifications stashed away by this command can be listed with `git stash list`, inspected with `git stash show`, and restored (potentially on top of a different commit) with `git stash pop`
- The latest stash you created is stored in `refs/stash`; older stashes are found in the reflog of this reference and can be named using the usual reflog syntax (e.g. `stash@{0}` is the most recently created stash, `stash@{1}` is the one before it, `stash@{2.hours.ago}` is also possible). Stashes may also be referenced by specifying just the stash index (e.g. the integer `n` is equivalent to `stash@{n}`).
Table: Command
Command | Purpose
------------------------|--------------------
-s or --save | stash all including untracked and ignored files
------------------------|--------------------
-l or --list | list all stashes
------------------------|--------------------
-r or --restore | restore stash "${2:-0}" (Default the last stash, i.e. 0)
------------------------|--------------------
EOT
- Use git stash when you want to record the current state of the working directory and the index, but want to
go back to a clean working directory. The command saves your local modifications away and reverts the working
directory to match the HEAD commit.
- Calling `git stash` without any arguments is equivalent to `git stash push`.
- The modifications stashed away by this command can be listed with `git stash list`, inspected with `git
stash show`, and restored (potentially on top of a different commit) with `git stash pop`
- The latest stash you created is stored in `refs/stash`; older stashes are found in the reflog of this
reference and can be named using the usual reflog syntax (e.g. `stash@{0}` is the most recently created stash,
`stash@{1}` is the one before it, `stash@{2.hours.ago}` is also possible). Stashes may also be referenced by
specifying just the stash index (e.g. the integer `n` is equivalent to `stash@{n}`).
Table: Command
Expected behavior
Table should have got printed
ttscoff commented
So this is poor design on my part, but mdless needs content after the
table so that it knows where the table ends. If it finds even one
character on a line that contains no pipes, it will finish and render
out the table. If the document ends with the table, it never triggers
the final render after parsing it.
I'll see if I can figure out a possible refactor for that, but for now,
just adding some extra content (a MMD-style caption in square brackets
works) will circumvent the issue.
Note that mdless is going to remove all of those separator lines you
have in the table. I built it around MMD formatting, which only expects
one alignment row in a table (on the second line). It's going to eat
anything after that. Another thing I'll take into consideration for a
rewrite of that part of the code.
…-Brett
On 6 Jun 2020, at 7:24, Anish Mittal wrote:
# Current Behavior
```bash
$ mdless << 'EOT'
>
> - Use git stash when you want to record the current state of the
> working directory and the index, but want to go back to a clean
> working directory. The command saves your local modifications away
> and reverts the working directory to match the HEAD commit.
> - Calling `git stash` without any arguments is equivalent to `git
> stash push`.
> - The modifications stashed away by this command can be listed with
> `git stash list`, inspected with `git stash show`, and restored
> (potentially on top of a different commit) with `git stash pop`
> - The latest stash you created is stored in `refs/stash`; older
> stashes are found in the reflog of this reference and can be named
> using the usual reflog syntax (e.g. `stash@{0}` is the most recently
> created stash, `stash@{1}` is the one before it,
> `stash@{2.hours.ago}` is also possible). Stashes may also be
> referenced by specifying just the stash index (e.g. the integer `n`
> is equivalent to `stash@{n}`).
>
> Table: Command
>
> Command | Purpose
> ------------------------|--------------------
> -s or --save | stash all including untracked and ignored
> files
> ------------------------|--------------------
> -l or --list | list all stashes
> ------------------------|--------------------
> -r or --restore | restore stash "${2:-0}" (Default the last
> stash, i.e. 0)
> ------------------------|--------------------
>
> EOT
- Use git stash when you want to record the current state of the
working directory and the index, but want to
go back to a clean working directory. The command saves your local
modifications away and reverts the working
directory to match the HEAD commit.
- Calling `git stash` without any arguments is equivalent to `git
stash push`.
- The modifications stashed away by this command can be listed
with `git stash list`, inspected with `git
stash show`, and restored (potentially on top of a different commit)
with `git stash pop`
- The latest stash you created is stored in `refs/stash`; older
stashes are found in the reflog of this
reference and can be named using the usual reflog syntax (e.g.
`stash@{0}` is the most recently created stash,
`stash@{1}` is the one before it, `stash@{2.hours.ago}` is also
possible). Stashes may also be referenced by
specifying just the stash index (e.g. the integer `n` is equivalent to
`stash@{n}`).
Table: Command
```
## Expected behavior
Table should have got printed
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#51
ttscoff commented
I added a hacky but effective fix for this in v1.0.13, available on the gem server now.