Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/s7/s7.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ typedef int64_t s7_int;
typedef double s7_double;

#ifndef __cplusplus
#ifndef _MSC_VER
#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
#include <stdbool.h>
#else
#ifndef true
Expand Down
3 changes: 2 additions & 1 deletion src/Data/Convert/Generic/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "file.hpp"
#include "hashmap.hpp"
#include "image_files.hpp"
#include "Markdown/markdown.hpp"
#include "moebius/data/scheme.hpp"
#include "path.hpp"
#include "preferences.hpp"
Expand Down Expand Up @@ -310,7 +311,7 @@ void
texmacs_input_rep::markdown_flush (bool force) {
// ignore: empty buf in markdown is meaningless
if (force && !is_empty (buf)) {
write (generic_to_tree (buf, "markdown-snippet"));
write (markdown_to_tree (buf));
buf= "";
}
}
Expand Down
18 changes: 18 additions & 0 deletions src/Data/Convert/Markdown/markdown.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/******************************************************************************
* MODULE : markdown.cpp
* DESCRIPTION: Markdown to TMU tree conversion (Placeholder)
******************************************************************************/

#include "markdown.hpp"

#include "md4c.h" // Testing md4c include
#include "tree_helper.hpp"

tree
markdown_to_tree (string s) {
// TODO: Phase 2 - Implement md4c AST parsing and mapping to Mogan's tree
// For now, this is a placeholder that returns a basic verbatim tree or text
// just to prove the C++ binding and build works.

return tree (TUPLE, "document", s);
}
13 changes: 13 additions & 0 deletions src/Data/Convert/Markdown/markdown.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/******************************************************************************
* MODULE : markdown.hpp
* DESCRIPTION: Markdown to TMU tree conversion (Placeholder)
******************************************************************************/

#ifndef MARKDOWN_H
#define MARKDOWN_H

#include "tree.hpp"

tree markdown_to_tree (string s);

#endif // defined MARKDOWN_H
2 changes: 2 additions & 0 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ add_requires("freetype "..FREETYPE_VERSION, {system=false, configs={png=true}})
add_requireconfs("liii-pdfhummus.freetype", {version = FREETYPE_VERSION, system = false, configs={png=true}, override=true})

add_requires("argh v1.3.2")
add_requires("md4c")

--- package: qt6widgets
QT6_VERSION="6.8.3"
Expand Down Expand Up @@ -638,6 +639,7 @@ target("libmogan") do
add_packages("freetype")
add_packages("s7")
add_packages("argh")
add_packages("md4c")
if not is_plat("macosx") then
add_packages("libiconv")
end
Expand Down