Comments (6)
Hi,
this looks very cool! I would be happy to include both of the extensions in the project.
A) The code for tables looks pretty good to me, so if you can send a pull request, we can include that almost immediately. The only thing that might not work in your current version is the bit in Markdown.fs
in Matching
.
You added a case to the (|ParagraphLeaf|ParagraphNested|ParagraphSpans|)
active pattern (which returns cells of the table as a list of paragraphs), but you did not include case in ParagraphNested
that would re-construct the table value. Ideally, you should be able to write:
match node with
| ParagraphNested(info, pars) -> ParagraphNested(info, List.map processRecursively pars)
(to process the tree - I wrote more about this at the end of my F# Deep Dives chapter)
The problem is that ParagraphNested
returns list<MarkdownParagraph>
and if we turn list<list<MarkdownParagraph>>
to just a non-nested list, then there is no easy way to reconstruct the original table. I think we could probably change the active pattern to return list<list<MP>>
instead of just list<MP>
.
B) Having some features for mathematics has been on my wish list too :-), so feel free to add some extension for that and send a pull request!
At the moment, we only have HTML output, but it should not be too hard to turn MarkdownParagraphs
to latex similarly to how HtmlFormatting.fs works (and I would really like to have this feature!) But maybe there is a more direct way to get PDF?
from fsharp.formatting.
I believe most of this is now included, right?
from fsharp.formatting.
I just downloaded FSharp.Formatting using VS2012 Nuget Manager. I was very interested in parsing markdown tables and formatting it as HTML, but I tried to parse this:
------ --------------- ---------- **Id** **Description** **Link** 1 _text_ [url](url) 2 *text* [url](url)
with this code
MarkdownDocument FDocument = Markdown.Parse(MdContent); string FHtml = Markdown.WriteHtml(FDocument);
and it appears in this mode (1 line):
<p><strong>Id</strong> <strong>Description</strong> <strong>Link</strong> 1 <em>text</em> <a href="url">url</a> 2 <em>text</em> <a href="url">url</a></p>
Is the nuget repository updated to this version? Or I am doing something wrong?
Thank you in advance!
from fsharp.formatting.
I think the actual format of the tables that we currently support is a bit different. Check out the samples here: #9
from fsharp.formatting.
Wow, thank you!! It works like a charm! :)
from fsharp.formatting.
Cool :-)
from fsharp.formatting.
Related Issues (20)
- Support generating documentation from specific assemblies in the CLI tool. HOT 2
- `--projects` does not work with relative paths. HOT 1
- String Links 404 HOT 15
- Async function takes longer than usual HOT 5
- Consider targetting .NET 6 as well HOT 8
- Better "Tests" detection HOT 10
- _menu-item_template _menu_template oddities HOT 2
- Guidance on literate programming HOT 9
- Missing `fsdocs-page-source` in ApiDocs generation HOT 2
- Using polyglot notebooks (dotnet interactive) as input HOT 13
- fsdocs does not generate correct code cell metadata for .ipynb
- Cannot use the evaluator from .net7 scripts
- Use fsdocs command line tool to convert single files
- Get CommonMark 0.30 tests to pass for "Tabs" section
- Get CommonMark 0.30 tests to pass for "Fenced code blocks" section
- Dockerfile fails to build with "failed to solve: process /bin/bash ..." HOT 2
- discussion: multi target F# libraries (IL, WebSharper, Fable, etc.)
- discussion: offering back links form API pages to the other documentation pages?
- Need to update repo's nuget API key HOT 2
- Package references cannot be resolved when trying to build API documentation programmatically HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.formatting.