-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Vimwiki reader #3705
Vimwiki reader #3705
Conversation
I think this may be ready to merge now. Let me know if there are any bugs or other problems. Edit: Sigh. Just found another bug. Will fix it soon. Edit 2: the bug is fixed. Ready to merge again. |
test/vimwiki-reader.html seems not to be used; can it be removed? |
Can you make sure that the code is wrapped to within 80 columns (as requested in CONTRIBUTING.md)? |
@jgm test/vimwiki-reader.html was the output of I have now enforced the 80 column rule. I also added support for diary links. I only added it now because it relies on configs in the vim plugin of vimwiki. Since there is a default config I'm using that, namely the diary links like |
src/Text/Pandoc/Readers/Vimwiki.hs
Outdated
| s2 == "" = (s1, s2) | ||
| head s2 == '#' = (s1, s2) | ||
| otherwise = divByHash (s1 ++ [head s2]) (tail s2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the point of this function is to split a string on a prefix not containing #
and a suffix starting with #
, why not use the Prelude function break
?
procLink s = procLink' x ++ y
where (x, y) = break (=='#') s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know break
- thanks for pointing it out.
src/Text/Pandoc/Readers/Vimwiki.hs
Outdated
y <- many p2 | ||
z <- p6 | ||
return $ mconcat $ x:y++[z] | ||
p2 :: PandocMonad m => VwParser m Blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should put a blank line between the two function defs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks very much for this contribution. There may be further problems that appear, but I think this is in good shape to merge. |
Thanks very much for merging. I'll keep an eye on issues related to this reader. Also feel free to @ me whenever a problem appears. |
See #863.
This is a preliminary version.
Descriptions and comments about progress etc. are in the issue thread.