diff --git a/include/prism.h b/include/prism.h
index 755c38fca29..a27d216fe7a 100644
--- a/include/prism.h
+++ b/include/prism.h
@@ -259,11 +259,11 @@ PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t
* In order to parse Ruby code, the structures and functions that you're going
* to want to use and be aware of are:
*
- * * `pm_parser_t` - the main parser structure
- * * `pm_parser_init` - initialize a parser
- * * `pm_parse` - parse and return the root node
- * * `pm_node_destroy` - deallocate the root node returned by `pm_parse`
- * * `pm_parser_free` - free the internal memory of the parser
+ * * #pm_parser_t
- the main parser structure
+ * * `pm_parser_init()` - initialize a parser
+ * * `pm_parse()` - parse and return the root node
+ * * `pm_node_destroy()` - deallocate the root node returned by `pm_parse()`
+ * * `pm_parser_free()` - free the internal memory of the parser
*
* Putting all of this together would look something like:
*
@@ -280,9 +280,9 @@ PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t
* }
* ```
*
- * All of the nodes "inherit" from `pm_node_t` by embedding those structures as
+ * All of the nodes "inherit" from #pm_parser_t
by embedding those structures as
* their first member. This means you can downcast and upcast any node in the
- * tree to a `pm_node_t`.
+ * tree to a \ref pm_parser_t "pm_parser_t *
".
*
* @section serializing Serializing
*
@@ -292,10 +292,10 @@ PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t
* parse Ruby code. The structures and functions that you're going to want to
* use and be aware of are:
*
- * * `pm_buffer_t` - a small buffer object that will hold the serialized AST
- * * `pm_buffer_free` - free the memory associated with the buffer
- * * `pm_serialize` - serialize the AST into a buffer
- * * `pm_serialize_parse` - parse and serialize the AST into a buffer
+ * * #pm_buffer_t - a small buffer object that will hold the serialized AST
+ * * #pm_buffer_free() - free the memory associated with the buffer
+ * * #pm_serialize() - serialize the AST into a buffer
+ * * #pm_serialize_parse() - parse and serialize the AST into a buffer
*
* Putting all of this together would look something like:
*
@@ -313,7 +313,7 @@ PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t
* @section inspecting Inspecting
*
* Prism provides the ability to inspect the AST by pretty-printing nodes. You
- * can do this with the `pm_prettyprint` function, which you would use like:
+ * can do this with the pm_prettyprint() function, which you would use like:
*
* ```c
* void prettyprint(const uint8_t *source, size_t length) {
diff --git a/include/prism/util/pm_string.h b/include/prism/util/pm_string.h
index e4a20558d36..9f2fa071957 100644
--- a/include/prism/util/pm_string.h
+++ b/include/prism/util/pm_string.h
@@ -35,18 +35,18 @@ typedef struct {
size_t length;
/** The type of the string. This field determines how the string should be freed. */
- enum {
+ enum pm_string_type {
/** This string is a constant string, and should not be freed. */
PM_STRING_CONSTANT,
/** This is a slice of another string, and should not be freed. */
PM_STRING_SHARED,
- /** This string owns its memory, and should be freed using `pm_string_free`. */
+ /** This string owns its memory, and should be freed using \ref pm_string_free "pm_string_free()
". */
PM_STRING_OWNED,
#ifdef PRISM_HAS_MMAP
- /** This string is a memory-mapped file, and should be freed using `pm_string_free`. */
+ /** This string is a memory-mapped file, and should be freed using \ref pm_string_free "pm_string_free()
". */
PM_STRING_MAPPED
#endif
} type;
@@ -96,7 +96,7 @@ void pm_string_constant_init(pm_string_t *string, const char *source, size_t len
/**
* Read the file indicated by the filepath parameter into source and load its
* contents and size into the given `pm_string_t`. The given `pm_string_t`
- * should be freed using `pm_string_free` when it is no longer used.
+ * should be freed using \ref pm_string_free "pm_string_free()
" when it is no longer used.
*
* We want to use demand paging as much as possible in order to avoid having to
* read the entire file into memory (which could be detrimental to performance